android-keyboard-gadget
android-keyboard-gadget copied to clipboard
Occasional Reboot on Nexus Grouper 2012 (KitKat) version when connected with usb debug.
Currently running your kernel patch on my nexus and occasionally if disconnected and reconnected to a PC i get 'USB device not recognized'. In an attempt to resolve the issue I attempted to disable/enable usb debugging but when I attempt to disable it the nexus freezes up and reboots a few seconds later.
On a separate note I have written a JNI wrapper to make use of this functionality in Java based apps. I would like to submit my code but i'm not too familiar with github. Do I create a pull request or fork? Or do you add me as a contributor? Anyway I'd love to release my code if you'll have it.
I've added you to contributors, so push your changes right away, or you can just send me your code.
Init/deinit code inside kernel is tricky, view the file /proc/last_kmsg on the device to see kernel stack trace where it crashed.
You can open /dev/hidg0 directly from Java code, as a file input/output stream, then just send keycodes there - I've recently added a detailed description of the underlying protocol to the readme. I don't mind JNI either. On Aug 13, 2014 6:15 PM, "shaneharris" [email protected] wrote:
Currently running your kernel patch on my nexus and occasionally if disconnected and reconnected to a PC i get 'USB device not recognized'. In an attempt to resolve the issue I attempted to disable/enable usb debugging but when I attempt to disable it the nexus freezes up and reboots a few seconds later.
On a separate note I have written a JNI wrapper to make use of this functionality in Java based apps. I would like to submit my code but i'm not too familiar with github. Do I create a pull request or fork? Or do you add me as a contributor? Anyway I'd love to release my code if you'll have it.
— Reply to this email directly or view it on GitHub https://github.com/pelya/android-keyboard-gadget/issues/7.
do you know i never though of that at all! i figured you needed native as i assumed reading/writing to a device like that was low level. Never even considered file output stream. Kinda makes the JNI library redundant, unless there would be improved latency that way?
Nah, latency will be the same. But if you already created and tested the library, there's little sense to rewrite it just to remove JNI dependency.
On Wed, Aug 13, 2014 at 8:48 PM, shaneharris [email protected] wrote:
do you know i never though of that at all! i figured you needed native as i assumed reading/writing to a device like that was low level. Never even considered file output stream. Kinda makes the JNI library redundant, unless there would be improved latency that way?
— Reply to this email directly or view it on GitHub https://github.com/pelya/android-keyboard-gadget/issues/7#issuecomment-52084248 .