• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help ADB Question

Lana30

Android Enthusiast
Aug 11, 2015
336
48
Hi Friends,
If after entering the appropriate commands you get a message that says that all commands have executed successfully, but the phone is still not unlocked (not from carrier unlocked..the other unlocked when trying to get into your phone since you can´t access it through the display), will turning off USB debugging and then turning back on help? If not what will? Thanks.
 
If you can't access the display, how are you going to turn USB Debugging off?

You can't turn it off whilst connected via USB and even if you could, you couldn't use ADB to turn it on again as ADB requires USB Debugging to work properly.
It was just a horrible guess, ha ha. If everything was entered correctly and nothing happens, what do you think could fix it?
 
  • Like
Reactions: El Presidente
Upvote 0
Thank you for your links, but from what I could understand, I could see anything where everything was entered correctly and it still didn´t work. What do you think could be the problem.
 
Upvote 0
Thank you for your links, but from what I could understand, I could see anything where everything was entered correctly and it still didn´t work. What do you think could be the problem.

LOL, those are YOUR links ;) :D :).

I'm not sure I understand enough about what problem your asking about in this new adb thread...are you talking/asking about unlocking the bootloader or unlocking the screen (I'm guessing that's not it since you indicate that the display is not "on") or something else altogether?

Details, please--error / warning messages, screenshots, etc...the more information the better.

:)
 
  • Like
Reactions: El Presidente
Upvote 0
LOL, those are YOUR links ;) :D :).

I'm not sure I understand enough about what problem your asking about in this new adb thread...are you talking/asking about unlocking the bootloader or unlocking the screen (I'm guessing that's not it since you indicate that the display is not "on") or something else altogether?

Details, please--error / warning messages, screenshots, etc...the more information the better.

:)

Hi..Ia m trying to unlock a friends phone with a dead screen and from what he has told me there is no error message. He can see the icon his my computer window but when he clicks the phone icon you can only see a blank window will popup.
 
Upvote 0
Aha! It looks like you're trying to enter the lockscreen pin via adb and the "input" utility...

I can't replicate that here at work but can try when I get home...it could be that you're using the wrong pin code (just a quick guess).
I will check the pin, but yes if you could replicate that would the a lot to me, Thanks. :)
 
Upvote 0
Aha! It looks like you're trying to enter the lockscreen pin via adb and the "input" utility...

I can't replicate that here at work but can try when I get home...it could be that you're using the wrong pin code (just a quick guess).
Hi..I looked..what pin is that?? I don´t recall putting in a pin..I thought that was it, but no...I know you can´t check now at work, so I will wait for your answer. Thanks.
 
Upvote 0
Hi..I looked..what pin is that?? I don´t recall putting in a pin..I thought that was it, but no...I know you can´t check now at work, so I will wait for your answer. Thanks.

The pin would be "1234" from the "adb shell input text 1234" reference.

Are you somehow using an Android virtual device (i.e., emulator) with regard to this?
 
Upvote 0
The pin would be "1234" from the "adb shell input text 1234" reference.

Are you somehow using an Android virtual device (i.e., emulator) with regard to this?
I´m such a dork...I think I know what I did wrong..in the guide I was reading it said to replace 1234 with my actual password...1234 was just to fill in..that´s it ,huh?
 
Upvote 0
I´m such a dork...I think I know what I did wrong..in the guide I was reading it said to replace 1234 with my actual password...1234 was just to fill in..that´s it ,huh?

Well, possibly--but if you're just doing this with an emulator (virtual device), all you'll be done would be trying to unlock a lockscreen on an emulator...
 
Upvote 0
Well as Scary says, the "emulator" response looks wrong. And I can confirm directly that I don't get that.

I've been trying this myself just now and can't make it work. I tried using keycode 160 (keypad enter) rather than 66 (enter), and even trying to enter the PIN through a series of keycodes (144 = keypad 0, 145 = keypad 1, etc, or 7 = keycode_0, 8 = keycode_1, etc), but I couldn't get that to work either way. Indeed the screen would time out while I was trying to enter them, so it didn't appear to be recognising either a presses on the PIN keypad. Codes were definitely received though, as keycode 26 (power button) woke the screen just fine.
 
  • Like
