ADB only detecting device in normal mode

Hello,

I am currently using android 9 that I flashed from sailfishOS so I can then flash /e/. I am using an Xperia XA2.

I am trying to use adb to install a custom recovery (and also fixing a wifi issue that I hope is unrelated) but the device is never detected when in recovery mode, only in normal boot. When typing adb reboot bootloader or adb reboot recovery it just reboots to the normal mode.

I have checked usb debugging, the device is oem unlocked and typing adb shell getprop lets me know that ro.adb.secure = 1 and ro.debuggable = 0.

From what I understand from this forum page, that means that the stock recovery will not give me access when in recovery. Can someone confirm?

If so, is there a way of flashing a custom recovery without adb? Or is it possible to modify the stock recovery?

Thank you in advance :slight_smile:

adb is not the right tool to flash a custom recovery, but fastboot is.

Install /e/OS on a Sony Xperia XA2 - “pioneer”

Oh yeah thanks. That makes sense. I think I am having trouble understanding where the issues are because of a series a unrelated problems.

Now when typing fastboot devices it returns ????????? XFL instead of the serial number.

I have seen some people recommending updating usb drivers for windows but I’m on linux. I have also tried restricting to USB 2.0 through the bios.

1 Like

Oh nevermind. I think I have been at this for too long and my brain is utterly fried. I have been repeatedly booting it into the wrong mode… The problem is “fixed” (or is still sitting behind the screen maybe). Thanks for the help piero

1 Like

Well it seems like my troubles aren’t over. I can now flash e-recovery on the phone and access it normally but trying to do anything with adb returns

adb: device unauthorized.This adb server’s $ADB_VENDOR_KEYS is not set

And attempting to reboot from here just bootloops the phone. Even worse, if I attempt to go back to recovery afterwards it corrupts the OS. I have had to to reflash stock android twice.

I’ve tried to change the slot on which e-recovery gets flashed but still doesn’t work.

Perhaps try to get back in business with Fix unauthorized device error in adb.

You are following Install /e/OS on a Sony Xperia XA2 - “pioneer”?

Some extra suggestions here Sony - Xperia XA2 - pioneer - Documentation Suggestions.

Oh ok. I completely missed the “enable adb” setting in the e-recovery menu.

I could have just followed the install guide from beginning to end but I was trying to use it to prepare for flashing /e/ as well as helping to fix another unrelated issue and that got me really confused… Lessons learned.

Thank you so much for your help, both of you. :slight_smile: