FORUMS
Remove All Ads from XDA

[EFS][IMEI][ZIP]Nexus 4 IMEI/EFS Backup/Restore Flashable Zip

353 posts
Thanks Meter: 683
 
By NABENDU1, Senior Member on 4th May 2014, 12:58 PM
Post Reply Email Thread
IMEI/EFS BACKUP

What is EFS/IMEI ?

Every Phone has a partition which contains data relating to your IMEI ,radio settings,data profiles etc.. This in particular is famous with Samsung devices which have the root /EFS folder and which is higly recommended to be backed up before flashing any Custom ROMs..However there is a common misconception that there is no EFS partition for the Nexus since there is no root /EFS Directory and everything is contained in dev/blocks ..

On the Nexus 4 the IMEI info is stored in the three blocks

m9kefs1 (/dev/block/mmcblk0p8)
m9kefs2 (/dev/block/mmcblk0p9)
m9kefs3 (/dev/block/mmcblk0p10)

These blocks contain all the IMEI info pertaining to your device.This data is highly Device specific that means each device has a different data in each block unlike the blocks for recovery,boot which are common for all . So EFS/IMEI of your device is Unique to your phone itself and hence it is necessary to backup your EFS.

WHY BACKUP EFS ?

1) Some points have been covered in the What section itself ( Unique to each device, important data)
2) Sometimes during a flash or even otherwise there is a bad block in your partition which corrupts a part of the EFS/IMEI partition . You are left with nothing but a dead weight you can use as a tablet without calling features or you will need to revert back to baseband version .27(This baseband seems magical since it still is able to read the corrupted data) and Android 4.2.2 .This makes it essential to backup your current partitions to flash the same if ever the same problem occurs with your device.

HOW TO BACKUP ?

FLASHABLE ZIP

Original Script from Nexus 5 thread courtesy @autoprime modified for the Nexus 4

*Download Nexus_4_Backup_EFS.zip to your SD Card from Links below!!
*
*Flash the same with TWRP/CWM no wipes needed-reboot
*
*This will create a flashable zip (efsbackupflashable.zip) in /sdcard/EFS_Backup/ ...
*
*If you can't find it under /sdcard/EFS_Backup/... try /data/media/EFS_Backup/ instead. (Thanks @pincher65 )
*
*Also the EFS_Backup will contain the raw images of the 3 blocks (m9kefs1.img,m9kefs2.img,m9kefs3.img)
*
*Note each of the 3 .imgs will be exactly of 780 kb each
*
*Save this folder to your PC/Email/Drive for safety purpose


DOWNLOAD LINKS FOR BACKUP

EXT4 Version ( If you dont know what F2FS is you are on ext4 )
Link https://drive.google.com/file/d/0Byr...it?usp=sharing
Mirror https://mega.co.nz/#!d98hyaqS!VXiuQJ...iejt3pyZVOl3co

F2FS Version (Only for devices with /system formatted as F2FS)
Link https://drive.google.com/file/d/0Byr...it?usp=sharing
Mirror https://mega.co.nz/#!dgc0AZDT!Jv0Lrc...21jSSiC3cJRU2E


Restoring EFS

***NOTE*** DO NOT USE YOUR BACKUP ON ANY OTHER NEXUS 4***/NOTE***

To restore your original EFS just boot into recovery and flash the efsbackupflashable.zip in your /sdcard/EFS_Backup folder.

If flashable zip wasn't created or to manually restore efs img files run the following commands using adb shell while in recovery

If saved in /sdcard/EFS_Backup

Code:
dd if=/sdcard/EFS_Backup/m9kefs1.img of=/dev/block/mmcblk0p8
dd if=/sdcard/EFS_Backup/m9kefs2.img of=/dev/block/mmcblk0p9
dd if=/sdcard/EFS_Backup/m9kefs3.img of=/dev/block/mmcblk0p10
If saved in /data/media/EFS_Backup/

Code:
dd if=/data/media/EFS_Backup/m9kefs1.img of=/dev/block/mmcblk0p8
dd if=/data/media/EFS_Backup/m9kefs2.img of=/dev/block/mmcblk0p9
dd if=/data/media/EFS_Backup/m9kefs3.img of=/dev/block/mmcblk0p10
CREDITS

Code:
 @autoprime : For his script and N5 thread 
@Rohit02    : For testing the Zip on F2FS and his amazing WA Grp :p
HIT THE THANKS BUTTON IF YOU LIKE MY WORK
The Following 27 Users Say Thank You to NABENDU1 For This Useful Post: [ View ] Gift NABENDU1 Ad-Free
 
 
4th May 2014, 01:04 PM |#2  
Rohit02's Avatar
Senior Member
Flag Pune
Thanks Meter: 3,832
 
