If you have a Samsung Galaxy device and tried to use Odin with it, then there is a good chance that you came across an option called ‘Nand Erase‘ or ‘Nand Erase all‘. Odin is a powerful tool that was supposed to be used by the Samsung engineers/service staff to perform various operations on Samsung Galaxy devices. But fortunately, they leak and we get to use it on our own on our devices. But keep in mind that one wrong move then render your device unusable and you must be fully aware of what you are doing. In this guide, I have tried to cover all the aspects of “Nand Erase” to help you make informed decisions.
Below are a few questions I have tried to answer in this article:
- What is Nand Erase in Odin?
- Should Nand Erase be enabled in Odin while flashing Samsung firmware?
- What are you supposed to do fix your device in case you mistakenly enable it before installing the firmware?
Let’s get started.
Odin NAND Erase | Explained
An Android device has a lot of portions internally for different purposes. Most users don’t know (and don’t need to know) about these partitions as they are not required for the day to day usage of the device. Rather, they are technical details of the Android operating system. But if you are here, then it is a good idea to give you a brief outline of what these are and they are related to our topic ‘NAND Erase’.
Here’s a list of partitions available on the Android devices:
Android Device Partitions
These partitions are common for all Android devices.
Android is open source and some OEMs add their own partitions to manage how their device works with the Android OS. Here are some device-specific partitions.
- datadata (Samsung devices)
- wimax (Samsung devices)
- efs (Samsung devices)
- preload (Samsung devices)
- .cust_backup (Huawei devices)
- flexrom (Acer devices)
- mmcblk0_start (Acer devices)
- custpack (Alcatel devices)
- mobile_info (Alcatel devices)
- appslog (HTC and Sony devices)
- uboot (MTK based devices)
In the Android rooting/modding world, there is a term called ‘nandroid backup‘. There is a utility called ‘nandroid utility’ present on custom recoveries like TWRP that enables the user to create a backup of all the partitions and structured directories on a device where data are stored. It is sort of a super backup (if that makes sense) that takes a full snapshot of all the data in all the possible partitions on an Android device. And when you restore the backup, everything is restored as it was previously – not just your data – but also the internal data of the operating system as well.
That said, when you erase NAND on a Samsung device, you completely wipe out everything on the device including but not limited to boot, kernel, recovery, system, data, cache, and EFS partitions. With all the data gone, software wise the device will only have Download Mode or Odin Mode.
If you ever use the ‘NAND Erase’ option, your device will become completely unusable from that moment. But there is a solution, indeed and we shall get into it shortly.
Should You Enable ‘Nand Erase’ or Re-Partition option in Odin?
Here’s what the usual/normal Odin flashing process would require:
- Files to be added: AP, BL, CP, and CSC or HOME_CSC.
- Options that should be enabled: ‘Auto Reboot‘ and ‘F. Reset Time‘ (they are enabled by default).
- Options that should not be enabled: Nand Erase or Nand Erase All, Re-Partition, Flash Lock, and Device info.
So, my answer would be – No, you don’t need to enable the ‘Nand Erase’ option unless you are in the below situation.
When to use the ‘Nand Erase’ option?
The only time when you may have to use the ‘Nand Erase’ option is when you have to re-partition your Samsung Galaxy device. When will this happen? Let us say that you have a 512GB variant of the Galaxy S20. And after installing firmware using Odin you only have 128GB of storage. This will happen mostly because of flashing a PIT file meant for the 128GB variant on the 512GB variant.
And when this happens, you will need to again flash the right PIT file on your device to get back the actual storage on your device. The PIT file tab is so advanced that when you click the PIT tab in Odin, you will get the following warning popup.
Make sure you have the right PIT file for your device ready before proceeding. Also, please note that you are not supposed to flash only the PIT file. When you flash the PIT file, you should flash it along with the 4 firmware binaries: AP, BL, CP, and CSC. This is an extensive process which I have explained below.
For those who like to know more about PUT files, I recommend reading this article: Extract Samsung PIT File from Samsung Firmware
How to use the ‘Nand Erase’ option in Odin?
Below are the steps to be followed to use the Odin tool with ‘Nand Erase’ option:
- Download the appropriate version of Odin. You may want to check out what is the recommended Odin version for your device here.
- You need to have the latest Samsung Stock Firmware for your device. Odin tool does not provide a way to download stock firmware. Rather, it just helps you flash stock Samsung ROM. You can get the latest firmware for your device by one of the below ways:
- Make sure you have Samsung USB Drivers installed on your PC and that USB debugging is enabled.
- Have the right PIT file for your Samsung Galaxy device model and variant. Don’t have the PIT file? Ignore this step. You might want to read about extracting Samsung PIT file.
- Next, boot your device into the Recovery Mode. Note: The key combinations for this vary from device to device; Google is your friend!
- In Recovery Mode, navigate to the ‘Wipe data/factory reset‘ using the Volume Down key and select it using the Power button. Select ‘yes‘ on the next screen. When the data is wiped, select the ‘Power off‘ option.
- Next, boot your device into the Download Mode/Odin Mode. Note: The key combinations for this vary from device to device. Again, Google is your friend!
- Unzip and extract the Odin.zip file and double-click the Odin.exe to launch it.
- Connect your Samsung Galaxy device to the PC via a USB cable. The ID:COM port on Odin will get highlighted upon a successful connection.
- Extract the firmware zip file and open the firmware folder. If it is a single-file firmware, click the PDA or AP button in Odin and add the firmware file with .tar.md5 extension to it. Alternatively, if the firmware folder contains 4-5 files, add the BL, AP, CP, and CSC files to the corresponding fields.
- Now click the Options tab in Odin and check Auto Reboot, Nand Erase and F. Reset Time. Select Re-Partition too if you have the appropriate PIT file or else you can ignore it. You can add the PIT file using the PIT tab in Odin. Please note that if you want to fix your Samsung device because it stuck on the Samsung logo because you flashed the firmware with Nand Erase enabled, you should not select Nand Erase and Re-Partition while installing the firmware.
- Next, click the Start button to start the flashing process.
- Your Samsung device should reboot automatically once the process completes.
Done! Please note that the first boot will take longer than usual. Once the device boots up, you can set up your device and start using it. In case if you are stuck in a bootloop again, perform a factory reset via stock recovery again.