Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,436 Members 45,023 Now Online
XDA Developers Android and Mobile Development Forum

How to back up imei/efs?

Tip us?
 
serophia
Old
#1  
serophia's Avatar
Senior Member - OP
Thanks Meter 35
Posts: 185
Join Date: Feb 2013
Location: San Diego
Default How to back up imei/efs?

Does anyone know how to back them up? I came from a Samsung device and do not see the efs folder, I'm assuming it is stored elsewhere?

Sent from my XT1034 using xda app-developers app
 
KJ
Old
#2  
KJ's Avatar
Recognized Contributor
Thanks Meter 2723
Posts: 6,784
Join Date: May 2011
Location: The boonies - southwest Ontario
That's only a Samsung thing.

Sent from my Moto X cellular telephone...
Sent from my N5, N7, Moto X, GTab3 or S2.

Need help with poor battery life on the N5...or any device really? Lots of info in first 3 posts! >>>>
[Battery Life Help] Troubleshoot Battery Issues Here....and Tips

 
serophia
Old
#3  
serophia's Avatar
Senior Member - OP
Thanks Meter 35
Posts: 185
Join Date: Feb 2013
Location: San Diego
Yea but for us its somewhere in a PDS folder I went to it but don't know which file to back up

Sent from my XT1034 using xda app-developers app
 
KJ
Old
#4  
KJ's Avatar
Recognized Contributor
Thanks Meter 2723
Posts: 6,784
Join Date: May 2011
Location: The boonies - southwest Ontario
Backing it up was a safeguard for Samsung devices. Its not practiced on other phones...if it exists...which I don't think it does. And if it does....it is meaningless on non Samsung phones. Backing it up that is.

Google it.

Sent from my Moto X cellular telephone...
Sent from my N5, N7, Moto X, GTab3 or S2.

Need help with poor battery life on the N5...or any device really? Lots of info in first 3 posts! >>>>
[Battery Life Help] Troubleshoot Battery Issues Here....and Tips

 
lost101
Old
#5  
Senior Member
Thanks Meter 450
Posts: 882
Join Date: May 2008
A number of people appear to have already managed to loose their IMEI, so it might be worth finding a way to back it up.

If serophia is correct, and imei is stored in the 'pds' partition - it could be backed up using adb:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/pds of=/sdcard/pds.img
To restore:
dd if=pds.img of=/dev/block/platform/msm_sdcc.1/by-name/pds
The pds.img could also be turned into a cwm flashable zip:
ui_print("Restoring IMEI ...");
package_extract_file("pds.img", "/dev/block/mmcblk0p26");
ui_print("Finished!"); ui_print();
Maybe someone could make a tool to simply the process further?

Further information:
Quote:
In addition to the EFS partition, there are several partitions on our n9005 devices that do not exist in official odin roms.

This means that they must be unique to your phone, and they might be as important to back up as the EFS folder to prevent IMEI loss or other problems (like those bootloops many people get when flashing kernels, which appear to be tied to corrupted modemst1 partitions).

These partitions are: modemst1, modemst2, fsg, fsc, backup, dbi, ddr, pad
http://forum.xda-developers.com/show....php?t=2617276
Full list of partitions on Moto G:
 

DDR -> /dev/block/mmcblk0p3
aboot -> /dev/block/mmcblk0p4
abootBackup -> /dev/block/mmcblk0p11
boot -> /dev/block/mmcblk0p31
cache -> /dev/block/mmcblk0p33
cid -> /dev/block/mmcblk0p25
clogo -> /dev/block/mmcblk0p28
dhob -> /dev/block/mmcblk0p20
fsc -> /dev/block/mmcblk0p22
fsg -> /dev/block/mmcblk0p21
hob -> /dev/block/mmcblk0p19
kpan -> /dev/block/mmcblk0p35
logo -> /dev/block/mmcblk0p27
logs -> /dev/block/mmcblk0p9
misc -> /dev/block/mmcblk0p30
modem -> /dev/block/mmcblk0p1
modemst1 -> /dev/block/mmcblk0p17
modemst2 -> /dev/block/mmcblk0p18
padA -> /dev/block/mmcblk0p10
padB -> /dev/block/mmcblk0p16
pds -> /dev/block/mmcblk0p26
persist -> /dev/block/mmcblk0p29
recovery -> /dev/block/mmcblk0p32
rpm -> /dev/block/mmcblk0p5
rpmBackup -> /dev/block/mmcblk0p12
sbl1 -> /dev/block/mmcblk0p2
sdi -> /dev/block/mmcblk0p7
sdiBackup -> /dev/block/mmcblk0p14
sp -> /dev/block/mmcblk0p24
ssd -> /dev/block/mmcblk0p23
system -> /dev/block/mmcblk0p34
tz -> /dev/block/mmcblk0p6
tzBackup -> /dev/block/mmcblk0p13
userdata -> /dev/block/mmcblk0p36
utags -> /dev/block/mmcblk0p8
utagsBackup -> /dev/block/mmcblk0p15
The Following 2 Users Say Thank You to lost101 For This Useful Post: [ Click to Expand ]
 
