Skip to content
Home » Android » Odin NAND Erase Guide | Re-partition Samsung Devices

Odin NAND Erase Guide | Re-partition Samsung Devices

We use Odin mostly to flash Samsung firmware binaries. However, Odin can also be used to re-partition, flash lock, decompress data, flash user data, and erase data on Samsung Galaxy devices. In this tutorial, explain what Odin NAND Erase or NAND Erase All is, and how you can use this option to erase all data and re-partition a Samsung phone or Galaxy Tab. The Nand Erase option in Odin is a sensitive setting. With proper knowledge, it can do more bad than good. It can wipe all partitions including EFS, boot, recovery, kernel & system partitions.

NAND Erase Meaning in Odin

NAND and NOR are 2 main types of flash memory related to computers and it stores the BIOS settings to the ROM of a computer. Since Android devices don’t have a BIOS, flash memory, or NAND relates to the bootloader and OS kernel that work together to boot Android devices into the system.

NAND is neither an acronym of a term used to express a boolean nor a logic gate “NOT AND“. Being a non-volatile memory, it keeps the essential OS data even when your Android smartphone is turned off.

Thus, when it comes to Android, NAND memory stores the following partitions of your Android device.

  • boot
  • kernel
  • recovery
  • system
  • data
  • cache
  • .android_secure
  • datadata
  • wimax
  • efs
  • preload

When you create a nandroid backup, an exact mirror of all the above partitions and directory structures is created. Similarly, when you perform a NAND erase in Odin, you wipe all the partitions on your Samsung Galaxy device. In simple words, you’ll end up with a device without an operating system. A piece of hardware is all you get as the boot, kernel, system recovery, data, EFS, etc. have already been wiped. Your Samsung phone or tablet won’t boot up except to the Odin or Download Mode.

You cannot fix a Samsung device after an unintentional NAND erase action by simply flashing the stock firmware. Since NAND erase wipes all existing partitions from the device’s storage, you’ll have to re-partition your device in Odin with an appropriate PIT (Partition Information Table) file.

Don’t Miss: 4 Ways to Change CSC on Samsung Galaxy Devices

What is Re-partition in Odin?

As I already mentioned above, the flash or NAND memory on Android devices is divided into partitions and block structures. These partitions are essential to the proper functioning of a device. The PIT file tells Odin how much space to allocate to boot, kernel, system recovery, data, and EFS. Not just that, it is also responsible for the location and path of these partition blocks on the internal storage.

The Re-partition option in Odin is not meant to be used during a normal firmware flash. If you have to install the firmware, add the BL, AP, CP, and CSC files to Odin, and do not change the default settings.

The PIT file determines the structure, location, and size of specific partitions. Since a NAND erase wipes all partitions, the only way to re-partition your device is to flash a PIT file that is strictly for your Samsung Galaxy device model and storage capacity. Flashing a wrong PIT may result in a semi-bricked device. Moreover, if you flash the PIT file of a 128GB device model on a 256GB model, your phone may be configured to show only 128GB as available storage. I experienced this issue on my Nexus 6P.

You must not enable the Re-Partition option in Odin unless you have the correct PIT file. When you click the Pit tab in Odin, it will show you a warning.

pit warning in odin
Odin warning on PIT selection

It means you don’t need to flash a PIT file in normal circumstances. In some situations, when your Samsung device’s partition table is corrupted, flashing the PIT manually can be the only way to fix the issue. If you find the IMEI number of your Samsung Galaxy phone missing, it might be due to a corrupt EFS partition. You can restore the lost IMEI by flashing the Partition Information Table. You can follow these steps to flash only the PIT file in Odin.

  1. Boot your device into the Download mode.
  2. Launch Odin and connect your device to the PC.
  3. Add the BL, AP, CP, and CSC binaries to the corresponding sections.
  4. Select the Re-Partition option.
  5. Click the PIT tab and add the correct PIT file for your device model.
  6. Hit the Start button on Odin and wait for the installation to be finished.

Please keep in mind that the re-partitioning procedure will wipe your phone’s data so take a backup before you proceed.

Steps to Re-Partition and Nand Erase using Odin

Finally, let’s see how we can perform a NAND erase in Odin and re-partition a Samsung device by erasing user data and all partitions. You can also fix your phone in case you accidentally or unknowingly erased all data. The steps described below will also help you restore the lost IMEI on your Galaxy smartphone.

Below are the steps to flash stock firmware on Samsung devices with the Nand Erase and Re-partition options.

