Cant get ADB in recovery mode, but works in live mode, and so does fastboot - Google Pixel 4a Guides, News, & Discussion

On my Rooted Pixel 4a, I can use:
Fastboot - I flashed the latest update firmware as well as the rooted boot image
ADB Over WiFi - This is the most comnon way I connect for ADB
ADB While the Android OS is running
What I cannoit get woirking is ADB while in recovery mode,
If I go to recovery and connect via a high quality cable, I can see the device with
Code:
adb devices
C:\Java\x86\Android\android-sdk\platform-tools>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
091????????490 rescue
Click to expand...
Click to collapse
But none of the below works
Code:
>adb shell
error: closed
>adb connect 091XXXXXXXX490
cannot resolve host '091XXXXXXXX490' and port 5555: No such host is known. (11001)
>adv shell 091XXXXXXXX490
error: closed
What am I doing wrong? how can I connect in recovery?

Stock recovery?

WillisD said:
Stock recovery?
Click to expand...
Click to collapse
Yes.

DiamondJohn said:
What I cannoit get woirking is ADB while in recovery mode
Click to expand...
Click to collapse
I always thought that adb from recovery was a TWRP thing?
I did adb reboot recovery. My phone has an Android on its back, with "No command" on the screen.
Code:
$ adb devices
List of devices attached
xxx unauthorized
$ adb shell
adb: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I got the same thing booting to recovery by holding Vol down at boot.
Booting to rescue (another option on the boot menu) got me the same thing on my screen and the same symptom you saw.
Code:
$ adb devices
List of devices attached
xxx rescue
$ adb shell
error: closed
Are you sure this is supposed to work with the stock recovery?

a1291762 said:
Are you sure this is supposed to work with the stock recovery?
Click to expand...
Click to collapse
Actually no, i guess it was an assumption, and the response to adb devices, gave me further hope.
However,, it does respnod to ADB. As is seen, it provides a list of devices. But, maybe one can't shell out while in stock recpvery. Which goves me an idea, maybe we can send commands from the command window in windows/linux. eg adb shell ls But it wouldn't make sense that it would allow root, which negates what I wanted to be able to do in the first place. ie recovery from a bootloop by selectively editing the data partition. in my previous case, it was to disable a single magisk module.

DiamondJohn said:
It wouldn't make sense that it would allow root, which negates what I wanted to be able to do in the first place. ie recovery from a bootloop by selectively editing the data partition. in my previous case, it was to disable a single magisk module.
Click to expand...
Click to collapse
Yeah, it certainly seems to be speaking adb...
I didn't think to try...but maybe adb push and pull work?

Related

[Q] Looking for a way to turn on USB Debugging on phone w/ smashed screen

