1

This is a self answered question that is different and may save hours of frustration to somebody

Related questions but none that helped

My situation

  • After more than 6 months I thought of updating security patches on my Pixel 4a Android 11 (stock) and root it again.

  • I uninstalled Magisk , applied OTA update , extracted boot image and patched it with magisk (see this). All smooth

Problem

I needed to run fastboot flash boot patched.img to root the device. But when I run the command response is <waiting for any device>, which was strange since adb devices shows device serial.

Things tried, without any luck

  • Updated adb on Lint Minux, it was latest

  • Switched to Windows 10 and updated

  • Andrew in chat pointed to an XDA thread, which was better covered by Izzy here How do I get my device detected by ADB on Linux?. Added udev rule but then no dice.

  • Firelord in chat suggested it could be plugdev issue so tried the solution mentioned in this Stack Overflow question adb devices => no permissions (user in plugdev group; are your udev rules wrong?), though the problem wasn't similar

  • Multiple cables , rebooting Android, Windows, Linux when I was at a loss to figure out

  • Variations of fastboot like fastboot flash boot_a patched.img, fastboot flash boot --slot all patched.img and sudo fastboot devices

Finally, the solution ....

0
1

I have now idea why this worked. Before running fastboot commands rebooted device in download mode:

  • adb reboot bootloader to get into fastboot
  • fastboot devices shows device serial
  • fastboot flash boot patched.img works :)
  • fastboot reboot to get back to normal device state
  • Device is rooted and I see su permission requests

Note: Some devices of LG and Samsung lack fastboot functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.