diff options
author | Mike Lockwood <lockwood@android.com> | 2011-06-19 02:52:01 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-06-19 02:52:01 -0400 |
commit | 7e58b65efbea7a49f95feb0a697e18940cfda2e7 (patch) | |
tree | 73834489d40ae7b537793bc2b9e6d7926fe8eba2 /etc | |
parent | 5a4e03d120767e4e183e994bf9939463303057f8 (diff) | |
download | bootable_recovery-7e58b65efbea7a49f95feb0a697e18940cfda2e7.zip bootable_recovery-7e58b65efbea7a49f95feb0a697e18940cfda2e7.tar.gz bootable_recovery-7e58b65efbea7a49f95feb0a697e18940cfda2e7.tar.bz2 |
Fix starting adb in recovery mode
Change-Id: I8444f44d3194ff16ce54121633d5b255231393f5
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'etc')
-rw-r--r-- | etc/init.rc | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/etc/init.rc b/etc/init.rc index a675a4b..e2b4236 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -31,8 +31,32 @@ service recovery /sbin/recovery service adbd /sbin/adbd recovery disabled -on property:persist.service.adb.enable=1 +on property:persist.sys.usb.config=* + setprop sys.usb.config $persist.sys.usb.config + +#one of the following property triggers will enable adb if it is enabled in regular operation + +on property:sys.usb.config=mass_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct Fec0 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/enable 1 + start adbd + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct Fec0 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/enable 1 + start adbd + +on property:sys.usb.config=ptp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct Fec0 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/enable 1 start adbd -on property:persist.service.adb.enable=0 - stop adbd |