Hi,
was using this guide online to try to recover and move stuff around in my Nexus5 while it is broken as far as i know this is a LCD problem not a digitiser problem.
http://www.techlife.net/2014/09/access-your-android-device-after-breaking-your-screen.html/
http://forum.xda-developers.com/showthread.php?t=2786395
ran into a problem that I can't turn on USB Debugging on my phone without being able to see what i am pressing.
According to the end of the guide it told me to flash a kernel with USB debugging enabled by default but I am unsure of what this means.
Rooted: No (I dont mind if i have to)
Fastboot: No idea
Installed ADB on computer: Yes
The custom kernel will need to have USB debugging ON by default/on boot. Usually through a custom initrc.
If you manage to get rooted, you could try:
androidscreencast
- Flash TWRP if you haven't already
- boot to recovery
- adb shell
- mount system
- edit build.prop
- reboot
- figure out adbkey.pub stuff
I have gone the same way, but could not get a screen display. It was on my wife's Gnex though. The rest works.
Now to get debian or something installed...ultralow power wireless server.
You need to install ADB/Fastboot to your PC
GO HERE
Then you can
Enable usb debugging via recovery using the following ABD commands:
Adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop"
reboot
joegestes said:
You need to install ADB/Fastboot to your PC
GO HERE
Then you can
Enable usb debugging via recovery using the following ABD commands:
Adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop"
reboot
Click to expand...
Click to collapse
OP, try this.
The two previous posts are forgetting you need usb debugging before you can adb shell.
Booting to recovery gives you access to your system and build.prop.
Bubble-be said:
The two previous posts are forgetting you need usb debugging before you can adb shell.
Booting to recovery gives you access to your system and build.prop.
Click to expand...
Click to collapse
recoveries have adbd enabled by default. what we're doing here is making the OS have adbd enabled.
Yes, we're on the same page there.
You can't just adb to your device to enable adb, get it ?
You need a way to access build.prop out of android, so booting to recovery will allow you this.
Just dugg up the link for the adbkey as well. http://forum.xda-developers.com/showthread.php?t=2408802
get a USB OTG cable and connect your mouse to your phone
Bubble-be said:
Yes, we're on the same page there.
You can't just adb to your device to enable adb, get it ?
You need a way to access build.prop out of android, so booting to recovery will allow you this.
Just dugg up the link for the adbkey as well. http://forum.xda-developers.com/showthread.php?t=2408802
Click to expand...
Click to collapse
Huh...
Even if display isn't coming on... You can 3bc to fastboot, press down twice (iirc) and press power. wait a few secs, custom recovery should be running.
`adb shell` .. out of android, adb running. profit.
I think the OP is not rooted, nor does he have a custom recovery.
In that case you will need boot temporarily into a custom recovery that will allow root ADB shell access.
Download the TWRP recovery image to you PC.
HERE
For simplicity, rename the file recovery.img
Place the renamed file in your \sdk\platform-tools folder on PC.
Turn off you phone and then hold volume up button while pressing power button to get into fastboot mode.
Then, open a command prompt from within the platform-tools folder and run the following command:
fastboot boot recovery.img
Your phone should reboot into TWRP recovery.
You can then run the ADB commands outlined in my first post to enable usb debugging:
Adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop"
reboot
Best of luck
Bubble-be said:
The two previous posts are forgetting you need usb debugging before you can adb shell.
Booting to recovery gives you access to your system and build.prop.
Click to expand...
Click to collapse
This is incorrect.
I do not need usb debugging enabled to run ADB shell in custom recovery.
Bubble-be said:
Yes, we're on the same page there.
You can't just adb to your device to enable adb, get it ?
You need a way to access build.prop out of android, so booting to recovery will allow you this.
Just dugg up the link for the adbkey as well. http://forum.xda-developers.com/showthread.php?t=2408802
Click to expand...
Click to collapse
Huh
My post clearly stated via recovery
---------- Post added at 06:31 PM ---------- Previous post was at 06:13 PM ----------
4n3ver said:
get a USB OTG cable and connect your mouse to your phone
Click to expand...
Click to collapse
I've never tried this, but think you need to be rooted and install some hacks to get a mouse
to work via OTG.
Hello again,
Thanks for all the replies so far.
Unfortunately i'm still unable to enable USB debugging.
I'm getting stuck, I have managed to install adb and fast boot using the 15 second thing but am unable to get it to detect via "adb devices" and am currently troubleshooting this step
I can't upload images so i'm just gonna type what it says
Code:
C:\Users\blah> fastboot boot recovery.img
<waiting for device >
^C
C:\Users\blah> adb devices
List of devices attached
C:\Users\blah>
probably something to do with how my adb drivers are installed
Just to clarify my screen is impossible to use as its just coloured lines due to cracks in the LCD screen.
Hopefully all goes well and i'll be able to fastboot TWRP with the instructions you guys have given me.
fuzznuzz said:
Hello again,
Thanks for all the replies so far.
Unfortunately i'm still unable to enable USB debugging.
I'm getting stuck, I have managed to install adb and fast boot using the 15 second thing but am unable to get it to detect via "adb devices" and am currently troubleshooting this step
I
Click to expand...
Click to collapse
Your welcome.
It's probably just simple a driver issue. You will need to look in Device manager on PC while phone is connected.
Download the howto_driver.zip from the "15 seconds ADB Installer thread" and follow the picture tutorial contained in the zip file. This should fix your connectivity issues:good:
---------- Post added at 03:23 AM ---------- Previous post was at 02:58 AM ----------
If it helps, I don't have the "Android Bootloader Interface" driver option. So for me,
selecting "Android Composite ADB Interface" allows me to detect my Nexus5 in both ADB and Fastboot mode.
Keep in mind, my OS Win7 64bit and my 64 bit ADBdriver package may be entirely different than yours.
Okay i'm having some other problems now
can anyone help?
fuzznuzz said:
Okay i'm having some other problems now
can anyone help?
Click to expand...
Click to collapse
Your bootloader is locked.
Sent from my Nexus 5 using XDA Free mobile app
fuzznuzz said:
Okay i'm having some other problems now
can anyone help?
Click to expand...
Click to collapse
Locked bootloader
It is the first question I or anyone replying should have asked you.
Unfortunately, as far as I know, it's game over recovering any user data with
a busted non-viewable LCD, no USB debugging and a locked bootloader.
Unless, you can by some luck, miracle or Power of the Force, pull off using your touchscreen to enable USB debugging.
Then you could use Simple ADB Backup or Holo Backup to get your data.
If not and your data is important enough to you, then replacing the screen would be your last option.
Worth replacing IMHO because your Nexus 5 is still a really great phone with nice specs and plenty of power.
Found one HERE shipped from China for $46.76 or HERE from USA $69.99 from US on ebay.
didn't work
joegestes said:
You need to install ADB/Fastboot to your PC
GO HERE
Then you can
Enable usb debugging via recovery using the following ABD commands:
Adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop"
reboot
Click to expand...
Click to collapse
i followed all these steps and adb devices shows nothing while phone is in recovery mode
fastboot devices shows my phone when in fastboot mode
just adb not working
help asap please
halo_95 said:
i followed all these steps and adb devices shows nothing while phone is in recovery mode
fastboot devices shows my phone when in fastboot mode
just adb not working
help asap please
Click to expand...
Click to collapse
Do you have a stock recovery or a custom one?
You'll need to boot a custom recovery, not the stock recovery.
Now that you don't have to install the custom recovery, just boot it.

ADB not recognized

So I finally undated my PC from Ubuntu 12.04 to 16.04. The good new is I have full MTP access to my G3 now. However, ADB is no longer recognized. ADB and Fastboot are located on a separate drive from the OS, so I am trying to run the same file from the same HD. Any suggestions?
You need to run adb in root. Are you doing that?
Sent from my SM-T530NU using XDA-Developers mobile app
How are you trying to use ADB? It doesn't work when your phone is on fastboot mode
Tel864 said:
You need to run adb in root. Are you doing that?
Sent from my SM-T530NU using XDA-Developers mobile app
Click to expand...
Click to collapse
I did try that without success even though I successfully ran ADB without root with 12.04. Only Fastboot needed root.
For some reason the file is not recognized as an executable file. Below is a screen copy:
Code:
$ ls
adb fastboot twrp-osprey-3.0.0-r2.img
commands.txt twrp-osprey-2.8.7-r5.img twrp-osprey-3.0.2-r1.img
$ adb
The program 'adb' can be found in the following packages:
* adb
* android-tools-adb
Try: sudo apt install <selected package>
$
Henriquefeira said:
How are you trying to use ADB? It doesn't work when your phone is on fastboot mode
Click to expand...
Click to collapse
I have not even got that far. See post above, "adb" is not recognized. I would rather not install the adb development package if I can avoid it.
Its fastboot flash recovery not adb flash
Henriquefeira said:
Its fastboot flash recovery not adb flash
Click to expand...
Click to collapse
The commands is not my issue. I have a list of commands I have run successfully many times. My issue is with the new OS (in the same PC) not recognizing adb. When I boot to the old OS, no issue, back to the new OS, command is not recognized..
My list of commands is as follows:
Code:
adb devices
adb reboot bootloader
sudo fastboot devices
sudo fastboot boot twrp-osprey-3.0.2-r1.img
Henriquefeira said:
Its fastboot flash recovery not adb flash
Click to expand...
Click to collapse
Re-reading your reply, I think you mis-read my code box. Next to the dollar sign my command "ls". Below is the OS response. Next $, command is "adb", and below the OS response.
I figured it out. So in Ubuntu 16.04 my command needs to be:
"./adb"
where in 12.04 "adb" worked.
MrTooPhone said:
I figured it out. So in Ubuntu 16.04 my command needs to be:
"./adb"
where in 12.04 "adb" worked.
Click to expand...
Click to collapse
This implies execution from the current directory... Are you sure you don't have multiple 'adb' executables installed? Check the command 'which adb' to see.
Sent from my MotoG3 using Tapatalk
acejavelin said:
This implies execution from the current directory... Are you sure you don't have multiple 'adb' executables installed? Check the command 'which adb' to see.
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
Pretty sure I had multiple 'adb' executables in 12.04.
i really could use some help friends im having problems with adb on windows when my device is on adb can see it of course
C:\adb>adb devices
List of devices attached
ZY22236P94 device
the problem is when its in bootloader mode adb cant seem to see it i have all drivers installed and i cant understand why im getting this error i want to install a recovery and i cant i currently have know recovery installed and i really need to rest my phone cause of a lot of software issus this is the message that get when bootloader mode
C:\adb>adb devices
List of devices attached
it shows nothing attached on windows devices manager it shows motorola adb interface connectad and running fine so i cant understand what im doing wrong please i really need some help here mates
steffano said:
i really could use some help friends im having problems with adb on windows when my device is on adb can see it of course
C:\adb>adb devices
List of devices attached
ZY22236P94 device
the problem is when its in bootloader mode adb cant seem to see it i have all drivers installed and i cant understand why im getting this error i want to install a recovery and i cant i currently have know recovery installed and i really need to rest my phone cause of a lot of software issus this is the message that get when bootloader mode
C:\adb>adb devices
List of devices attached
it shows nothing attached on windows devices manager it shows motorola adb interface connectad and running fine so i cant understand what im doing wrong please i really need some help here mates
Click to expand...
Click to collapse
adb doesn't work in bootloader mode, that is when you use fastboot... I think you should review the process involved in installing recovery.
Sent from my MotoG3 using Tapatalk

