How to Backup and Restore IMEI Android Phone with/without PC
How to Backup and Restore IMEI Android Phone with/without PC
When flashing or updating with TWRP, the EFS partition may be damaged, which can make Android Phone IMEI code disappear . Losing an IMEI can have fatal consequences, for example:
- The signal is lost;
- No WiFi and Bluetooth MAC address;
- Network Opening Information; and
- Other important information about connecting the device.
Therefore, it is important to backup IMEI codes or partitions on your Android smartphone.
In certain TWRP versions, IMEI backups can be easily done by backing up the EFS disk using recovery mode. But if your TWRP doesn't have this feature, use the following trick to backup your IMEI so you don't panic if your IMEI is lost or wrong.
.. because you never know what danger awaits you.
1. How to backup IMEI / EFS partition without PC
Backup of IMEI/EFS disk without computer Backup of IMEI/EFS disk of - with or without computer - requires root access to use "modemst1", "modemst2" and "fsg" files with X-Explorer file manager.
If this file does not exist, other names are usually "m9kefsc", "m9kefs1", "m9kefs2", "m9kefs3".
1. Download X-plorer File Manager and Terminal Emulator from Google Play Store;
2. After installation, find the files "modemst1", "modemst2" and "fsg" in the following directory: /root/dev/block/platform/soc/7824900.sdhci/by-name/
3. The location of the modem file may vary according to the device (written in blue). See the following layout:
4. On my Redmi 4X, the file location is
/root/dev/block/platform/soc/7824900.sdhci/by-name/
5. temporarily My En Redmi 2 Prime, the file location is
/root/dev/block/platform/7824900.sdhci/by-name/
After knowing where the "modemst1", "modemst2" and "fsg" files are located, the next step is to delete them in the terminal using emulators.
1. Enter the following command in the terminal emulator field:
- su
.. press Enter;
2. Then type:
.. press Enter.
(set the command according to the location of the modem file on your device);
3. Do the same with the other two files (modemst2 and fsg), changing the commands from modemst1 to modemst2 and fsg.
4. Done.
Up to this step, Android IMEI backup process without computer is complete.
2. How to backup IMEI / EFS partition with PC
IMEI backup on PC requires the following requirements and materials:
Requirements:
- You need root access;
- Enable USB Debugging and OEM Unlocking;
Materials needed:
- Install 15 seconds ADB installation; and
- Xiaomi Android USB Driver as a fast boot command and driver;
Steps:
1. Find the files "modemst1", "modemst2" and "fsg" as in the first step using the X-Plorer file manager;
2. Then open c:\adb folder and press SHIFT button + Right click on empty area select Open command prompt here..
3. Make sure Xiaomi is connected by typing:
- adb devices
. .press enter
If it is confirmed and has a random code, it means Xiaomi is connected.
4. When a license message appears on the android phone screen as follows:
.. click OK;
5. Then type command :
- adb shell
.. press Enter;
6. Then type:
- su
.. press Enter;
7. Then type:
- dd if=/dev/block/platform/soc/7824900.sdhci/by-name/modemst1 of=/sdcard/modemst1
..press Enter;
8. Do the same with the other two files (modemst2 and fsg), changing modemst1 to modemst2 and fsg;
9. Android IMEI backup is complete.
If successful, check internal memory or memory card. The modem1, modem2 and fsg files should now be:
Save these three files carefully if necessary, you can restore again.
To understand the above command, I will explain a little here.
- adb devices » to check if the device is connected to the computer in ADB mode;
- adb shell » to access the smartphone;
- su » for superuser (check from the mobile phone if the su command is a superuser permission request);
- if » where is the source file; and
- of » is the destination where the backup file will be placed.
Also read:
Android Backup / Recovery using TWRP
Android ROM Backup / Recovery using TWRP
2. How to Recovery/Restore IMEI (EFS Partition) on android Phone
If IMEI is lost or invalid, you can recover IMEI as above. the command is compiled into the "if" and "from" parts of the file.
1. without PC
Make sure the modemst1, modemst2 and fsg files you saved earlier are on the internal memory or memory card.
1. Start terminal emulator;
2. Then type the following command:
- su
.. press Enter;
3. Then type command :
- dd if=/sdcard/modemst1 of=/dev/block/platform/soc/7824900.sdhci/by-name/modemst1
..press enter;
4. Do the same with the other two files (modemst2 and fsg), changing the modemst2 and fsg commands in modemst1;
5. Done.
2. With PC
1. Run Command Prompt;
2. Then type the command :
- adb devices
.. press Enter;
3. Then type command:
- adb shell
.. press Enter;
4. Then type the command :
- su
.. press Enter;
5. Then type command :
- dd if=/sdcard/modemst1 of=/dev/block/platform/soc/7824900.sdhci/by-name/modemst1
.. press enter;
6. Do the same with the other two files (modemst2 and fsg), changing the modemst2 and fsg commands in modemst1;
7. Done.
You can also use this command for backup partitions, sensors, recovery, modem, tz, etc. if you know which files to pull.
3. How to Backup IMEI (EFS) with TWRP
Besides the above manual method, there is an easy way to backup / restore IMEI, namely using TWRP.
Unfortunately not all TWRPs have this feature, TWRP that can backup IMEI, TWRP has a feature for backup EFS partion.
1. Backup IMEI
Steps:
1. Enter TWRP;
2. After successfully entering TWRP, tap on Backup;
3. Check EFS;
4. If yes, wipe/Swipe to backup;
5. Wait for the backup process to complete.
Backup file is stored in internal memory in TWRP/BACKUPS/kodevice/ folder
Move this file to PC or laptop, you may need it later if your mobile IMEI is lost after flashing or update.
2. Restore IMEI
1. Copy the backup file to TWRP/BACKUPS/kodevice/ folder;
2. Then enter TWRP and select Restore;
3. Select the backup file and then swipe to restore.
4. Please wait for a while for the process to complete.
5. Done.
How to backup and restore IMEI (EFS partion) Android Phone without PC.
Hope useful..!