Commit 750ce667 authored by spiiroin's avatar spiiroin

[android] Make sure android usb is enabled on usb-moded startup. JB#35683

If android usb is in enable=0 state, cable detection is persistently
broken as the existing workarounds in usb-moded are made when cable
disconnect is detected and that can't happen unless cable detect works.

Enable android usb on usb-moded startup.
Signed-off-by: spiiroin's avatarSimo Piiroinen <>
parent 358b23d6
......@@ -81,6 +81,10 @@ void android_init_values(void)
/* For rndis to be discovered correctly in M$ Windows (vista and later) */
write_to_file("/sys/class/android_usb/f_rndis/wceis", "1");
/* Make sure android_usb does not stay disabled in case usb moded
* has crashed / been killed in inconvenient time. */
write_to_file("/sys/class/android_usb/android0/enable", "1");
/* Set a charging mode for the android gadget
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment