Cant get ADB in recovery mode, but works in live mode, and so does fastboot

DiamondJohn

Recognized Contributor
Aug 31, 2013
4,775
3,879
243
Sydney
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
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?
 

a1291762

Senior Member
Nov 20, 2012
611
265
93
yasmar.net
What I cannoit get woirking is ADB while in recovery mode
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?
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
4,775
3,879
243
Sydney
Are you sure this is supposed to work with the stock recovery?
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.
 

a1291762

Senior Member
Nov 20, 2012
611
265
93
yasmar.net
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.
Yeah, it certainly seems to be speaking adb...

I didn't think to try...but maybe adb push and pull work?