Skip to content

Commit

Permalink
poplar: use persistent property to disable or enable adb over usb fun…
Browse files Browse the repository at this point in the history
…ction

For the requirement of using usb2 port as host mode permanently, it uses
persistent property to disable or enable adb over usb function:
  - disable adb over usb: setprop persist.adb.over.usb 0
  - enable adb over usb: setprop persist.adb.over.usb 1

Signed-off-by: Jianguo Sun <sun_jianguo@hoperun.com>
  • Loading branch information
Jianguo Sun authored and Jianguo Sun committed May 29, 2018
1 parent 2081584 commit 8457d33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rootfs/init.poplar.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ on fs
mount_all ./fstab.poplar
swapon_all ./fstab.poplar

on property:persist.adb.over.usb=0
write /sys/kernel/debug/hisi_inno_phy/role "host"

on property:persist.adb.over.usb=1
write /sys/kernel/debug/hisi_inno_phy/role "peripheral"

0 comments on commit 8457d33

Please sign in to comment.