-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone 100% reboots when writing keyboard data into /dev/hidg1 after USB unplugged #45
Comments
Can you try to add a new gadget and NOT a new function to an existing gadget? Depending on the phone vendor, there might be some incompatibilities. Adding GamePad should be really simple. We just need to have the respective descriptor for the GamePad you want. |
I tried adding a new gadget 'Keyboard&Mouse' , and there's two new higds appeared in /dev/hidg2 and /dev/hidg3. However I can't writing data into these two hidgs. When i try to write, there will be an IOException Error Message: Error! write failed: errno 108 (Cannot send after transport endpoint shutdown) I'm confused because after that I change to the ordinally gadget and add a Keyboard function and writing data into /dev/hidg1, and there is no Error Message and USB keyboard works well. My phone is Redmi Note 11T Pro, Android 12 KERNEL_VERSION=5.10.66 |
I have successfully made an APP to change my Android to a USB Keyoard by writing data into /dev/hidg1 after using GSB Gadget Tool ----add function --- Keyboard !! That's really cool. The only question is why my Android 100% reboots automaticly when i unplug the USB from my computer and then write a keyboard data to /dev/hidg1.
And i want adding new USB function "GamePad" into USB Gadget Tool !! Thanks a lot !!
The text was updated successfully, but these errors were encountered: