From c0a24ddf44a1855c3c1b707a530e724d98a607f3 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Fri, 11 Oct 2019 17:38:42 +0800 Subject: [PATCH] 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 --- rootdir/etc/init.msm.usb.configfs.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc index 81c2674c..eefd553e 100644 --- a/rootdir/etc/init.msm.usb.configfs.rc +++ b/rootdir/etc/init.msm.usb.configfs.rc @@ -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/f8 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 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc"