diff options
author | Hridya Valsaraju <hridya@google.com> | 2018-09-10 00:38:01 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-09-10 00:38:01 +0200 |
commit | 94e5553f4e346df0b81885c6a57a0283a937e791 (patch) | |
tree | 6317b863fe3e7cb8abd2b10f4ff48984dbe64208 /etc | |
parent | Merge "Remove res-560dpi symlink." (diff) | |
parent | Merge "Fix sideload for user devices by adding a new sideload config" (diff) | |
download | android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.gz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.bz2 android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.lz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.xz android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.tar.zst android_bootable_recovery-94e5553f4e346df0b81885c6a57a0283a937e791.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" |