How to flash Stock Firmware with fastboot commands

How to flash stock firmware with fastboot commands

What is stock firmware on the Android phone? Stock firmware or the stock UI is what you can say is the ROM that comes with the phone out of the box.

For instance, MIUI is the stock firmware for Redmi, Funtouch OS is for Vivo, Realme OS for Realme, Colour OS for Oppo, OneUI for Samsung, OxygenOS for OnePlus, EMUI for Huawei phones, and various others. 

You can get the stock firmware for your phone on the internet, we will be discussing that in the latter part of the article.

Well, you can easily flash stock firmware on your device with the Fastboot commands.

This method can be helpful with updating a rooted device, getting Android updates before they are released, and also fixing the bricked phone. 

In this article, we will be discussing how you can flash stock firmware with Fastboot commands.

However, before continuing, know that the method works with most of the devices including Realme, Redmi, Oppo, and various others except for the Samsung devices.

It is so because Samsung has its flashing software known as Odin

Also Read: How to fix ODIN stuck at setup connection error

What You Will Have To Download?

There are files that you will have to download to flash stock firmware with Fastboot commands.

You will have to download Android SDK tools and the stock Firmware. You can search on the internet for the stock firmware of the device you are using. 

What To Know Before Flashing Stock Firmware

There are certain things that you must know before you start the process of flashing stock firmware with Fastboot commands. 

  • Firstly have a backup of all the files on your device. Flashing stock firmware will delete all the data on your phone.
  • So before you begin flashing, make sure you have the backup of your phone.
  • Also, ensure your phone is charged up to 80%. During the process, your phone must not shut down as it can lead to the failure of the device.
  • Therefore it is a must to have your device charged to at least 80% or more than that.

Also Read: How To Install TWRP Recovery Using Odin On Samsung Devices

Flashing Stock Firmware With Fastboot Commands

Flashing Stock Firmware with Fastboot commands
Flashing Stock Firmware with Fastboot commands

Now that you have downloaded the files that you need to, let’s start with the process of flashing the stock firmware on your device.

  • Firstly, install the Android SDK tools that you have downloaded. After you have installed the ADB and Fastboot tools, you can get ahead with the process.
  • However, only install the official Android SDK tools from Google and no other third-party. You can download the Android SDK tools from this link.
  • Once you are done with downloading and installing the files that we told you to, you can get ahead.
  • Now you will have to unlock the OEM bootloader. To do so, you will first have to enable OEM unlocking on your device.
  • Head to the Settings and then to About phone. In the about phone section, tap on build number a few times, until you see a notification ‘You are now a developer’ at the bottom of your screen.
  • After you see this message, head back to the settings menu and then search for developer options in the settings menu.
  • Open the developer options and then search for the ‘OEM unlocking’ toggle, and enable it.
  • After doing that, you will have to put your phone to Fastboot mode/bootloader mode.
  • To do so, first power off the device. When your phone is off, hold down the power button+volume down for a few seconds.
  • This should take you to bootloader mode. When in bootloader mode, you will see an Android logo on the screen.
  • Now connect your phone to your computer using the USB cable.
  • After doing that, head to the platform-tools in the Android SDK folder. Now inside the folder, right-click on any space, and then click on open command window here. 
  • In the command window, enter and execute the command fastboot devices” to ensure whether the device is connected properly or not.
  • You will see an alphanumeric text if the device is properly connected.
  • Now you will have to unlock the bootloader. To do so, execute the command fastboot flashing unlock” to unlock the bootloader. In case, your device has Android 5.0 or less, then you should execute the command fastboot oem unlock”.
  • You will see a confirmation message on your phone’s screen. Select yes to unlock the bootloader.
  • Now, extract the stock firmware that you have downloaded. Now copy the contents of the stock firmware and paste it into the platform-tools folder that you visited earlier.
  • To flash the files, type in the command flash-all and this will unroot your device, wipe the data on your phone and install the stock firmware that it came with.
  • Once done, you will be able to reboot your system normally.
  • Upon rebooting, set up your device, and you can start using it.

Also Read: How to use ADB sideload on Android [Stock and TWRP recovery]

Final Words

This is how you can flash the stock recovery on your phone using the Fastboot method.

This method can be used to downgrade the firmware you are already running on your phone, or upgrade the firmware if you want faster updates.

Anurag Jain

A content writer, tech geek, and fitness enthusiast out there to explore the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts