summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2022-08-25 22:33:24 +0200
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-08-25 22:33:24 +0200
commitc59f83be2228a6672debe2a0d62059d702382661 (patch)
treea1d3c4e8d65b99294d4c2fc75b2e088a33fd759b
parent[automerger skipped] Merge "DO NOT MERGE - Merge Android 13" am: 266e0ce537 -s ours am: 7c1beee4b9 -s ours am: 121607b3ad -s ours am: 092016e966 -s ours (diff)
parentMerge "Make recovery/fastbootd USB VID/PID configurable." am: 512edf4a43 am: fa1855a52a am: 3052ef7daa am: 2c0ea9f0ac (diff)
downloadandroid_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar.gz
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar.bz2
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar.lz
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar.xz
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.tar.zst
android_bootable_recovery-c59f83be2228a6672debe2a0d62059d702382661.zip
-rw-r--r--etc/init.rc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/init.rc b/etc/init.rc
index e4afecff6..03df27b01 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -102,7 +102,7 @@ on property:service.adb.root=1
on fs && property:sys.usb.configfs=1
mount configfs none /config
mkdir /config/usb_gadget/g1 0770 shell shell
- write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idVendor 0x${ro.recovery.usb.vid}
mkdir /config/usb_gadget/g1/strings/0x409 0770
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
@@ -114,7 +114,7 @@ on fs && property:sys.usb.configfs=1
on fs && property:sys.usb.configfs=0
write /sys/class/android_usb/android0/f_ffs/aliases adb,fastboot
- write /sys/class/android_usb/android0/idVendor 18D1
+ write /sys/class/android_usb/android0/idVendor ${ro.recovery.usb.vid}
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}
@@ -139,19 +139,19 @@ on property:sys.usb.config=none && property:sys.usb.configfs=0
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=adb && property:sys.usb.configfs=0
- write /sys/class/android_usb/android0/idProduct D001
+ write /sys/class/android_usb/android0/idProduct ${ro.recovery.usb.adb.pid}
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=sideload && property:sys.usb.configfs=0
- write /sys/class/android_usb/android0/idProduct D001
+ write /sys/class/android_usb/android0/idProduct ${ro.recovery.usb.adb.pid}
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/idProduct ${ro.recovery.usb.fastboot.pid}
write /sys/class/android_usb/android0/functions fastboot
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
@@ -166,21 +166,21 @@ on property:sys.usb.config=none && property:sys.usb.configfs=1
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/idProduct 0x${ro.recovery.usb.adb.pid}
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/idProduct 0x${ro.recovery.usb.adb.pid}
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=fastboot && property:sys.usb.ffs.ready=1 && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idProduct 0x4EE0
+ write /config/usb_gadget/g1/idProduct 0x${ro.recovery.usb.fastboot.pid}
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "fastboot"
symlink /config/usb_gadget/g1/functions/ffs.fastboot /config/usb_gadget/g1/configs/b.1/f1
write /config/usb_gadget/g1/UDC ${sys.usb.controller}