mayankmetha / Rucky

A simple to use USB HID Rubber Ducky Launch Pad for Android.
https://mayankmetha.github.io/Rucky
GNU General Public License v3.0
530 stars 65 forks source link

A few questions. #11

Closed Jack-Rickwood closed 4 years ago

Jack-Rickwood commented 4 years ago

There are three features I am wondering about, and I am willing to take a crack at implementing them myself if you don't have any plan to, however I don't have any experience with android keyboard gadget and how it works (i'm assuming this is the kernel patch this app requires?), and would appreciate a nudge in the right direction about where i can learn how this thing works.

mayankmetha commented 4 years ago

Hi Jack, Nice you hear from you. I would appreciate if you can try the stuff and get the features ready. This app is basically a layer above the usb-gadgets for USB mode and wifi drivers for Raspberry-Pi mode (future release & work under development, so won't make any other mentions about it below).

The reply to you question/queries are:

Regards, Mayank

mayankmetha commented 4 years ago

USB detection temporary work around will be push to the code. Pre-Oreo devices it will monitor the charging state to determine if USB is connected. This isn't a perfect solution though.

Jack-Rickwood commented 4 years ago

If the first one has a temporary fix, and neither of the other two features are something under rucky's control, is this issue good to close? (I'll look into a proper solution for USB detection when i can)

Jack-Rickwood commented 4 years ago

Actually, @mayankmetha I just noticed that it says this in the android-keyboard-gadget README:

You can check the modification time of file /sys/devices/virtual/hidg/hidg0/dev to know when the USB cable has been plugged into PC, however this does not always work, so it's better to simply check if hid-gadget-test returned an error.

Could we take one of these routes? It even has an example script.

mayankmetha commented 4 years ago

Hi jack, really appreciate the efforts. If you look into the latest Rucky code for future release, I have open sourced the USB detection logic now. For Pre-Oreo devices it could be a possibility of false positives, but for Oreo onwards it works well. I’m not using the hid-gadget-test as the hid logic as it’s not scalable and Rucky uses a scalable logic to support multiple hid layouts.

Issue is still open for the third point emulated identifier for hid, and not the usb issue.