sm8150-common: usb: update sys.usb.state also when switching to none

* Android will always try to "kick" the USB stack by setting
  sys.usb.config to none before doing anything else. Failure to updating
  sys.usb.state here can block the USB stack waiting and eventually
  timeout.

* This fixes MTP and all the other USB issues we have seen on LOS 17.

Change-Id: Ic372aebde97cbff14cb1f140620cbcacd5523a8e
This commit is contained in:
Peter Cai 2019-10-11 17:38:42 +08:00 committed by LuK1337
parent ce91b894c2
commit c0a24ddf44
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ on property:sys.usb.config=none && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f7 rm /config/usb_gadget/g1/configs/b.1/f7
rm /config/usb_gadget/g1/configs/b.1/f8 rm /config/usb_gadget/g1/configs/b.1/f8
rm /config/usb_gadget/g1/configs/b.1/f9 rm /config/usb_gadget/g1/configs/b.1/f9
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1 on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc" write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc"