android-hid-client icon indicating copy to clipboard operation
android-hid-client copied to clipboard

App doesn't work

Open srt54558 opened this issue 10 months ago • 9 comments

Describe the bug Hello, the app always says "device not connected" (even tho it is) and when exporting debug log it says "error getting logs". The app didn't manage to make the phone a HID device so I used "USB gadget tool" (which I like to use more). No keys are being sent to the pc

To Reproduce Steps to reproduce the behavior:

  1. Open app
  2. Try anything
  3. See error

Expected behavior The app should work as intended; be a keyboard app

Screenshots It's only showing the built in error messages

Device details (please complete the following information):

  • Device: Google Pixel 8 Pro
  • OS: Android 14 QPR2 (March update)
  • Soft Keyboard: Gboard
  • Are You Rooted? Yes
  • Root Method: Magisk 27.0

Additional context Keyboard emulation works on "Rucky" (a app for running ducky scripts)

I love the idea and I'm so happy someone did it because the old app "USB keyboard" doesn't work (Pixel 8 Pro has no 32bit support)

srt54558 avatar Mar 29 '24 22:03 srt54558

working on some improvements right now that'll make it easier to debug some issues like this. After I get those finished I'll follow up on this.

Arian04 avatar Mar 30 '24 02:03 Arian04

Try this debug build out. I encountered a very similar problem (#29) and was able to clarify the issue a bit better. You might be in luck.

Windows81 avatar Apr 07 '24 09:04 Windows81

i was actually wondering if this was the same issue, thanks for linking the build! If it works then we have our answer, but if not then I'm working on improved debugging right now.

Arian04 avatar Apr 07 '24 09:04 Arian04

haven't made as many improvements to debugging as I planned to since I've been pretty busy but can you uninstall the app (if you still have it installed), install the latest one from the Github releases page, try it, and if it's still broken, export logs from the bottom of the settings page and attach them here.

Arian04 avatar Apr 13 '24 21:04 Arian04

(In reference to #29)

Doesn't work. I don't see any HID fallback option in the settings. Before I first boot the app, I already have had added hid.keyboard and hid.mouse to g2 through USB Gadget Tool. After I launch the app and fix character permissions, there is no observed change. Additionally, all the other functions of g1 and g2 work normally.

Thank you once again for the help!

debug_log_me.arianb.usb_hid_client_1713067249.txt

Windows81 avatar Apr 14 '24 04:04 Windows81

yea i havent added that option yet, my reply was meant for the author of this issue

Arian04 avatar Apr 14 '24 15:04 Arian04

I've improved the ability to troubleshoot issues like this in the latest release (v2.3.0). Do you mind trying that out and exporting a log file for me to check out?

You would just have to:

  1. Install v2.3.0
  2. Give the app root permissions
  3. Go to the "Troubleshooting" screen in the overflow menu in the top right
  4. Click the button at the bottom to export logs (a screenshot of the troubleshooting page would also be nice)

Arian04 avatar Jun 30 '24 21:06 Arian04

Same issue, just complains about not being connected. Used 2.3.0. Below logs and screenshot of the troubleshooting page.

debug_log_me.arianb.usb_hid_client_1720556658.txt Screenshot_20240709-232446_USB HID Client

luimu64 avatar Jul 09 '24 20:07 luimu64

thanks for the logs! unfortunately I was a little bit conservative on how large I allowed the log buffer to be, so it dropped the earlier logs which contained the actual character device creation script output. I'll fix that soon, but from what I could see, everything looks like it should work. the "device unplugged" error says that, because in my experience, the underlying error is generally caused by the device being unplugged, but the error itself could indicate other problems.

so basically (as I've previously seen mentioned in tejado/android-usb-gadget issues), this seems like a very weird issue thats gonna take some more troubleshooting. I'll do some thinking and research soon probably

Arian04 avatar Jul 09 '24 23:07 Arian04