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

Locked phone: POCO F3, Nethunter phone: Sony Xperia Z1 - Sending custom return buttons #144

Open
jon4s4 opened this issue Aug 17, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@jon4s4
Copy link

jon4s4 commented Aug 17, 2023

Describe the bug

I want my nethunter device to send some special keys before and after typing each PIN. I want to implement the return button from my locked android device (ive tested it in a virtual USB Keyboard, which is the combination of meta + <- x). I have no Idea what to write in my config file to make it work. Everything else works just fine.

@urbanadventurer
Copy link
Owner

Try these commands to see if they work for you:

This will press meta then left arrow then x.

echo "left-meta left x" | /system/xbin/hid-keyboard /dev/hidg0 keyboard

This will hold meta and left arrow while pressing x (probably as I didn't test it).

echo "x" | /system/xbin/hid-keyboard --left-meta --left /dev/hidg0 keyboard

You can learn more in the README and by reading the source for hid-keyboard.

After you have that working, modify the following function and let us know if it worked.

function send_enter() {
  send_key enter
}

@urbanadventurer urbanadventurer added the enhancement New feature or request label Jan 16, 2024
@urbanadventurer urbanadventurer changed the title Locked phone: POCO F3, Nethunter phone: Sony Xperia Z1 - Bug description Locked phone: POCO F3, Nethunter phone: Sony Xperia Z1 - Sending custom return buttons Jan 16, 2024
@jon4s4
Copy link
Author

jon4s4 commented Feb 10, 2024

I've tried it, but suddenly it doesn't work. I was testing it via USB Keyboard from the nethunter Store. The combination i am looking for is actually meta + backspace (which should trigger the return button on my locked phone). The backspace button is pictured as "<- x" on my nethunter device in the USB keyboard app. After i figured it out i've tested it in termux sending test keys.
with the command echo "" | /system/xbin/hid-keyboard /dev/hidg0 keyboard
i've tested multiple combinations.
What i've tried:

  • "left-meta bckspc"
  • "left-meta backspace"
  • "meta bckspc"
  • "meta backspace"
  • "right-meta bckspc"
  • "right-meta backspace"
    and also echo "bckspc" | /system/xbin/hid-keyboard --left-meta /dev/hidg0 keyboard. Nothing of these actually worked. Is there any way to trigger the return Button?

@branden1992
Copy link

Free my accounts and unlock my phone

@Devonrex777
Copy link

Try these commands to see if they work for you:

This will press meta then left arrow then x.

echo "left-meta left x" | /system/xbin/hid-keyboard /dev/hidg0 keyboard

This will hold meta and left arrow while pressing x (probably as I didn't test it).

echo "x" | /system/xbin/hid-keyboard --left-meta --left /dev/hidg0 keyboard

You can learn more in the README and by reading the source for hid-keyboard.

After you have that working, modify the following function and let us know if it worked.

function send_enter() {
  send_key enter
}

Dear Owner,

may I know , what to do if in 'dev' folder only hidg2 and hidg3 exist? Do I need to change your script - android-pin-bruteforce to comparable with the phone or?

@urbanadventurer
Copy link
Owner

urbanadventurer commented May 5, 2024 via email

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

No branches or pull requests

4 participants