Preparations and Downloads

There are a few things that you must do before you jump into the action.

    1. Download the appropriate firmware for your smartphone or Galaxy Tab. Here are the 7 best Samsung firmware download tools and websites from which you can download the BL, AP, CP, and CSC files. When the firmware is downloaded, extract the ZIP file.
    2. Install the Samsung USB driver on your PC.
    3. Download the latest Odin tool and extract the downloaded zip on your desktop.
    4. You’ll also need the correct PIT file for your Samsung device. You can easily extract the PIT from the CSC binary. Just add a ‘.zip‘ extension after .tar.md5 and unzip it. You will find the PIT for your phone inside the extracted folder. extract samsung pit file

Instructions to Flash Firmware in Odin

Note: Please be warned that performing a firmware flash using the method below will wipe your phone’s data. It’s strongly recommended to back up your phone’s data beforehand.

  1. Turn off your Samsung Galaxy device and boot it into the Android Recovery Mode. The method and key combination to get into the recovery mode on Samsung Galaxy devices differ from device to device. You have to press and hold a certain hardware key combination for 5-7 seconds. An easier way involves using ADB commands and works on all Android devices. However, you need to set up Android SDK Platform-tools first. I’ll mention all possible methods below:
    • Samsung Devices: Hold the Power button to bring up the Power Menu. Select the Reboot option. When the screen goes black, hold the Volume Up + Power buttons at the same time. When you see the Samsung Galaxy logo screen, release the keys.
    • All Android devices: Make sure your device is turned on. Connect your device to your computer via a USB cable. Unzip and open the platform-tools-latest folder and launch the command prompt window inside this folder window. Then execute the ‘adb devices‘ and ‘adb reboot recovery‘ commands one after another. Your Samsung device will reboot into recovery mode. samsung wipe data factory reset from recovery
  2. Once you see the recovery menu on the screen, highlight the Wipe data/factory reset option using the Volume Down button and select it by pressing the Power key. When you see the warning screen, select ‘yes’ to confirm and press the Power key to wipe your device.
  3. When your phone boots up, go to Settings and enable USB debugging from the Developer options menu. This is not a compulsory requirement though.
  4. Boot your Samsung device into the Download Mode. You can use one of the key combos mentioned below. You have to press and hold the hardware keys for 2-3 seconds. Alternatively, you can use the ‘adb reboot bootloader‘ command to enter the Download Mode.

    adb reboot bootloader
    adb reboot bootloader command
  5. Open the Odin folder and launch the Odin3_v3.xx.exe.
  6. Now, connect your Samsung device to your Windows PC using the USB cable that came with your device. When Odin detects your Samsung device, the ID:COM port will turn blue. You’ll also see ‘Added!‘ message in the log box to indicate a successful connection.
  7. Click the BL button on Odin, navigate to the firmware folder, and add the firmware binary that starts with ‘BL‘ in its name. Then click the AP, CP, and CSC buttons and add appropriate binaries to them as well.
  8. Having added the firmware binaries, click the Options tab in Odin and select Nand Erase and Re-Partition.
  9. Then click the Pit tab in Odin and select OK when you see the warning pop-up. Click the PIT button now, navigate to the PIT file, and add it.

    odin re-partition
    Re-partition and PIT option in Odin
  10. Make sure your final Odin setup looks like the following screenshot.

    nand erase and repartition in odin
    Odin setup for Nand erase and re-partition
  11. If everything looks fine to you, it’s time now to make Odin do its job. Click the Start button.
  12. Doing so will initiate the firmware installation. You can check the progress of Odin Nand erase, re-partitioning, and firmware installation in the log box. You’ll also see the “Erasing NAND” message in Odin’s log.
  13. All you need to do now is to take a short rest after your hard work and wait for the firmware installation to finish.
  14. The whole process should take around 5-7 minutes and after that, you’ll get ‘PASS!‘ message in Odin and your Samsung device will reboot.

That’s it! You can now disconnect the USB cable and close the Odin window. You have successfully flashed the stock firmware on your Samsung device with Odin NAND erase and re-partition enabled. If you need help with anything while following this tutorial, leave a comment below.

Read Next: List of Useful ADB Shell Commands

Rakesh Shukla

Rakesh Shukla

Rakesh is a geek by heart with an ardent passion for all things tech. From a young age, he was drawn to the world of technology and found himself constantly tinkering with gadgets and devices. He enjoys learning and discovering the newest trends in the world of Android, iOS, and Windows.View Author posts