drfr
Old
#6  
drfr's Avatar
Senior Member
Thanks Meter 531
Posts: 893
Join Date: Jul 2011
Location: Púchov
@serophia, @lost101

I understand Nexus 5 stores IMEI in modemst1 and/or modemst2.
Isnīt this our case too?
Where did you get the info about pds from?
Device: Moto G 8GB non-LTE bought from Amazon.de
Current ROM: German Retail 4.4.4
Previous ROMs: German retail 4.3, German retail 4.4.2, US retail 4.4.3, GPE 4.4.4 Build KTU84P.M003, French retail 4.4.4
Workflow: 1. read - 2. think - 3. try - 4. goto 1
 
lost101
Old
(Last edited by lost101; 23rd February 2014 at 12:40 PM.)
#7  
Senior Member
Thanks Meter 450
Posts: 882
Join Date: May 2008
Quote:
Originally Posted by drfr View Post
@serophia, @lost101

I understand Nexus 5 stores IMEI in modemst1 and/or modemst2.
Isnīt this our case too?
Where did you get the info about pds from?
Both modemst1 and modemst2 can be safely wiped without losing IMEI. When restoring Stock Firmware the following commands are included:
fastboot erase modemst1
fastboot erase modemst2
That is not to say IMEI is not stored there temporarily; but it must exist another more permanent location. AFAIK, 'pds' is not touched by any normal fastboot firmware flashing process making it a good candidate.

EDIT: Searching XDA for "pds partition imei" turns up mainly Motorola devices. It appears to be the permanent location of a few unique device indendifiers:
Well it's kinda obvious, you need to flash a retail /pds partition. The thing is, you wont get it, cuz it has sensitive data like IMEI, MAC address, serial number, etc.
[source]
 
RestlessScreams
Old
#8  
RestlessScreams's Avatar
Senior Member
Thanks Meter 69
Posts: 215
Join Date: Oct 2012
And how could I edit the pds.img to find/restore my imei?
Because if I'm in fastboot and type getvar imei it's there, but in dialer it says "0".
Any help/solutions?
Maybe with a HEX editor?
 
drfr
Old
(Last edited by drfr; 23rd February 2014 at 03:52 PM.)
#9  
drfr's Avatar
Senior Member
Thanks Meter 531
Posts: 893
Join Date: Jul 2011
Location: Púchov
Quote:
Originally Posted by RestlessScreams View Post
And how could I edit the pds.img to find/restore my imei?
Because if I'm in fastboot and type getvar imei it's there, but in dialer it says "0".
Any help/solutions?
Maybe with a HEX editor?
You canīt edit it, I tried to look with hex editor. Thatīs why it is good idea to back it up before something bad happens, sorry.

---------- Post added at 04:38 PM ---------- Previous post was at 04:32 PM ----------

Quote:
Originally Posted by lost101 View Post
fastboot erase modemst1
fastboot erase modemst2
Yeah, thatīs what I realized too.
Even if itīs there just temporarily, itīs there and it wonīt do any harm to back them up besides the pds partition.
Edit: btw just noticed that the pds size is exactly a sum of modemst1 + 2 sizes. I know that that doesnīt prove anything but...
Another thing - Iīve read somewhere from a user who compared hashes of his multiple modemst backups and they differed. Apparently there are some other non-constant infos stored there besides IMEI, thatīs why it is erased during fastboot flash.
Device: Moto G 8GB non-LTE bought from Amazon.de
Current ROM: German Retail 4.4.4
Previous ROMs: German retail 4.3, German retail 4.4.2, US retail 4.4.3, GPE 4.4.4 Build KTU84P.M003, French retail 4.4.4
Workflow: 1. read - 2. think - 3. try - 4. goto 1
 
RestlessScreams
Old
#10  
RestlessScreams's Avatar
Senior Member
Thanks Meter 69
Posts: 215
Join Date: Oct 2012
Quote:
Originally Posted by drfr View Post
You canīt edit it, I tried to look with hex editor. Thatīs why it is good idea to back it up before something bad happens, sorry.

---------- Post added at 04:38 PM ---------- Previous post was at 04:32 PM ----------



Yeah, thatīs what I realized too.
Even if itīs there just temporarily, itīs there and it wonīt do any harm to back them up besides the pds partition.
Edit: btw just noticed that the pds size is exactly a sum of modemst1 + 2 sizes. I know that that doesnīt prove anything but...
Another thing - Iīve read somewhere from a user who compared hashes of his multiple modemst backups and they differed. Apparently there are some other non-constant infos stored there besides IMEI, thatīs why it is erased during fastboot flash.
So I'm prett fuc*d ?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes