Android-PIN-Bruteforce icon indicating copy to clipboard operation
Android-PIN-Bruteforce copied to clipboard

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

Open jon4s4 opened this issue 1 year ago • 6 comments

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.

jon4s4 avatar Aug 17 '23 07:08 jon4s4

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 avatar Jan 16 '24 10:01 urbanadventurer

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?

jon4s4 avatar Feb 10 '24 12:02 jon4s4

Free my accounts and unlock my phone

branden1992 avatar Feb 11 '24 13:02 branden1992

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?

Devonrex777 avatar May 04 '24 13:05 Devonrex777

Edit your config file. Look for the line KEYBOARD_DEVICE=/dev/hidg0 and change it to another device that works.

Kind regards, Andrew Horton

On Sat, 4 May 2024 at 11:53 PM, Devonrex777 @.***> wrote:

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?

— Reply to this email directly, view it on GitHub https://github.com/urbanadventurer/Android-PIN-Bruteforce/issues/144#issuecomment-2094209317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAY3F6F7HIO2M2PD47LCMLZATR7NAVCNFSM6AAAAAA3TVGY76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGIYDSMZRG4 . You are receiving this because you commented.Message ID: @.***>

urbanadventurer avatar May 05 '24 07:05 urbanadventurer

Edit your config file. Look for the line KEYBOARD_DEVICE=/dev/hidg0 and change it to another device that works. Kind regards, Andrew Horton On Sat, 4 May 2024 at 11:53 PM, Devonrex777 @.> wrote: 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? — Reply to this email directly, view it on GitHub <#144 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAY3F6F7HIO2M2PD47LCMLZATR7NAVCNFSM6AAAAAA3TVGY76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGIYDSMZRG4 . You are receiving this because you commented.Message ID: @.>

thank you so much

Devonrex777 avatar Jun 17 '24 07:06 Devonrex777