How to Clean Flash or Dirty Flash
A In-depth guide about clean flash and dirty flash on Android devices.
John YangMon, Jan 9, 2023
What Are the Differences?
What are the differences between "Clean Flash" and "Dirty Flash"?
Let’s start by explaining "Clean Flash" first. A clean flash requires you to format all of your data in the phone’s storage. That means that you’ll lose all of your data, including system data, cached files, Dalvik cache, and of course, internal storage.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Format Data will delete the phone's internal storage! Make sure you have made a backup of important data! THIS IS IRREVERSIBLE!
Dirty Flash a ROM is not recommended. It can cause all kinds of random problems.
The term "Dirty Flash" is commonly used to refer to an OTA (over the air) update or upgrading an old ROM to a newer version without having to factory reset or wipe your device.
The following steps will use TWRP to perform a Clean Flash and Dirty Flash.
0) File Requirement
1) Boot into TWRP
- Boot your phone into bootloader mode. There are two diffent methed:
- Using key combinations.
- Every phone manufacturer has different key combinations to get into the bootloader mod. You'll have to look it up yourself.
- Boot your phone into bootloader mode using adb commands
- Enable developer options for your phone by pressing "Build number" in the Settings app multiple times.
- Enable USB debugging option in developer options
- Open a CMD terminal window. Press
Windows Key + R
then type in cmd
then hit Enter
- Navigate to the location where you store the Android platform tools using the command:
cd C:\path\to\platform-tools\folder
. If you did not store platform tools in C drive, just change the first letter.
- Typing the flowing command into the terminal window:
- After that, your phone should reboot into bootloader mode
- Connect your phone with the computer using a USB cable
- Extract the platform tools to whatever location that you like
- Put the previously downloaded TWRP image file in the platform tools folder for easy access
- Open a CMD terminal window. Press
Windows Key + R
then type in cmd
then hit Enter
- Navigate to the location where you store the Android platform tools using the command:
cd C:\path\to\platform-tools\folder
. If you did not store platform tools in C drive, just change the first letter
- Typing the flowing command into the terminal window:
- Then your phone should be in the TWRP recovery
- In TWRP, click "Wipe"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Click "Format Data"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Type in "yes" to confirm formatting
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- After the prosses is done, click "Back" button
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Now click on "Advanced Wipe"
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Check Dalvic / ART Cache, System and Cache
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- Swipe to confirm wipe action
- After wiping is done, press back to go back to the main screen.
3) Flash ROM
- In TWRP, click "Install"
- Click "Select Storage," then select "MicroSD"
- Select the ROM zip file
- Swipe to confirm flash
- After that's done, you can flash other files that you wanted to flash, like Magisk or GApps. If you want to flash Magisk, please see Magisk Preparations. If not, just continue.
- Press home button, to go back to the main screen
- Click "Reboot"
- Click "System"
How to Root The Device?
0) Preparations
- Download Magisk apk from https://github.com/topjohnwu/Magisk/releases
- Rename the file extension from
apk
to zip
- Put the renamed file into the phone's MicroSD storage
1) Boot into TWRP
2) Install Magisk
- Flash the renamed magisk.zip file the same way you flash ROM
- Reboot the device
- Start the Magisk app and follow the on screen instructions to complete the installation