diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-09-10 00:23:25 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-09-10 00:23:25 +0200 |
commit | 1254e15e5013df9c62564b37ebb86f6e023e76ae (patch) | |
tree | 6317b863fe3e7cb8abd2b10f4ff48984dbe64208 /etc | |
parent | Merge "Remove res-560dpi symlink." (diff) | |
parent | Fix sideload for user devices by adding a new sideload config (diff) | |
download | android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar.gz android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar.bz2 android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar.lz android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar.xz android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.tar.zst android_bootable_recovery-1254e15e5013df9c62564b37ebb86f6e023e76ae.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" |