Quote:
Originally Posted by csdvrx
There's something funny going on at boot: adbd get started early, then restarted.
|
There's usually something that copies persist.sys.usb.config to sys.usb.config early-ish during boot.
That triggers a trigger which initializes the USB gadget and starts adbd if needed.
When the Android subsystem finally loads the UsbManager in services.jar it takes over and might want to redo everything.
Things also get more complicated. When you pull the USB cable the USB gadget gets torn down. If the Android subsystem has been stopped you won't be able to reconnect. Normally the UsbManager will re-initialize the USB gadget immediately after disconnect (and not at reconnect). Splitting the responsibility for USB gadget between init and UsbManager makes things goofy.