Before reporting a bug or opening an issue to ask for help, go through this guide.
The Nethunter phone should have a regular USB cable attached. The OTG cable should be connected to the locked Android phone.
Refer to the graphic in the README on how to connect the phones.
- Check that the
/dev/hidg0
device is present - Check that the
/system/xbin/hid-keyboard
binary is present
The diag command will check that these files are present.
bash ./android-pin-bruteforce diag
If these files are present but the script doesn't work, try using another Android app to emulate a keyboard such as https://store.nethunter.com/en/packages/remote.hid.keyboard.client/
Connect a keyboard or mouse to any phone using the OTG cable. Confirm that the cable works with a different phone and any device. Try using a different OTG cable. Even if it works, perhaps it does not fit well with your locked phone.
- Connect your NetHunter phone to your laptop.
- Open a text editor such as Notepad
- Run the script
- Confirm that keys are sent to your laptop
Try testing sending keys from the NetHunter command line.
echo "enter" | /system/xbin/hid-keyboard /dev/hidg0 keyboard
echo "a b c" | /system/xbin/hid-keyboard /dev/hidg0 keyboard
Same as above.
Connect a USB keyboard through the OTG cable to the locked phone. This technique requires emulating a keyboard, so if the phone does not accept USB keyboard input while it is locked, this attack will not work.
Note that some devices will not permit you to use a new or unknown USB device while it is locked.
Same as above but with a different locked phone.
Using a keyboard, try keys and combinations of keys including:
- CTRL + ESCAPE
- ESCAPE
- SPACE
Usually this is enter
but you might need to send other keys.
- Reboot the phones.
- Unplug and replug the cables.
- Try new cables including the OTG cable
- Paste the output of the diag command,
bash ./android-pin-bruteforce diag