Skip to content
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

Can it be accessed by terminal emulators like termux ? #47

Open
rexackermann opened this issue Dec 31, 2023 · 3 comments
Open

Can it be accessed by terminal emulators like termux ? #47

rexackermann opened this issue Dec 31, 2023 · 3 comments

Comments

@rexackermann
Copy link

rexackermann commented Dec 31, 2023

I am sorry, if this is not the right place to ask this question.

I was using a ducky program that required the usb-gadget-test.
Every time I ran the script I needed to manually turn on and off the hid toogle which can be annoying.
Is it possible to do it dirrectly using a command that I can put in the script that will,

Turn on hid
Run script(send keypress or whatever)
Turn of hid

??

Thanks in advance.

@Sucareto
Copy link

Turn on hid
ls /sys/class/udc > /config/usb_gadget/keyboard/UDC
Turn off hid
echo > /config/usb_gadget/keyboard/UDC

@rexackermann
Copy link
Author

Turn on hid ls /sys/class/udc > /config/usb_gadget/keyboard/UDC Turn off hid echo > /config/usb_gadget/keyboard/UDC

Thanks a lot for the reply but it is not working.
The keyboard dir itself does not exist.

@Sucareto
Copy link

Turn on hid ls /sys/class/udc > /config/usb_gadget/keyboard/UDC Turn off hid echo > /config/usb_gadget/keyboard/UDC

Thanks a lot for the reply but it is not working. The keyboard dir itself does not exist.

The keyboard directory is created by the android-usb-gadget,You first need to create the Mouse & Keyboard Gadget in app.
If you want to complete gadget creation in termux, you can refer to the script here.
By the way, I wrote a complete script here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants