How to Backup EFS Partition/IMEI Number on Android

In this guide, we will show you the steps to backup the EFS Partition/IMEI Number on your Android device. While Samsung devices hold one of the biggest drawbacks in custom development [tripping of the Knox which cannot be reversed even if you relock the bootloader] but that hasn’t stopped the tech enthusiast from gaining administrative privileges and welcoming abode a plethora of tweaks onto their device.

However, Knox isn’t the only concerning factor here, there’s always an associated risk involved of EFP Partition getting corrupted. When that happens, you might face some network-related issues [which in most cases could be rectified by a modem or radio file] and more importantly, you will have to bid adieu to your device’s IMEI number. And for that, there’s no fix whatsoever.

Once it’s gone, then you might not be able to recover it ever again, thereby making your device completely useless. Therefore, it’s always a recommended approach to take a backup of the EFS Partition on your Samsung device beforehand. In case, if something goes wrong, then you could easily restore the backup and get back your IMEI number! So without any further ado, let’s show you how this could be carried out.

UPDATE: Some newer OnePlus devices no longer use the EFS Partition to store IMEI numbers. Check out the new partition , or rather partitions, where the IMEI is now stored.

  • How to Backup EFS Partition/IMEI Number on Android Manual Method [Recommended] Automatic Method EDL Method
  • How to Restore IMEI Partition Via Fastboot Via EDL Mode

How to Backup EFS Partition/IMEI Number on Android

YouTube video - 1
  1. To begin with, root your device via Magisk / KernelSU / APatch .
  2. Then download and extract Android SDK Platform Tools on your PC.
  3. Now enable USB Debugging on your device and connect it to PC via USB.
  4. Then head over to platform tools, type in CMD in its address bar, and hit Enter. This will launch the Command Prompt.
  5. Now type in the below command to open the shell environment. adb shell
  6. After that, execute the following command to invoke the SuperUser request su
  7. You will now get a prompt on your device, tap on Allow/Grant.
  8. Now proceed with either the automatic [easier] or the manual method [lengthy], depending on your requirements.
  1. First off, type in the below command to bring the partition table of your device ls -la /dev/block/by-name
  2. It will bring up the EFS/devinfo/persist partition location, check out its sda address. In our case, it is the EFS partition at /dev/block/sda9
  3. Now execute the below command to back up the Partition [replace location and filename accordingly] dd if= location of=/sdcard/efs.img bs=4096
  4. In our case, the location is /dev/block/sda9 and the file is efs.img, so the command will transform to: dd if= /dev/block/sda9 of=/sdcard/efs.img bs=4096
  5. The backup will now be created in the Internal Storage. Make sure to transfer it to your PC.

Automatic Method

  1. Type in the below command in the CMD window to take a backup of the EFS partition su -c dd if=/dev/block/bootdevice/by-name/efs of=/sdcard/Download/efs.img su -c dd if=/dev/block/bootdevice/by-name/efs of=/sdcard/Download/devinfo.img su -c dd if=/dev/block/bootdevice/by-name/efs of=/sdcard/Download/persist.img
  2. The efs partition will now be backed up in the Downloads folder on your device. It is recommended to transfer it to your PC.

EDL Method

YouTube video - 2 YouTube video - 3
Benefits: The best part about this tool is that it will work even if your device's bootloader is locked. Well, you can even use it if the device is hard-bricked!

Downside: It requires a working EDL Tool. At the time of writing, a free tool is available, but Oppo can patch it anyday. So make hay while the sun shines! [PS: It will only work on Qualcomm devices, specifically on OnePlus, Oppo, and Realme, so that's another downside of this tool].
  1. First off, boot your device into EDL Mode followed by Firehose mode .
  2. Then click on Read Partitions. It will bring up a list of all the partitions on your device.
  3. Select the desired partitions that need to be backed up and click Read Selected. For the IMEI partition on OnePlus, you need to backup: fsg, fsc, modemst1, and modemst2.
  4. Finally, choose a location where you need to save the file and hit OK. That’s it.

How to Restore IMEI Partition

Via Fastboot

  1. Transfer the persist.img/efs.img/devinfo.img file to the platform tools folder on your PC.
  2. Next up, connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
  3. Now head over to the platform-tools folder, type in CMD in the address bar, and hit Enter.
  4. This will launch the Command Prompt. So type in the below command to boot your device to Fastboot Mode adb reboot bootloader
  5. Finally, execute the below command to flash the IMEI partition file [in our case, it is efs.img] fastboot flash efs efs.img fastboot flash persist persist.img fastboot flash devinfo devinfo.img
  6. That’s it. You may now reboot your device to the OS via the below command- fastboot reboot

Via EDL Mode

How to Flash Files via EDL Tool [Supports Locked Bootloader]

  • How to Fix Corrupt EFS/No IMEI/Network Issues [3 Methods]
  • Change/Repair/Fix IMEI on Qualcomm Snapdragon Devices
  • Unlock Bootloader on MediaTek Devices using MTKClient
  • How to Enable All LTE and 5G bands on Galaxy S23 Ultra
Google preferred - 4 Google preferred - 5

(Cancel Reply)

Δ