I assume this only works if the phone is unlocked?
This is awesome, I'm working with software that will manage a large bank of both android and ios devices and in the case of android at times a device hangs (while in usb debug mode)
I needed a way to disable usb debug mode and re-enable, I can issue a command through adb to disable usb debugging, but once disabled I no longer have control via adb. I had never thought of emulating hid. What a great way to re-enable usb debugging.
I'm also brewing some nifty hacks in my head for the android, I have an apk that will unlock a phone and disable