Donate to Me
More
Thanks for this good and VITAL thread for all Nexus4 users. Many users are going to be helped by this..
The Following User Says Thank You to Rohit02 For This Useful Post: [ View ] Gift Rohit02 Ad-Free
4th May 2014, 02:35 PM |#3  
perfoliate's Avatar
Senior Member
Thanks Meter: 164
 
More
This looks great, One thing I noticed though, downloading the F2FS version from Mega was that it was named the same as EXT4 version. Could you rename them to avoid confusion for users and prevent accidental flashing of the wrong format version. Also just to report the google drive links seem to just open up inside the folder and don't provide an option for downloading the zip as a package. Thanks a lot for your effort
4th May 2014, 03:15 PM |#4  
OP Senior Member
Flag MUMBAI
Thanks Meter: 683
 
More
Quote:
Originally Posted by perfoliate

This looks great, One thing I noticed though, downloading the F2FS version from Mega was that it was named the same as EXT4 version. Could you rename them to avoid confusion for users and prevent accidental flashing of the wrong format version. Also just to report the google drive links seem to just open up inside the folder and don't provide an option for downloading the zip as a package. Thanks a lot for your effort

Yup the names are the same for ext4 and f2fs but on the thread it specifically mentions the ext4 links separate than f2fs !! I think I'll change it later !! Also if you request desktop version in chrome youll be able to view the download tab !! Anyways will fix it though I dont like drive a lot
4th May 2014, 03:22 PM |#5  
perfoliate's Avatar
Senior Member
Thanks Meter: 164
 
More
Quote:
Originally Posted by NABENDU1

Yup the names are the same for ext4 and f2fs but on the thread it specifically mentions the ext4 links separate than f2fs !! I think I'll change it later !! Also if you request desktop version in chrome youll be able to view the download tab !! Anyways will fix it though I dont like drive a lot

Thanks. I realized they were separate links but some people like myself might download both. I tried requesting desktop version as well as trying on my PC. Hmm. Maybe I could try another browser, but mega worked just fine. Anyway thanks again for doing this
.

Sent from my Nexus 4 using Tapatalk
The Following User Says Thank You to perfoliate For This Useful Post: [ View ] Gift perfoliate Ad-Free
4th May 2014, 03:28 PM |#6  
Senior Member
Flag nizniy novgorod
Thanks Meter: 66
 
More
Quote:

*
*This will create a flashable zip (efsbackupflashable.zip) in /sdcard/EFS_Backup/
*

CWM made in data/media/EFS_Backup/ (mnt/shell/emulated/***)
The Following User Says Thank You to pincher65 For This Useful Post: [ View ] Gift pincher65 Ad-Free
4th May 2014, 03:36 PM |#7  
OP Senior Member
Flag MUMBAI
Thanks Meter: 683
 
More
Quote:
Originally Posted by pincher65

CWM made in data/media/EFS_Backup/ (mnt/shell/emulated/***)

OP changed !! Twrp in my case created it in SD card !! Thx for the heads up !!
4th May 2014, 04:29 PM |#8  
Senior Member
Flag nizniy novgorod
Thanks Meter: 66
 
More
Quote:
Originally Posted by pincher65

CWM made in data/media/EFS_Backup/ (mnt/shell/emulated/***)

and code adb shell
Code:
dd if=/data/media/EFS_Backup/m9kefs1.img of=/dev/block/mmcblk0p8
dd if=/data/media/EFS_Backup/m9kefs2.img of=/dev/block/mmcblk0p9
dd if=/data/media/EFS_Backup/m9kefs3.img of=/dev/block/mmcblk0p10
5th May 2014, 06:28 AM |#9  
eltonpestana's Avatar
Senior Member
Flag Matinhos
Thanks Meter: 135
 
Donate to Me
More
hello here i cant find my backup?
5th May 2014, 07:07 AM |#10  
Rohit02's Avatar
Senior Member
Flag Pune
Thanks Meter: 3,832
 
Donate to Me
More
Quote:
Originally Posted by eltonpestana

hello here i cant find my backup?

If twrp used, backup is in EFS_Backup folder and for CWM recovery see the above post.
The Following User Says Thank You to Rohit02 For This Useful Post: [ View ] Gift Rohit02 Ad-Free
27th May 2014, 01:22 PM |#11  
OP Senior Member
Flag MUMBAI
Thanks Meter: 683
 
More
Was surfing through the Nexus 5 Forums !! Saw more than 750 posts or 75 pages for the EFS Backup Thread out there !! Seems that guys owning the N4 dont seem interested in backing up their IMEI partitions !! Anyways ppl have a nyc day ahead !!

ps: too many typos im making today !!
The Following User Says Thank You to NABENDU1 For This Useful Post: [ View ] Gift NABENDU1 Ad-Free
Post Reply Subscribe to Thread

Tags
efs, efs backup, imei, imei backup, imei restore

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes