In this tutorial, we will show you how to flash Stock Firmware via Fastboot Commands on any Android device. The everyday general users are more than contained when they receive an OTA on their Android device. They just hit the Install button, and if the device has an A/B partition, they continue with their work while the installation process is being carried out in the background in the inactive slot. Once that is done, they simply reboot their device to switch slots and enjoy the new update. Samsung device owners are a little bit less lucky and they have to wait for a few minutes until the installation is done.
But anyway, the only effort that the user has to exert in all of these is simply hitting the Install button in the initial phase and the Reboot button in the latter half. However, with the open-source nature of Android, things aren’t so plain and simple. Most of the users go ahead and try out tons of customizations and tweaks. These include the ability to flash custom ROMs, a custom recovery like TWRP, unlock their device bootloader, try out Build. Prop Tweaks, flashing mods from Magisk, and Frameworks of Xposed among others.
And while executing the above steps, there’s always a possibility of things going south. Just a slight miss-step and you will end up with a bootloop or a soft-bricked device. The worst-case scenario will lead to a hard-brick, in which case you will have to take up the EDL Mode route to repair your device. All in all, as and when you end up messing up your device, the first thing that comes to your mind is flashing the stock firmware to make it work back again.
But unfortunately, things in a bricked or boot-looped device works in a slightly different way. Since you cannot access the Android system, you cannot simply install the stock ROM in the “normal” way. Fortunately, there still exists a handy way of doing so. You could still flash the stock firmware of any Android device using fastboot commands. The process is applicable for near about every device running on any chipset (Exynos, Snapdragon, or MediaTek) and of any OEM. So without further ado, here are all the required instructions set.
- How to Install OTA Updates in Rooted Android Device
- How to Permanently Install TWRP without TWRP ZIP File (only using TWRP.img file)
- Root Android Devices Without TWRP Recovery
- [GUIDE] Flash ROMs/Magisk/TWRP/Kernels on A/B Partition Devices
How to Flash Stock Firmware via Fastboot Commands
We are breaking down the entire instructions into simpler steps. Make sure to follow them in the same manner. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
STEP 1: Download Android SDK Platform Tools
First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide.
STEP 2: Boot your device to Fastboot Mode
Next up, you will have to boot your device to Fastboot, or as some OEMs like to call, the Bootloader menu. There are two ways of doing so- via hardware key combinations or using ADB Commands. If your device is in a perfectly working condition, then you could use either of the two methods (though we would recommend opting for the Fastboot Commands).
On the other hand, if your device is stuck in the bootloop/softbrick state and you cannot access the OS, then you have no choice but to go with the hardware key combination method. So without any further ado, let’s check out both these methods (For detailed instructions, you should also refer to our guide on How to Boot any Android Device to Fastboot Mode).
Method 1: When the Device is working normally
If your device is working well and good, then it is advised that you opt for this ADB Command method to boot your device to Fastboot Mode. This is because it is the universal method that works across all Android devices.
- To begin with, enable USB Debugging on your device. Head over to Settings > About Phone > Tap on Build Number 7 times (MIUI Number in case of Xiaomi devices) > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging.
- Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode
adb reboot bootloader
- To verify the Fastboot connection, type in the below command and you should get back the device ID.
Method 2: When Device is Stuck in Bootloop/Bricked
If you cannot access the OS, then you wouldn’t be able to enable USB Debugging. As a result, you wouldn’t be able to execute the adb reboot bootloader command and you would instead have to opt for the hardware key combinations. Now, there doesn’t exist any universal method to do so, but here are the generic instructions that work for most devices:
- To begin with, you will have to power off your device. For that, long-press the Power menu for around 5-6 seconds. This should force-shutdown the device.
- However, if that doesn’t happen, then you will have to wait for the battery to drain out. As soon as that happens, connect your device to the charger and move over to the next step.
- Once the device powers off, press and hold the Power and Volume Up Keys (or Power and Volume Down keys in some devices) and your device should be booted to Fastboot Mode.
STEP 3: Download and Extract Stock Firmware
The next step involves downloading the stock firmware. For that, you could refer to your device’s software download page. There might be other third-party sites as well, but they don’t usually have the updated software package. So the official one is the recommended one. Once you have downloaded it, extract it inside the folder where the Android SDK Platform Tools are installed.
That is, extract it inside the platform-tools folder. However, nowadays, most OEMs pack their firmware under separate packages. For example, OnePlus and Asus use the payload.bin file, Realme and Oppo use OZIP, LG uses KDZ or DZ format, and so on. So please refer to our below-linked guide to extract the firmware corresponding to your device:
- How to Extract payload.bin and get the stock boot image file
- How to Extract KDZ, TOT, or DZ LG Firmware
- Extract Fastboot Images from Realme/Oppo OZIP Firmware
- How to Extract Sony Boot.sin and get the Stock Firmware Files
- How to Extract Motorola PAC Firmware using SPD Flash Tool
Once you have extracted the firmware and got hold of the Fastboot IMG files, proceed with the below manual steps or directly jump over to the list of device-specific Fastboot commands section: Fastboot Command Sheet For Various Android Devices.
- [GUIDE] Flash ROMs/Magisk/TWRP/Kernels on A/B Partition Devices
- Everything About Magisk- Manager, Modules, and More
- How to Install TWRP Recovery on Android
- How to Fix FAILED (remote: unknown command) Error
STEP 4: Flash Stock Firmware via Fastboot
NOTE: This is a manual method to create the Fastboot Commands for your device. Carrying it out would require your precious time, in some cases, even up to 30 minutes. However, if you don’t have much time in hand, then I have also automated the process for most of the Android devices and have also created a sample Fastboot Commands sheet that covers most of the devices. So you could also refer to that as well if you don’t wish to manually carry out this task as of now. Here’s the direct link for both these guides:
- First of all, some OEMs (like Pixel and Xiaomi) make it pretty easy for the end-users and they add a flash-all.bat file (see below image). If the stock ROM that you have extracted has one as well, then simply double click on that file and wait for the process to finish.
- But the thing is not all OEMs are so generous, and if your smartphone falls into the latter category, then you will have to flash the stock firmware via Fastboot Commands.
- For that, extract all the contents of the stock firmware that you have downloaded inside the platform-tools folder.
- Then connect your device (that has been booted to fastboot mode) to the PC via USB cable. As mentioned before, if it has the flash-all.bat file, then simply execute that.
- If it doesn’t have one, then look out for the XML files. There should be something along the lines of servicefile.xml, flashfile.xml, or other similar names. The focus shouldn’t be on the names but rather the contents of that file (see next point).
- In this regard, the XML file holds the file name, type and more importantly the partitions of each of the file that is part of the stock firmware. We could then use this to manually create the fastboot commands and hence flash the stock firmware via it.
- Let’s understand it with the help of an example. Here are two lines from one of the device’s XML files (see below image):
<step MD5="ff8711c8eb5c7fd7559bd79d74b1f4d8" partition="modem_a" operation="flash" filename="modem.bin"/> <step MD5="f31b2994072f47907504776a64bcd842" partition="vbmeta_a" operation="flash" filename="vbmeta.img"/>
- This is enough for us to understand that the modem.bin file has to be flashed in the modem_a partition whereas the vbmeta.img will be flashed in the vbmeta_a slot. This is an example of a dual-slot A/B Partition device, hence you are seeing the ‘a’ keyword in the partition name. Moving on, the flash command for the above two files will then be:
fastboot flash modem_a modem.bin fastboot flash vbmeta_a vbmeta.img.
- Likewise, you could create the fastboot commands for all the stock firmware files using the below syntax:
fastboot flash partition-name file-name-with-extension
- Once you have created the fastboot command list, head over to the platform-tools folder. Type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Now copy-paste all the fastboot commands one by one. It is highly recommended to execute the commands in the same order as mentioned in the XML file, otherwise, it might lead to brick issues.
- Once you have executed all the commands, enter the below code to boot your device to Android system:
That is it. You have successfully flashed the stock firmware manually via the fastboot commands. A huge kudos to you as you have created the entire code-sheet yourself. With that said, we get it that not all OEMs are so developer-friendly, and as a result, you might face issues getting your hand with the XML file. If that is the case, then below we have attached a few sample fastboot commands to flash stock firmware files, that may come in handy.
If that doesn’t work out, the comments section is all yours. Drop-in your device name, the firmware version, and the region as well. If possible please download the entire firmware and send us the screenshot of the same (upload to Imgur, Google Photos, etc and share the link with us in the comments). We will try our best to create the fastboot commands for your device’s stock firmware and then share it with you, either on your email or right here in the comments section.
Unbrick Samsung Devices via Odin
If you have a Samsung device, then you wouldn’t be able to unbrick it via Fastboot Commands. Rather you would need the Odin Tool installed on your PC. After that, you need to download the firmware via Frija Tool or SamMobile site and load it to Odin.
Finally, you will have to boot your device to Download Mode and then flash the firmware via Odin. All this has been explained in our detailed guide, do refer to it: Unbrick Samsung | Flash Stock Firmware via Odin.
Fastboot Unbrick Commands Guides For Various Android Devices
Here is a sample fastboot command sheet. I tried to write down the commands for all frequently used files. The below commands are for A/B partition devices, if your device just has a single partition, you will have to ignore the ‘a’ or ‘b’ keywords. For example, fastboot flash dtb_a dtb.img will change to fastboot flash dtb dtb.img.
Fastboot Commands to Unbrick Pixel Devices
- Restore Pixel/XL to Stock Firmware via Fastboot | Unbrick it
- How to Restore Pixel 2/XL to Stock Firmware via Fastboot | Unbrick it
- Restore Pixel 3/3 XL/3a/3a XL to Stock Firmware via Fastboot | Unbrick it
- Restore Pixel 4/XL/4a to Stock Firmware via Fastboot | Unbrick it
- How to Restore Google Pixel 5 to Stock Firmware via Fastboot | Unbrick it
- How to Flash Pixel 5A Firmware via Fastboot Commands | Unbrick It
- How to Unbrick Google Pixel 6/Pro via Fastboot Commands
Fastboot Commands to Unbrick OnePlus Devices
- Restore OnePlus 6/6T to Stock via Fastboot Commands
- Restore OnePlus 7/7T/7T Pro to Stock via Fastboot Commands
- How to Restore OnePlus 8/8T/8 Pro to Stock via Fastboot Commands
- Restore OnePlus Nord to Stock via Fastboot Commands
- How to Unbrick OnePlus 9/Pro via Fastboot Commands
- How to Unbrick OnePlus Nord N10 5G via Fastboot Commands
Fastboot Commands to Unbrick Xiaomi/Redmi/Mi/Poco Devices
- How to Unbrick Xiaomi Mi A1 via Fastboot Commands
- How to Unbrick Xiaomi Mi A2 via Fastboot Commands
- Unbrick Xiaomi Mi A3 via Fastboot Commands
- How to Unbrick Redmi Note 7/7S via Fastboot Commands
- How to Unbrick Redmi Note 7 Pro via Fastboot Commands
- Unbrick Redmi Note 8 via Fastboot Commands
- How to Unbrick Redmi Note 8 Pro via Fastboot Commands
- How to Unbrick Redmi Note 9 via Fastboot Commands
- Unbrick Redmi Note 9 Pro via Fastboot Commands
- Unbrick Redmi Note 10 Pro/Pro Max via Fastboot Commands
- How to Unbrick Redmi K20/Pro via Fastboot Commands
- Unbrick POCO X2 (phoenixin) via Fastboot Commands
- How to Unbrick Redmi Note 11 via Fastboot Commands
- Unbrick Redmi Note 11 Pro/Pro+ via Fastboot Commands
- How to Unbrick Redmi K40 via Fastboot Commands
- Unbrick Poco X3 Pro via Fastboot Commands
- How to Unbrick Poco F3 via Fastboot Commands
- How to Unbrick Poco M4 Pro via Fastboot Commands
Unbrick Realme Devices via Fastboot Commands
- How to Unbrick Realme X50/ X50 Pro via Fastboot Commands
- Unbrick Realme X3 SuperZoom via Fastboot Commands
- How to Unbrick Realme X2/X2 Pro via Fastboot Commands
- How to Unbrick Realme XT via Fastboot Commands
- Unbrick Realme C11 via Fastboot Commands
- How to Unbrick Realme 6 Pro via Fastboot Commands
- How to Unbrick Realme 5 Pro/5s/5i via Fastboot Commands
- Unbrick Realme 3 Pro via Fastboot Commands
- How to Unbrick Realme 1 via Fastboot Commands
- How to Unbrick Realme 6/6I/6S via SP Flash Tool | Bring it back from Dead
Unbrick Oppo Devices via Fastboot Commands
- How to Unbrick any Oppo Reno Device via Fastboot Commands
- How to Unbrick Oppo Find X Series via Fastboot Commands
- Unbrick Oppo A series via Fastboot Commands
- How to Unbrick Oppo F Series via Fastboot Commands
- How to Unbrick Oppo R Series via Fastboot Commands
Fastboot Commands to Unbrick Motorola Devices
- How to Install Stock Firmware on Motorola G8 Power Lite via Fastboot Commands
- Install Stock Firmware on Motorola G Stylus via Fastboot Commands
- Install Stock Firmware on Motorola G8 Power via Fastboot Commands
- How to Install Stock Firmware on Motorola One Macro via Fastboot Commands
- Install Stock Firmware on Motorola One Zoom via Fastboot Commands
- How to Flash or Install Stock Firmware on Motorola One Hyper via Fastboot Commands
- How to Install Stock Firmware on Motorola One Vision via Fastboot Commands
- Install Stock Firmware via Fastboot Commands on Motorola One Action.
- How to Unbrick Moto G7/ G7 Plus via Fastboot Commands
- How to Unbrick Moto G9 Play via Fastboot Commands
If your device is not part of this list, then please let me know in the comments section below. In the meantime, you could also make use of the below command sheet. Just extract your device’s firmware inside the platform-tools and verify the files that it has. Then use the commands for those sets of files from here.
Fastboot Commands Sheet to Flash Stock Firmware
Here is a sample fastboot command sheet. I tried to write down the commands for all frequently used files. These commands are not for any particular device nor in any particular order. It could come in handy if you wish to flash a file but aren’t sure of that file’s associated fastboot command. Likewise, you could also just download the stock firmware, and rather than extracting and creating the fastboot commands from the XML File, you could refer to the fastboot commands from below and then flash the files using these commands.
Moreover, if you want to flash a file to both the partition, then make sure to specify the partition in the commands as well. For example, if you wish to flash the boot.img to Partition A and B, then the command will be fastboot flash boot_a boot.img and fastboot flash boot_b boot.img. Likewise, you may modify the rest of the commands accordingly, if required. Or ask me via the comments section below.
fastboot flash gpt PGPT fastboot flash preloader preloader.bin fastboot flash lk_a lk.img fastboot flash tee_a tee.img fastboot flash md1img_a md1img.img fastboot erase nvdata fastboot flash spmfw_a spmfw.img fastboot flash scp_a scp.img fastboot flash sspm_a sspm.img fastboot flash cam_vpu1_a cam_vpu1.img fastboot flash cam_vpu2_a cam_vpu2.img fastboot flash cam_vpu3_a cam_vpu3.img fastboot flash vbmeta_a vbmeta.img fastboot flash oem_a oem.img fastboot flash logo_a logo.bin fastboot flash boot_a boot.img fastboot flash dtb_a dtb.img fastboot flash dtbo_a dtbo.img fastboot flash system_a system.img_sparsechunk.0 fastboot flash system_a system.img_sparsechunk.1 fastboot flash system_a system.img_sparsechunk.2 fastboot flash system_a system.img_sparsechunk.3 fastboot flash system_a system.img_sparsechunk.4 fastboot flash system_a system.img_sparsechunk.5 fastboot flash system_a system.img_sparsechunk.6 fastboot flash system_a system.img_sparsechunk.7 fastboot flash system_a system.img_sparsechunk.8 fastboot flash system_a system.img_sparsechunk.9 fastboot flash system_b system_other.img_sparsechunk.0 fastboot flash system_b system_other.img_sparsechunk.1 fastboot flash vendor_a vendor.img_sparsechunk.0 fastboot flash vendor_a vendor.img_sparsechunk.1fastboot flash abl abl.img fastboot flash aop aop.img fastboot flash bluetooth bluetooth.img fastboot flash devcfg devcfg.img fastboot flash dsp dsp.img fastboot flash featenabler featenabler.img fastboot flash hyp hyp.img fastboot flash imagefv imagefv.img fastboot flash keymaster keymaster.img fastboot flash multiimgoem multiimgoem.img fastboot flash qupfw qupfw.img fastboot flash tz tz.img fastboot flash uefisecapp uefisecapp.img fastboot flash xbl xbl.img fastboot flash xbl_config xbl_config.img fastboot flash product product.img fastboot flash system system.img fastboot flash system_ext system_ext.img fastboot flash vendor vendor.img fastboot flash odm odm.imgfastboot flash boot boot.img fastboot flash cpucp cpucp.img fastboot flash dtbo dtbo.img fastboot flash modem modem.img fastboot flash oplusstanvbk oplusstanvbk.img fastboot flash oplus_sec oplus_sec.img fastboot flash qweslicstore qweslicstore.img fastboot flash shrm shrm.img fastboot flash splash splash.img fastboot flash vbmeta vbmeta.img fastboot flash vbmeta_vendor vbmeta_vendor.img fastboot flash vbmeta_system vbmeta_system.img fastboot flash vendor_boot vendor_boot.img fastboot flash vm-bootsys vm-bootsys.imgfastboot flash xbl xbl.elf fastboot flash xblbak xbl.elf fastboot flash xbl_config xbl_config.elf fastboot flash xbl_configbak xbl_config.elf fastboot flash abl abl.elf fastboot flash ablbak abl.elf fastboot flash tz tz.mbn fastboot flash tzbak tz.mbn fastboot flash hyp hyp.mbn fastboot flash hypbak hyp.mbn fastboot flash devcfg devcfg.mbn fastboot flash devcfgbak devcfg.mbn fastboot flash storsec storsec.mbn fastboot flash bluetooth BTFM.bin fastboot flash cmnlib cmnlib.mbn fastboot flash cmnlibbak cmnlib.mbn fastboot flash cmnlib64 cmnlib64.mbn fastboot flash cmnlib64bak cmnlib64.mbn fastboot flash modem NON-HLOS.bin fastboot flash dsp dspso.bin fastboot erase metadata fastboot flash metadata metadata.img fastboot flash keymaster km41.mbn fastboot flash keymasterbak km41.mbn fastboot flash logo logo.img fastboot flash misc misc.img fastboot flash aop aop.mbn fastboot flash aopbak aop.mbn fastboot flash qupfw qupv3fw.elf fastboot flash qupfwbak qupv3fw.elf fastboot flash imagefv imagefv.elf fastboot flash uefisecapp uefi_sec.mbn fastboot flash uefisecappbak uefi_sec.mbn fastboot flash multiimgoem multi_image.mbn fastboot flash super super.img fastboot flash vbmeta vbmeta.img fastboot flash vbmeta_system vbmeta_system.img fastboot flash dtbo dtbo.img fastboot flash cache cache.img fastboot flash userdata userdata.img fastboot flash recovery recovery.img fastboot erase secdata fastboot flash cust cust.img fastboot flash boot boot.img
So this is all from this guide on how to flash stock firmware via fastboot commands. Feel free to drop your queries in the comments section below!
FAQ: Other Methods to Flash Stock Firmware on Android
Apart from the Fastboot Commands method that we have just concluded, there do exist a couple of other methods through which you could flash the stock firmware on your Android device. These are the ADB Sideload and OEM-specific Tool methods. In the ADB Sideload method, you don’t even need to unlock the device’s bootloader and in most cases, it wouldn’t even wipe your data.
However, this method is known to work mostly in the stock environment, such as when you are installing OTA updates on your stock device. Though you could still try out this method in bootloop or bricked device, the only prerequisite is that you should boot your device to Stock Recovery or TWRP Recovery. So if you are willing to try out this method, then you may check out our comprehensive tutorial on How to Use ADB Sideload in Android [Stock and TWRP Recovery].
The other method to flash firmware is via OEM-specific Flash Tool. These include the likes of Mi Flash Tool for Xiaomi devices or Android Flash Tool for Pixel devices. All the tools, irrespective of the device you own, would require your device’s bootloader to be unlocked. This is because these tools will be flashing the partition files to their slots via Fastboot Commands (something that we did manually in the Fastboot Commands method).
And whenever there is flashing takes place, you need to have an unlocked bootloader. Moreover, these tools could also be used in custom development. So you could use these tools to fix bootloop or soft-bricked devices. To try it out, you could refer to our guides corresponding to your devices:
- How to Flash Firmware on Pixel via Android Flash Tool
- Install MIUI Fastboot ROM in Xiaomi, Mi, Redmi, Poco Devices
- Unbrick Motorola and Fix Start-Up Failed without using Lenovo Motorola Smart Assistant
54 thoughts on “How to Flash Stock Firmware via Fastboot Commands”
cant flash vendor gives me write vendor error help ?
Hi mate, try this command and let me know if it worked out or not (make sure that the name of the vendor file is vendor.img and you have placed it inside the platform-tools folder): fastboot flash vendor vendor.img
Why is the b partition not flashed?
Or do I repeat the steps for b partition?
Assume same android version number factory image matched to vanilla aosp version.
Explain how flashing a then rebooting impacts the ACTIVE partition. Is the active relatively a, or are a and b absolute references?
Is active automatically selected?
Pixel 3 XL [NOT verizon]
my rom don’t have any of theses archives (.xml or .bat) and i’m screwed in a brick
Hi Jorge, apologies for the delay. Could you please let me know which device you are using? Or which format do your firmware files have?
Hi. Thank you so much for the wonderfully explicit instructions. I’ve been trying to downgrade a Lenovo Tab M8 FHD from Android 10 to v9, without success. I am able to get the device in fastboot mode, I found (at least) two ROMs with v9, I was able to execute the fastboot flash partname filename.ext individually, and get success “OK” response from fastboot command prompt for each. But upon re-locking the bootloader, and issuing fastboot reboot… it seems nothing was changed on the tablet! It boots right back into a clean install of Android 10! Ugghhh. I’ve also tried using their recovery tool (sneakily replacing their v10 files with my v9’s) for the d/l process. That got the same results. Nada. I’ve also tried SP_Flashtools with the scatter file included in the ROMs, using simple USB debugging connection, but that just caused a boot loop with boot.img signature failure. Any experienced ideas to find success? I have specialty needs apps/widgets that do not work with the v10, but work fine with the v9 initially loaded with the unit. Thanks in advance! -Lackosleep
Hi Kevin, sorry for the late reply. Judging by the issue that you have mentioned, it seems Lenovo has put in an Anti Rollback mechanism to use. This means that you cannot flash an older Android build onto the current version.
Hi sadique my device is asus zenfone 2 zd551kl ZOOUD(selfie) but I don’t find a way for it so can you please help me by adding it to your webpage so that I can review and try to manually flash the stoc rom using fastboot commands
Hi friend, Thank you so much for the instructions. My issue is that I have a bricked Meizu M6 Note which I can only boot in fastboot, no system and no recovery can be booted. So, I don’t know if I can use this entirely guide for that device or maybe I have to do something special to flash it. It is an Snapdragon device.
I’ll wait for your response
Thanks in advance! 😀
Hi Yelt, I am downloading the firmware, will check out the partition files, and will then let you know the commands at the earliest.
Thank you so much, I’ll wait for your response.
I have a bricked Huawei P8 Lite. When I try to flash the boot partition with “fastboot flash boot boot.img”, I get the error “fastboot: error: cannot get boot partition size”.
Any idea how I can sort out this problem?
Hi Terry, are you using Mac? Because one of our readers also had this issue and was able to fix it by using a Windows PC. If you’re indeed using Windows, then could you re-verify that you have the official Android SDK Platform Tools and that you are executing the commands inside the CMD window opened in the platform-tools only.
Okay brother, I am having lenovo z2 plus and it was stuck on screen saying, ‘unable to boot error’. actually, I was suggested to flash QPST ROM, and the process stopped unexpectedly after few sec of pressing flash button on MIflash, and yesterday I was flashing the files extracted from the ROM one by one, in fastboot mod, and now my phone is not even booting to fastboot mode. only vibrating when I am connecting it with PC or holding power button. Earlier I was trying to flash it via QPST but unable to boot to EDL mode, so I updated its drivers and I was to get download button on QPST but after few sec, it says sahara failed, and while flashing via fastboot mode, in many files it used to say things like, ‘remote: partition flashing not allowed’, or ‘partition table does not exists’, but now its not even booting to fastboot mode, only vibrating.
Okay, I know that you aren’t going to reply, as the stupidity I have done is quite ununderstandable, but I have fixed my device by booting it to EDL mode and flashing the stock ROM via Qfil, plus I also did not know the fact that time that I can boot to EDL mode by giving a command in fastboot mode- fastboot -i 0x2b4c oem reboot-edl, and it will work when bootloader is unlocked, and things are quite straightforward after getting the stock ROM, and Qfil does it all, but I am writing all this in order to request you, that after flashing my IMEI number got erased (I doubt that it got erased due to the fact that I was flashing the files in wrong sequence), so I request you, ‘can you please make guide to restore IMEI number given in bill (tried all the methods on internet, none worked for me) ?
Hi Ayush, was down with ill health, so couldn’t reply. Anyways, did you ever made a Nandroid backup? Or more importantly, did you made a backup of the EFS Partition. This is because EFS Partition is the slot that holds your IMEI number. So restoring the EFS partition is the only way out as of now.
Thank you most guides assume you are able to use adb commands not just fastboot this got me out of a bind, all the best 🙂
Thanks Kev for the appreciation 🙂
Please make fastboot commands for
Tecno camon 16 ce7j
TECNO CAMON 16 CE7J https://imgur.com/a/SfmwSEN
This is the screenshot,
Thanks in advance for the great service
Could you let me know your device name, Antony.
My Poco F1 is stuck in bootloop. I guess your solution will work in my case. But I desperately need to save my data which is there on the phone. Will the above solution delete the phone data as well?
hi i have a amazon fire hd10 9th gen that has failed an update. i can get into fastboot mode only as the recovery has no option to revocer from adb commands. i have the amaxzon update bin file but i cannot figure out f#how to flash this with fastboot, any iseas?
Hello saddique Hassan I am having an asus zenfone 2 ZOOUD zd551kl(selfie) which is bricked but I am able to get in the fastboot,but
the problem is I want install stock firmware on it due to some problems manually through fastboot commands so please add a help guide for me,it will help me a lot,thanks in advance
how to do on LG G7 ThinQ . because no batch file or xml file on this frimware
Hello, I came across this article while looking for steps to flash stock rom on my device. My device(HONOR 9i RNE-L22) is unrooted yet it is stuck in bootloop, I looked for the its stock rom and found the one that belonged to the same region but the problem is that I can’t locate ‘.xml’ or ‘.bat’ file in the rom I downloaded. Can you help me out on how can I flash stock rom on my device, I have looked on many forums but didn’t find any solution
Ps. I tried installing rom via sd card but it is stuck on the honor logo and don’t go past it ( doesn’t show if rom is installing or not).
Hi Utkarsh, give me a couple of days, will download and extract the firmware and hopefully revert with a solution shortly.
Hlo! I did something wrong while flashing the pixel experience plus(android 10) rom in my phone(Asus Zenfone Max Pro M1)(which previously had oxygen os android 9 rom) and it is stuck at twrp logo. I flashed the latest twrp version but its still stuck at the logo.(moreover adb is showing it as unauthorised device(i cant turn on my phone becoz it continously gets stuck at twrp logo)(it shows battery low even after charging for hours)). How can i fix my device….plzz help…it gets connected to a pc ….but unauthorized device shows at adb
Hi Abhinav, booting to Fastboot via hardware key combination seems to be the only way out. So power off your device. Then press and hold the Power and Volume Down keys for a few seconds adn your device will be booted to Fastboot. From there, you could execute the desired commands as the authorization check doesn’t happen in Fastbooty environment
Hey mate! Can i get the procedure for unbricking asus zenfone max pro m1…..bcoz i downloaded the stock firmware files and it didnt have any .xml or .bat files
Hi Abhivan, Asus Firmware has a payload.bin file. All the firmware files are present inside that only. So you may refer to our guide to extract this file: How to Extract payload.bin Once you have extracted payload.bin, you may then flash the files to their individual partitions. This guide might help you out: How to Flash Stock Firmware via Fastboot Commands
Thanks for the post, I’ve been trying it out on my huawei p20 lite ANE-AL00 but when i try executing the commands, it says failed remote partition does not exist, so what should i do to recover from the problem.
my phone Xiaomi Mi8 pro Equuleus was flashed custom Oxygen os and bricked my phone.
Now i cannot install android 9 and 10 miui stock firmware.
Everytime i install Mi8pro fastboot firmware android 9 , android 10,
get stuck into Bootloader.I tried in recovery ,but did not boot to system.
always loop into fastboot mode.
Only android 8.1 rom boot to system successfully.
I cannot upgrade to pie and Q rom.
help me .
Hey I got a Acer Iconia one 7 B1-750 which only boots screen saying “Entering DnX mode. Waiting for fastboot command. I can see the tablet with “fastboot devices” command but all other fastboot commands fail. I found the stock firmware but it has no flash bat nor partition lines in the only xml file. Any ideas how to flash stock back on it?
Thank you very much for this tutorial.
It helped a lot.
Thanks Nuno for the appreciation.
I’ve been trying to flash stock to Zenfone 7 Pro. Only .img came out from the payload.bin. How do I know to which partition to flash? It’s around 30 items.
Thanks for this guide and your support.
Hi Adrian, isn’t there any XMF file as well, along with those firmware IMG files?
I’ve downloaded the stock firmware for my device (SM-T515), but the downloaded ZIP file contains no XML files.
My phone name is realme 3 pro model no. rmx1851. my phone is boot again and again it’s show only the logo with powered by android but nothing happen. please make post about realme 3 pro firmware flash with fastboot. please help
Hi there thank you for the very informative details was an interesting read
I was looking for those named XML files in my firmware but I have 3 XML files and they don’t display the same as your example above
I’m trying to flash an Asus ZenFone 5Q / lite ZC600KL X017DA
This is quite confusing because on the Asus support page for this model phone it has loads of firmwares going right back to 2018 now I know my missus got this mobile phone in 2018 to replace her old Asus that was bricked
So I’m not entirely sure what version I need to download as I’m sure her phone had automatic updating so I’m sure the versions would of changed and I believe the bootloader would check what I would be flashing and reject it if it’s wrong as I’m sure that’s what it’s been doing as I will explain
I downloaded about 4 different versions 2 of them are fastboot versions the second actually states CSC within the firmware version/name and since my mobile will show CSC I downloaded that as my second option
The first firmware I got came from I believe a site called firmware panda or something of that nature had all the necessary fastboot and instructions and one of the commands is flashall_AFT
But that would pretty much fail straight away and will throw up cannot write to partition write protected
The second firmware with the CSC within the file name actually did a lot more and was processing a little longer than the first but later would fail with the same error write protected
I tried downloading a third firmware designed to work with QPST as the chipset is Qualcomm Snapdragon and apparantly QPST is the way to go
Now the missus is chewi g my ass off to get it fixed so hoping you could hook me up with some help here
Now if it was a MTK chipset I could of flashed the mobile with SP tools in my sleep doing this fastboot is all new to me didn’t even know about it
Only issues I ever had with MTK was different brands of mobile require different proceedures in when to release buttons my wife’s old Asus was MTK Asus ZenFone 3 max took a few days research getting files and actually flashing tool about 10 minutes
Anyway I hope you can help me out and thank you very much for taking the time have a nice day
How can I unbrick my Redmi 9 using fastboot? I can only boot into fastboot and miui recovery. I have tried running the flash_all.bat script from the fastboot image but still can’t boot into Android.
I have a brand new Oukitel C22 that I have soft bricked in an attempt to root it by flashing a Magisk_patched_boot.img with fastboot 🙁
(The phone is new, so at least there’s no need to attempt to recover data)
After succesfully unlocking the bootloader I got an Orange State message:
Your device has been unlocked and can’t be trusted. Your device will boot in 5 seconds.
[I thought it was no problem because the boot after 5 seconds was successful]
After booting, I set it up and installed Magisk, extracted boot.img from stock firmware and transferred it to device via ADB, patched it with Magisk and flashed it to the boot partition via Fastboot.
After reboot the phone is endlessly looping (with the Orange State message)
The phone can’t be switched off and the battery is not removable
After full discharge I tried to reflash the stock ROM with SP Flash Tool
The process started but ended with error 60005 (device power on before completion!) because the loop restarted as soon as the phone got a small charge…
I managed to interrupt the loop and successfully boot to (stock) recovery
From there rebooted after wiping data and cache partitions and the loop restarted 🙁
I noticed that from Recovery I could update from ADB, or enter Fastboot (boot to bootloader)
THAT’S WHY I HOPE THAT YOUR METHOD WOULD BE MY ONLY HOPE
Unfortunately there’s no flash-all.bat in my ROM, and not even .xml file to do what you suggest.
Could you please help with suggestions? Thanks a lot in advance————–
This is the content my stock firmware:
Content of firmware Oukitel_C22_MT6761_EU_2201_T2076_131120_10
Volume in drive I is STORAGE
Volume Serial Number is 46A1-C247
Please send fastboot instructions for One Plus 5
Hello. Please help me. When trying to get root, my phone stopped loading the system. I can only enter the fast loading mode. Red magic 6s pro. Firmware version 315 europe.
Here is the link to the firmware https://help.redmagic.gg/hc/en-us/articles/4412024271001-REDMAGIC-6S-Pro .
I pulled the files out of the image, but I didn’t find anything similar to xml there. Please help me.
Such a great help !
In order to restore Moto G9 PLay GUAMP XT2083-3 :
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash vbmeta vbmeta.img
fastboot flash radio radio.img
fastboot flash bluetooth BTFM.bin
fastboot flash dsp dspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash recovery recovery.img
fastboot flash super super.img_sparsechunk.0
fastboot flash super super.img_sparsechunk.1
fastboot flash super super.img_sparsechunk.2
fastboot flash super super.img_sparsechunk.3
fastboot flash super super.img_sparsechunk.4
fastboot flash super super.img_sparsechunk.5
fastboot flash super super.img_sparsechunk.6
fastboot flash super super.img_sparsechunk.7
fastboot flash super super.img_sparsechunk.8
fastboot flash super super.img_sparsechunk.9
fastboot flash super super.img_sparsechunk.10
fastboot flash super super.img_sparsechunk.11
fastboot flash super super.img_sparsechunk.12
fastboot flash super super.img_sparsechunk.13
fastboot flash super super.img_sparsechunk.14
fastboot flash super super.img_sparsechunk.15
fastboot flash super super.img_sparsechunk.16
fastboot erase carrier
fastboot erase userdata
fastboot erase metadata
fastboot erase ddr
fastboot oem fb_mode_clear
Hi Sadique, thanks for your content. May I know if you have instructions on how to fix bootloop issue on Asus Zenfone 3 Deluxe edition? My phone is still recognized when I type fastboot devices. But there is no method I can unlock the bootloader. any advice will be muchly appreciated. THanks.
LG Aristo 2 plus
I can flash boot & recovery but everthing else has to have the bootloader locked. Fastboot will not flash a locked bootloader.
I See your big tutorial but i block on xml file,
I have a samsung galaxy s7, with twrp i don’t have partition system data or other, in twrp he is say no present for all of there,
download mode it’s impossible , i can just twrp when i wait 3 hours, and when i do adb devices, i have
i can’t do anythink ,
i want to repartizion my internal storage in first, so i don’t what can i do…
thank you for your help and sorry for my english, i’m french and i don’t speak english very good
Please!! HOW TO UNBRICK REDMI NOTE 8 2021 BILOBA
Anything for xiaomi Mi 9?
i have a friend who has got her mi 9 blocked on boot…we can see mi9 logo and powered by android with 3 points moving but nothing else…
Hi there, I wish I see this thread earlier, Can you please help me or give me an instruction on how to unbrick the REDMI NOTE 11 PRO 5G (CODENAME_VEUX). Appreciated all the help you’ve been given to us. Thank you in advance! God Bless!
Thank you so much for the detailed instructions. I followed your steps and got my almost bricked MI pad out of boot loop.
Thank you soo much!
There is no sheet listed for the Oneplus Nord N200 5g, build DE2118. It would be greatly appreciated if you could provide one possibly. Thanks in advance