Reactions: scary alien
Upvote 0
Well, I actually got this to work! :)

c:\> adb shell
$ input keyevent 26; input keyevent 66; input text 1234; input keyevent 66
$ exit

This was from a screen-off state.

I had changed my lockscreen to use a PIN code of 1234 to unlock before starting this.

I think this will work at a Windows Command (DOS) Prompt:

c:\>adb shell input keyevent 26 & adb shell input keyevent 66 & adb shell input text 1234 & adb shell input keyevent 66

I can't test that at the moment...once I started testing in a Cygwin window my MS/DOS window will no longer see my adb device as on-line :( :mad: [Cygwin still does, though :thinking: :eek:].

Anyway, proof-of-concept: works!
 
  • Like
Reactions: Hadron
Upvote 0
Well, I actually got this to work! :)

c:\> adb shell
$ input keyevent 26; input keyevent 66; input text 1234; input keyevent 66
$ exit

This was from a screen-off state.

I had changed my lockscreen to use a PIN code of 1234 to unlock before starting this.

I think this will work at a Windows Command (DOS) Prompt:

c:\>adb shell input keyevent 26 & adb shell input keyevent 66 & adb shell input text 1234 & adb shell input keyevent 66

I can't test that at the moment...once I started testing in a Cygwin window my MS/DOS window will no longer see my adb device as on-line :( :mad: [Cygwin still does, though :thinking: :eek:].

Anyway, proof-of-concept: works!
I´m Sorry If me having a hard time understanding annoys you (not that you have said anything that has given me that impression, not at all)...:(..I have been reading as much as I can and trying to understand as much as I can, but some things are harder than others. I just wanted to say that first.

Like I said before it actually connected once about 2 days ago but the next day when I tried to connect it again to try and copy some more data, the icon comes up, but there is no data in shown in my PC. Why would it work once and the not work all of a sudden? I will definitely study these note for future reference, but for now could you tell me of this has an easy fix and what I would need to enter in order to get this working again? Thanks a lot, really for your time and effort in solving this mystery.
 
Upvote 0
Don't know that there's any easy fix here I"m afraid, Lana.

Not sure why something would have worked before that didn't / doesn't now...we would actually need more details from you about exactly what what tried and what results were seen/reported (i.e., the commands entered, the messages displayed, screenshots if possible, etc.).

Since we're not physically there, we need you to be our eyes and ears to help us help you :).
 
Upvote 0
Don't know that there's any easy fix here I"m afraid, Lana.

Not sure why something would have worked before that didn't / doesn't now...we would actually need more details from you about exactly what what tried and what results were seen/reported (i.e., the commands entered, the messages displayed, screenshots if possible, etc.).

Since we're not physically there, we need you to be our eyes and ears to help us help you :).
I understand..if it helps these are the steps that were followed:
Step 1
Download and install the Android SDK package on your PC. You can get the package here. Once downloaded, extract it on your PC.

Step 2
If you don’t already have USB drivers installed on your PC, get them from your manufacturer’s official website.

Step 3
Open Command Prompt on your PC and type in the following command.

cd C:/android/platform-tools

Step 4
Connect your Android phone or tablet to your PC using a micro USB cable and type in the following command to check whether your phone is recognized. You should see some numbers in the Command Prompt message.

adb devices

Step 5
Type in the following two commands. Make sure that you type in the second command immediately after the first one. Replace 1234 in the first command with your actual password.

adb shell input text 1234

shell input keyevent 66

Step 6
Your phone should now be unlocked and you can now backup all your important files on your PC.
 
Upvote 0
From this link: http://joyofandroid.com/unlock-android-device-with-dead-screen/ ? ;) :)

I'm guess what else I'm looking for is what else might have happened (if anything) at each step...did you get any warnings/errors/text, what did the device do when you did step #5 (I could hear my device "click" when tested this), etc...

Altering the above step #5 slightly with the information I posted in post #20 above might help.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones