From 84830ce015b83546f5bc25149e06647f2f7b5180 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Tue, 14 Feb 2017 20:36:16 -0600 Subject: Only change USB mode to mtp when ready for MTP Commit 'Do not toggle USB ID during MTP startup if not needed' changed the default USB mode to 'mtp,adb'. Depending on the device, this can result in an unfortunate side effect of crashing an ORS sideload midway through the process (it's not clear to me whether the kernel or the connected computer is responsible). Only put USB into mtp mode when MTP storage is starting-up. The hack to change the USB mode to adb when a user compiles TWRP without MTP support is no longer necessary now that 'adb' is the startup mode. Change-Id: I8ed13d6ab8e85621533997b8c37ef7ebec0fcf85 --- etc/init.recovery.usb.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/init.recovery.usb.rc b/etc/init.recovery.usb.rc index 801973671..8ef20e0ec 100644 --- a/etc/init.recovery.usb.rc +++ b/etc/init.recovery.usb.rc @@ -1,9 +1,9 @@ on fs write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18D1 - write /sys/class/android_usb/android0/idProduct 4EE2 + write /sys/class/android_usb/android0/idProduct D001 write /sys/class/android_usb/android0/f_ffs/aliases adb - write /sys/class/android_usb/android0/functions mtp,adb + write /sys/class/android_usb/android0/functions adb write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} write /sys/class/android_usb/android0/iProduct ${ro.product.model} write /sys/class/android_usb/android0/iSerial ${ro.serialno} -- cgit v1.2.3