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: ? NetHunter phone: Samsung S7. usb-devices script failed #79

Open
Wahaj787 opened this issue Jun 23, 2021 · 6 comments
Open

Comments

@Wahaj787
Copy link

Hi
I'v fully working nethunter on my samsung s7.
I've also two hid interference and both are working.
I can also send input to my pc....
But when I connect the cell phone with same cable. It shows me this error.
Dunno why usb-devices is returning nothing.
Here's the output:
_root@kali:~/Android-PIN-Bruteforce# bash
android-pin-bruteforce crack diag Android PIN brute-force ::
version 0.1 [INFO] # Diagnostic info [PASS] HID device
(/dev/hidg0) found crw-------. 1 root root 240, 0 Jun 23
04:23 /dev/hidg0 [PASS] hid-keyboard executable
(/system/xbin/hid-keyboard) found -rwxrw-r--. 1 root root
18256 Jan 10 2019 /system/xbin/hid-keyboard[PASS]
usb-devices executable (/usr/bin/usb-devices) found
-rwxr-xr-x. 1 root root 4169 Jan 26 20:04
/usr/bin/usb-devices[INFO] ## Executing Command:
/usr/bin/usb-devices [FAIL] usb-devices script failed.
Return code 1. [INFO] ## Finding Android Phone USB Device
[INFO] Expected result, no device found. [INFO] ## Sending
Enter Key recv report: 00 [PASS] Key was sent succeessfully.
[INFO] ## Executing Command: /system/bin/getprop |grep usb
getprop: property_list [INFO] ## Executing Command: dmesg |
grep -i usb | tail [23568.718793] usb: config_buf f->hid
[23568.718821] usb: set_interface_count next_interface_id=3
[23568.727952] android_usb gadget: high-speed config #1:
android [23568.728012] usb: set_config e Function FS
Gadget[0] [23568.728068] usb: set_config e hid[1]
[23568.728135] usb: set_config e hid[2] [23568.728190] usb:
SET_CON [23568.728217] usb: set_config_number single config
num=0 [23568.728322] usb: android_work
config=0000000000000000,connected=1,sw_connected=1
[23568.728559] usb: android_work sent uevent
USB_STATE=CONFIGURED [INFO] # Troubleshooting tips - Check
the NetHunter phone is succesfully emulating a keyboard by
connecting it to a computer with a regular charging/data USB
cable. Open a text editor like Notepad and you should see it
sending PINs. Note that you do not need an OTG cable for
this. - Check the Nethunter phone has a regular USB cable
attached, and the locked phone has an OTG adaptor attached.

  • Try using different cables/adaptors. You may have a faulty
    cable/adaptor. - Perform a hard reset of both phones by
    holding down the power button for 20 seconds. - Try this
    command: /system/bin/setprop sys.usb.config hid
    root@kali:~/Android-PIN-Bruteforce#
    _
@urbanadventurer
Copy link
Owner

urbanadventurer commented Jun 23, 2021

From the output it looks like the script is successfully sending keys. The usb-devices command is only used to check whether your cables are connected the wrong way.

Does this problem still occur after rebooting, or plugging and unplugging the cables?

Are you using the config.samsung.s7 config file, for example ./android-pin-bruteforce -c ./config.samsung.s7 crack?

Do you see any PINs being entered into the phone?

What happens if you run /usr/bin/usb-devices in a terminal?

By the way, when you copy and paste output, it is easier to read if you use ``` before and after the text ```.

@Wahaj787
Copy link
Author

Hi
Problem is still the same.... Even after rebooting and changing cables
Yes I also tried ./android-pin-bruteforce -c ./config.samsung.s7 crack but still it's not sending keys.
And /usr/bin/usb-devices return nothing....
Also lsusb is showing nothing

@urbanadventurer
Copy link
Owner

OK.. what happens if you plug a USB keyboard into your Samsung S7?

@Wahaj787
Copy link
Author

Well I dont have a usb keyboard but usb mouse is working fine and wireless keyboard is also working

@urbanadventurer
Copy link
Owner

urbanadventurer commented Jul 8, 2021

What is the make and model of your locked phone?

If you NetHunter is on your Samsung S7 then you do not need to use the config.samsung.s7 config file. The config file is for the locked phone.

@urbanadventurer urbanadventurer changed the title usb-devices script failed Samsung S7. usb-devices script failed Jul 8, 2021
@urbanadventurer urbanadventurer changed the title Samsung S7. usb-devices script failed Locked phone: ? NetHunter phone: Samsung S7. usb-devices script failed Jul 8, 2021
@sneakyx
Copy link

sneakyx commented Aug 30, 2022

I have the same problem with my S5.
It seems, that the folder /usr doesn't exist.

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

3 participants