Android 10 ADB

Hey guys so question.
Is ADB broken with Android 10 at the moment? I updated through the installer.
Now when I get on fastboot mode and type fastboot devices, I see my phone poop up. But I can't see ADB devices it gives me a no devices found.
*ADB debugging is on
If I do ADB reboot bootloader while the phone is on, it works and it also gives me the device under list when I type it while the phone is on.
Any of you have seen this?
I'm trying to disable some apps through ADB but when the
Cj214 said:
Hey guys so question.
Is ADB broken with Android 10 at the moment? I updated through the installer.
Now when I get on fastboot mode and type fastboot devices, I see my phone poop up. But I can't see ADB devices it gives me a no devices found.
*ADB debugging is on
If I do ADB reboot bootloader while the phone is on, it works and it also gives me the device under list when I type it while the phone is on.
Any of you have seen this?
I'm trying to disable some apps through ADB but when the
Click to expand...
Click to collapse
You can't see the device while on fastboot mode of you type adb devices.
You need to make sure debugging is on in the developer preferences.
ADB appears to be working just fine for me.
When using adb make sure you have debugging enabled and grant the popup on screen
adb is not fastboot. You can use adb on twrp or booted system. Fastboot is on bootloader mode.
Also need to make sure that the proper USB drivers on the computer are installed/updated.
Cj214 said:
Hey guys so question.
Is ADB broken with Android 10 at the moment? I updated through the installer.
Now when I get on fastboot mode and type fastboot devices, I see my phone poop up. But I can't see ADB devices it gives me a no devices found.
*ADB debugging is on
If I do ADB reboot bootloader while the phone is on, it works and it also gives me the device under list when I type it while the phone is on.
Any of you have seen this?
Click to expand...
Click to collapse
This is working exactly as intended, and not exclusive to Android 10, but rather has been the case as long as I can remember (Jelly Bean? KitKat? Maybe much earlier?):
adb: Only works when booted to OS or in TWRP. Debugging required to be toggle on in phone settings. Does not work in bootloader-fastboot mode.
fastboot: Only works in bootloader-fastboot mode. Debugging is not required to be toggled on.
D:\OnePlus3\Fastboot>adb sideload stock7.zip
opening 'stock7.zip'...
connecting...
adb server version (40) doesn't match this client (39); killing...
* daemon started successfully *
falling back to older sideload method...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Thats what adb gives to me...
Bringer1 said:
D:\OnePlus3\Fastboot>adb sideload stock7.zip
opening 'stock7.zip'...
connecting...
adb server version (40) doesn't match this client (39); killing...
* daemon started successfully *
falling back to older sideload method...
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Thats what adb gives to me...
Click to expand...
Click to collapse
Sounds like another adb server is still running. What does adb kill-server and then trying again do
a second adb server was running.
TNX
Can I mount system rw using adb enabled recovery img from the following link:
https://forum.xda-developers.com/7t-pro/development/recovery-oxygen-os-stock-recovery-adb-t3991865

How to escape TWRP? Activate ADB w/ broken screen?

