How to Factory Reset an Android Phone and Reinstall Official Firmware
In this article
Factory resetting your Android phone wipes all personal data and returns the device to its out-of-the-box state. Reinstalling the official firmware (the system software) goes a step further: it replaces the entire operating system with a clean, manufacturer-approved version, fixing deep software issues and removing any corruption. This guide covers both processes safely. Before you start, back up anything you want to keep (photos, contacts, files), because everything on the phone will be erased. Also ensure your phone has at least 50% battery or is plugged in, and you have a stable internet connection and a computer (for firmware reinstallation).
What You'll Need
- Your Android phone (fully charged or plugged in)
- A computer (Windows, Mac, or Linux) with a USB cable
- Official firmware file for your exact phone model and region (download from the manufacturer's support page or a trusted mirror like XDA-Developers, but only official signed builds)
- Official flashing tool for your phone brand (e.g., Samsung Odin, Google Flash Tool, OnePlus MSM Tool, Xiaomi Mi Flash Tool)
- USB drivers for your phone (usually installed by the flashing tool or available from the manufacturer)
- A backup of your personal data (cloud or external drive)
Step-by-Step
- Back up your data. Go to Settings > System > Backup and turn on Google One backup, or manually copy photos and files to a computer or cloud storage. Note that app data and settings are not always fully restored.
- Charge your phone. Plug it in and wait until it's at least 50% charged. A power failure during the process can brick your device.
- Find your exact model number. Go to Settings > About Phone and note the model number (e.g., SM-G991U for Samsung, Pixel 6 for Google). You need this to download the correct firmware.
- Download the official firmware. Visit your phone manufacturer's support website (e.g., samsung.com, support.google.com/pixel, oneplus.com/support) and search for your model. Look for the latest official firmware file, usually a .tar, .zip, or .md5 file. Do not download from unofficial sources unless you are certain they are trusted.
- Install the official flashing tool. Download and install the correct tool for your brand: Samsung uses Odin (Windows only), Google uses the web-based Flash Tool (works on Chrome), OnePlus uses the MSM Tool (Windows), Xiaomi uses Mi Flash Tool (Windows). Follow the tool's instructions to install any required USB drivers.
- Enable Developer Options and USB debugging. On your phone, go to Settings > About Phone and tap “Build number” 7 times. Then go back to Settings > System > Developer Options and turn on “USB debugging”. This allows your computer to communicate with the phone.
- Boot your phone into download/fastboot mode. Turn off the phone. Then press and hold the specific key combination for your brand: Samsung (Volume Down + Power), Google Pixel (Volume Down + Power), OnePlus (Volume Down + Power), Xiaomi (Volume Down + Power). You'll see a screen with a warning or an Android robot. Connect the phone to your computer via USB.
- Load the firmware into the flashing tool. Open the flashing tool on your computer. For Odin, you'll see a “AP” slot – click it and select the firmware file. For Google Flash Tool, you'll select the firmware in your browser. For MSM Tool or Mi Flash, you'll browse to the firmware folder.
- Start the flash. Click the “Start” or “Flash” button in the tool. Do not disconnect the phone or close the tool until the process finishes. The phone may reboot automatically, and the tool will show a green “PASS” or “Success” message.
- Set up your phone. After the flash completes, the phone will boot into the setup wizard. Complete the initial setup as you would with a new phone. Restore your backup if you wish.
Common Mistakes
- Using the wrong firmware. Installing firmware meant for a different model or region can cause boot loops or permanent damage. Always double-check your model number and region.
- Disconnecting during the flash. This can brick the phone. Keep the USB cable securely connected and do not touch the phone until the tool says it's done.
- Skipping the backup. You will lose all data. Even if you think you have nothing important, back up anyway.
- Using a third-party flashing tool. Unofficial tools may not be compatible and can corrupt the system. Stick to the official tool for your brand.
- Ignoring battery level. A low battery during the flash can cause a power failure. Always charge first.
Tips
- If you are only trying to fix a minor issue, try a simple factory reset first (Settings > System > Reset > Erase all data). You may not need to reinstall firmware.
- Write down your Google account credentials before resetting, because after a factory reset you may be asked to verify your identity with the previous account (FRP – Factory Reset Protection).
- Read the official flashing guide for your phone model. Manufacturers often have specific instructions for enabling OEM unlock or using their tool.
- Use a short, high-quality USB cable. Long or damaged cables can cause connection drops.
- If you are unsure about any step, search for a video tutorial from a trusted source (like the manufacturer's official channel) that shows the exact process for your model.
Troubleshooting
If the flash fails or your phone doesn't boot after the process, try these in order:
- Restart the process. Sometimes a one-time glitch occurs. Reboot your phone into download mode again and repeat the flash with the same firmware.
- Check the USB connection. Try a different USB port (preferably USB 2.0 on your computer) and a different cable. Reinstall the USB drivers.
- Re-download the firmware. The file may be corrupted. Download it again from the official source and verify its checksum if possible.
- Boot into recovery mode. If the phone is stuck in a boot loop, turn it off, then press and hold Volume Up + Power (for most brands) to enter recovery. From there, select “Wipe data/factory reset” and then “Reboot system now”. This clears any leftover cache.
- Use the manufacturer's emergency recovery tool. Many brands offer a tool that can restore the phone even if it's bricked. For Samsung, it's Smart Switch's “Emergency software recovery”; for Google, it's the Flash Tool's “Recovery” option; for OnePlus, the MSM Tool has a “Repair” mode. Follow the official instructions.
- If nothing works, contact the manufacturer's support or visit a certified service center. Do not attempt any unofficial methods, as they can void your warranty or cause permanent damage.
Frequently Asked Questions
Will a factory reset remove viruses or malware?
Yes, a factory reset removes most malware that is not deeply embedded in the system. Reinstalling the official firmware is even more thorough, as it replaces the entire operating system.
Do I need to unlock the bootloader to reinstall firmware?
Usually not. Official flashing tools from manufacturers work with a locked bootloader. Unlocking the bootloader is only needed for custom ROMs, which are not covered here.
Will I lose my photos and contacts?
Yes, everything on the phone's internal storage is erased. If you have backed up to Google Photos or your Google account, you can restore them after the reset.
Can I reinstall firmware on a phone that is not rooted?
Yes, the process described here works on unrooted phones. In fact, it is safer on a stock phone.
How long does the firmware reinstallation take?
Usually 5 to 15 minutes, depending on the phone and the size of the firmware file. Do not interrupt the process.
What is FRP (Factory Reset Protection) and how do I bypass it?
FRP is a security feature that requires you to enter the Google account credentials that were previously on the phone after a factory reset. You cannot bypass it legally; you must enter the correct account details. If you forgot them, use Google's account recovery options before resetting.