diff options
author | Hridya Valsaraju <hridya@google.com> | 2018-08-31 20:57:51 +0200 |
---|---|---|
committer | Hridya Valsaraju <hridya@google.com> | 2018-09-08 00:02:43 +0200 |
commit | e4ef453914235d1ac3bea1c1a27975ee1ea7da73 (patch) | |
tree | f421eef0a20c95c43cf006e1607fd8e75947ab8a /etc | |
parent | Merge "support mounting f2fs in recovery mode" (diff) | |
download | android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.gz android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.bz2 android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.lz android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.xz android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.zst android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.zip |
Diffstat (limited to 'etc')
-rw-r--r-- | etc/init.rc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/etc/init.rc b/etc/init.rc index 2adecb764..fa8fe269c 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -132,11 +132,9 @@ on property:sys.usb.config=adb on property:sys.usb.config=fastboot start fastbootd -on property:sys.usb.config=none - stop adbd - stop fastbootd - on property:sys.usb.config=none && property:sys.usb.configfs=0 + stop adbd + stop fastboot write /sys/class/android_usb/android0/enable 0 setprop sys.usb.state ${sys.usb.config} @@ -146,6 +144,12 @@ on property:sys.usb.config=adb && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 1 setprop sys.usb.state ${sys.usb.config} +on property:sys.usb.config=sideload && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/idProduct D001 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + on property:sys.usb.config=fastboot && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/idProduct 4EE0 write /sys/class/android_usb/android0/functions fastboot @@ -155,10 +159,19 @@ on property:sys.usb.config=fastboot && property:sys.usb.configfs=0 # Configfs triggers on property:sys.usb.config=none && property:sys.usb.configfs=1 write /config/usb_gadget/g1/UDC "none" + stop adbd + stop fastbootd setprop sys.usb.ffs.ready 0 rm /config/usb_gadget/g1/configs/b.1/f1 setprop sys.usb.state ${sys.usb.config} +on property:sys.usb.config=sideload && property:sys.usb.ffs.ready=1 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idProduct 0xD001 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + on property:sys.usb.config=adb && property:sys.usb.ffs.ready=1 && property:sys.usb.configfs=1 write /config/usb_gadget/g1/idProduct 0xD001 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" |