Sample Header Ad - 728x90

Fastboot recognizes device but unable to flash (stuck with no output) on Ubuntu based systems

3 votes
3 answers
5791 views
I'm trying to flash a custom ROM on my Android smartphone using fastboot on the Ubuntu based Pop!_OS. When trying to flash the recovery, the command does not output anything and is stuck. However I don't face this issue when using Windows 10 with the same hardware.
./fastboot flash recovery recovery.img
Environment: ------------ - ROM: PixelExperience 11 (Plus) (Official for X00TD) - Recovery: Supplied with the ROM - Smartphone: Asus Zenfone Max Pro M1 (X00TD / ZB601KL Variant) - PC:
/////////////                user@pop-os 
             /////////////////////            ------------- 
          ///////*767////////////////         OS: Pop!_OS 20.04 LTS x86_64 
        //////7676767676*//////////////       Host: 80F6 Lenovo B40-80 
       /////76767//7676767//////////////      Kernel: 5.15.8-76051508-generic 
      /////767676///*76767///////////////     Uptime: 54 mins 
     ///////767676///76767.///7676*///////    Packages: 1896 (dpkg), 27 (flatpak) 
    /////////767676//76767///767676////////   Shell: bash 5.0.17 
    //////////76767676767////76767/////////   Resolution: 1366x768 
    ///////////76767676//////7676//////////   DE: GNOME 
    ////////////,7676,///////767///////////   WM: Mutter 
    /////////////*7676///////76////////////   WM Theme: Pop 
    ///////////////7676////////////////////   Theme: Pop-dark [GTK2/3] 
     ///////////////7676///767////////////    Icons: Pop [GTK2/3] 
      //////////////////////'////////////     Terminal: gnome-terminal 
       //////.7676767676767676767,//////      CPU: Intel i5-5200U (4) @ 2.700GHz 
        /////767676767676767676767/////       GPU: Intel HD Graphics 5500 
          ///////////////////////////         Memory: 2679MiB / 7865MiB 
             /////////////////////
                 /////////////
(Also tried, unsuccessfully in the older **Kubuntu 18.04**, with the same result) I've tried using both the system supplied (Ubuntu repository) version of fastboot and the one shipped with Android's platform tools . Installed the system version with sudo apt install android-tools-adb android-tools-fastboot. fastboot Versions: -------------------
user@pop-os:~$ fastboot --version
fastboot version 1:8.1.0+r23-5ubuntu2
Installed as /usr/lib/android-sdk/platform-tools/fastboot
user@pop-os:~/Android/platform-tools$ ./fastboot --version
fastboot version 31.0.3-7562133
Installed as /home/user/Android/platform-tools/fastboot
Prerequisites: -------------- Have configured udev rules as shown below (to avoid "no permission" error when running fastboot without sudo)
#/etc/udev/rules.d/51-android.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
And added current user to the 'plugdev' group with sudo usermod -aG plugdev $LOGNAME Issue: ------ After rebooting into fastboot mode through either the hardware keys (VOLUME UP + POWER) or the command ./adb reboot bootloader, my device is recognized by fastboot.
user@pop-os:~/Android/platform-tools$ ./fastboot devices
XXXXXXXX04HP	fastboot
**But when I try to flash the recovery, the command gives no output and is stuck**
user@pop-os:~/Android/platform-tools$ ./fastboot flash recovery recovery.img
And just when I unplug the device from the PC, it gives an error
user@pop-os:~/Android/platform-tools$ ./fastboot flash recovery recovery.img
Sending 'recovery' (21517 KB)                      FAILED (Write to device failed (No such device))
fastboot: error: Command failed
Conclusion: ----------- As recommended in the hyperlinked guide and many other resources, I have tried using different USB ports (both 2.0 & 3.0), different cables and, as mentioned, different PC and version of Ubuntu. Nothing resolved the issue. **However, using Windows 10 with the same PC (its dual-booted), USB port, cable and the mobile device, I was able to successfully flash the recovery and, later, also the ROM.** There are similar questions to this one on other StackExchange sites, with some whose accepted answers are not very helpful and most of them are old. Besides, as advised by [@alecxs](https://unix.stackexchange.com/users/237864/alecxs) here , this issue seems to be specific to Linux based systems. I would really appreciate some help with this. Thanks in advance for your inputs. Attachments: ------------ 1. [dmesg grep usb](https://pastebin.com/THgdQPiG) 2. [dmesg alert,crit,err,warn](https://pastebin.com/zCNEAUGm)
Asked by Syed Adil (31 rep)
Dec 30, 2021, 10:57 PM
Last activity: May 24, 2024, 02:26 AM