So my screen broke on my Note 10+, leaving only the top 15% with display and the bottom 60% with touch. I am trying to activate ADB on it so that I can backup my internal storage.
I booted into TWRP so that I could backup the rest of my system, which I did successfully, but because of the bad touch screen I am unable to hit the ADB side load button. I'd like to reboot into the system because I have ADB enabled there, however I also cannot click the reboot to system button, only reboot to download and shutdown. Since I can't see most of the screen, it is also not possible to access the terminal and work from there.
Anybody know how I can escape TWRP or otherwise activate ADB? Thanks for the help.
Once USB Debugging successfully got enabled on Android device, ADB is supported as soon as device successfully booted up.
To turn device into ADB Sideload mode you run commands
Code:
adb devices
adb reboot sideload
jwoegerbauer said:
Once USB Debugging successfully got enabled on Android device, ADB is supported as soon as device successfully booted up.
To turn device into ADB Sideload mode you run commands
Code:
adb devices
adb reboot sideload
Click to expand...
Click to collapse
Like I said, I'm unable to boot into the system right now because I am stuck in TWRP. ADB is not enabled in TWRP upon boot, you have to press the ADB side load button, which I am unable to do.
AllanRSS said:
Like I said, I'm unable to boot into the system right now because I am stuck in TWRP. ADB is not enabled in TWRP upon boot, you have to press the ADB side load button, which I am unable to do.
Click to expand...
Click to collapse
To boot into NORMAL mode ( i.e. ADB mode ) you enter on Windows command prompt these commands, one-by-one
Code:
adb devices
adb reboot
jwoegerbauer said:
To boot into NORMAL mode ( i.e. ADB mode ) you enter on Windows command prompt these commands, one-by-one
Code:
adb devices
adb reboot
Click to expand...
Click to collapse
I can not use ADB. It is for this very reason I am asking how to enable ADB. But thank you for these valuable ADB commands, I'll be sure to reboot my system once I enable ADB

Question Write to /data/... folder

I just switched to the Pixel 6a and have botched something with an app I use.
I have the app's files from the old phone, which were in /data/data/com... folder, and want to overwrite files on the new phone, with them.
I did "adb pull ..." on the old phone to get files on the computer and intended to do "adb push ..." to the new,
but I can't get it to connect to adb, in recovery mode.
The old phone had TWRP.
When I rebooted it into recovery and connected with cable to PC, "adb devices" would print:
List of devices attached
<device_ID> recovery
On the new one, when I go into recovery (stock), "adb devices" prints nothing.
When I select the sideload option, "adb devices" prints:
<device_ID> sideload
In this sideload mode, the pull, push, shell... adb commands don't work.
How can I get the Pixel 6a to connect to the computer so that "adb devices" prints:
<device_ID> recovery
?
Stock recovery isn't TWRP! You have no access to anything in your file system.
Svrmirac said:
How can I get the Pixel 6a to connect to the computer so that "adb devices" prints:
<device_ID> recovery
?
Click to expand...
Click to collapse
Use TWRP. Stock recovery has no adbd, only a minimal adbd with no features except a sideload option for signed update.zips
Thank you for the suggestion, @WoKoschekk, but I don't think I can do that.
If I understand correctly, I have to unlock the bootloader to load TWRP.
With an unlocked bootloader, my banking app stops working, which is unacceptable,
and re-locking it apparently wipes all data, which I just jumped through hoops overwriting.
I seem to be at an impasse, with the stock ROM/recovery.
Svrmirac said:
If I understand correctly, I have to unlock the bootloader to load TWRP.
With an unlocked bootloader, my banking app stops working, which is unacceptable,
and re-locking it apparently wipes all data, which I just jumped through hoops overwriting.
Click to expand...
Click to collapse
Yes, (un-)locking wipes all data. But that is exactly the reason why /data is inaccessible from recovery. To keep your data safe.
I don't even think TWRP is a thing for modern pixels
ctfrommn said:
I don't even think TWRP is a thing for modern pixels
Click to expand...
Click to collapse
No it isn't the closing thing you'll find to TWRP on Pixel 6A is the Lineage Recovery.
I would suggest using a tool like Titanium Backup. That allows the saving and reinstating of apps.
Booting a custom recovery requires unlocking the bootlader, which I don't want to do now.
Titanium backup requires rooting as well...
Thank you for the suggestions but I'm counting this one as lost.
You won't be able to directly write to the /data/data/com.your.packagename folder without root. The only options I can think of are
1. Using adb backup... backup your app data from your old phone and restore it to the new phone
Bash:
To backup
# adb backup -noapk com.your.packagename -f backup.adb
To restore
# adb restore backup.adb
2. If the app in question is debuggable, you can assume the application permission and access the folder
Bash:
# adb shell
bluejay:/ $ run-as com.your.packagename
bluejay:/ $ cp -r /storage/emulated/0/Download/backup/* /data/data/com.your.packagename

Categories

Resources