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

[MODEM] [EFS] Nexus 5 Flashable Modems and EFS Backup [KTU84P]

Tip us?
 
autoprime
Old
(Last edited by autoprime; 27th June 2014 at 10:06 PM.)
#1  
autoprime's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 4,812
Posts: 1,609
Join Date: Jun 2010

 
DONATE TO ME
Default [MODEM] [EFS] Nexus 5 Flashable Modems and EFS Backup [KTU84P]


Nexus 5 Modems
All modems are in .zip and .img format. Flash .zip in custom recovery(TWRP/CWM/etc). Flash .img in bootloader/fastboot.

Modems link = HERE

Fun fact: The D820 and D821 modems have matching md5 sums. They are the same modem byte for byte.
This means there are no "D820 modems" or D821 modems".. there are just "Nexus 5 modems"

And no!! Flashing, for example, a D821 modem to a D820 will NOT give your D820 the D821 LTE bands.

To dump your modem to the root of your internal sdcard:
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/modem of=/sdcard/modem.img


D820
GSM: 850/900/1800/1900 MHz
CDMA: Band Class: 0/1/10
WCDMA: Bands: 1/2/4/5/6/8/19
LTE: Bands: 1/2/4/5/17/19/25/26/41


D821
GSM: 850/900/1800/1900 MHz
WCDMA: Bands: 1/2/4/5/6/8
LTE: Bands: 1/3/5/7/8/20



KFS78N (4.4)
M8974A-1.0.25.0.12
AAAAANAZQ1025010
QUALCOMM Incorporated Sept 27 2013

KQS81M (4.4)
M8974A-1.0.25.0.13
AAAAANAZQ1025015
QUALCOMM Incorporated Sept 30 2013

KRT01B (4.4)
M8974A-1.0.25.0.15
AAAAANAZQ1025019
QUALCOMM Incorporated Oct 29 2013

KRT16M (4.4)
M8974A-1.0.25.0.17
AAAAANAZQ1025019
QUALCOMM Incorporated Oct 11 2013

KOT49E (4.4.1)
M8974A-1.0.25.0.23
AAAAANAZQ1025019
QUALCOMM Incorporated Nov 19 2013

KTU84M (4.4.3)
M8974A-2.0.50.1.13
AAAAANAZQ20500017.1
QUALCOMM Incorporated May 7 2014

KTU84P (4.4.4)
M8974A-2.0.50.1.16
AAAAANAZQ20500017.1
QUALCOMM Incorporated Jun 4 2014

LPV79 (L Preview)
M8974A-2.0.50.2.08
AAAAANAZQ20500018
QUALCOMM Incorporated May 7 2014



EFS Backup
The Nexus 5 has no built in EFS backup partitions. EFS contains things like your MEID or IMEI... your data profiles.. radio settings. The EFS cannot be replaced... it is unique to your phone only... backing up your OWN EFS is highly recommended.

Update: dees_troy has added EFS backup into TWRP. This does not make my zip obsolete... but the EFS is getting backed up the same way. My zip backs up the 2 EFS partitions and packs them into a flashable zip which you can restore in any recovery. TWRP backs up the EFS just like it does Data, Boot and System.

I want to point out... if using TWRP to backup EFS... try to have an original backup and save that off the device somewhere. Down the road you may end up with lots of EFS backups(if you backup via TWRP each time) and somewhere along the line you could mess your EFS up.. perhaps worse over the course of a month. If you get into the habbit of only saving your most recent EFS backup... that recent EFS backup may already be partially damaged. I'm not saying don't make frequent backups.. just have the very first one tucked away somewhere.
DO NOT RESTORE TWRP EFS BACKUPS TO ANYTHING OTHER THAN THE ORIGINAL PHONE.
Backing up EFS
In TWRP, flash the Nexus_5_Backup_EFS.zip linked below. Nexus_5_Backup_EFS.zip creates a flashable zip backup of your EFS in /sdcard/EFS_Backup/. Please check to make sure the backup zip worked and actually made a .zip file. If you can't find it under /sdcard/EFS_Backup/... try /data/media/EFS_Backup/ instead.

Flashable EFS Download zip = HERE

Backup your efsbackupflashable.zip somewhere else besides your internal SD!!! Email.. cloud.. PC..

Restoring EFS
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:

dd if=/sdcard/EFS_Backup/efs1.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst1
dd if=/sdcard/EFS_Backup/efs2.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst2

The Following 371 Users Say Thank You to autoprime For This Useful Post: [ Click to Expand ]
 
Dungeon47
Old
#2  
Dungeon47's Avatar
Senior Member
Thanks Meter 438
Posts: 1,593
Join Date: Oct 2010
Location: The Internet

 
DONATE TO ME
This is one of the most valuable posts for hammerhead yet. Everyone should take 2 minutes and do this.
Nexus 5 | OMNI | FrancoKernel | Xposed | How to Battery
Support your devs. Search, read OP before asking. Android Wishlist
The Following 12 Users Say Thank You to Dungeon47 For This Useful Post: [ Click to Expand ]
 
Nbsss
Old
#3  
Nbsss's Avatar
Senior Member
Thanks Meter 965
Posts: 1,277
Join Date: Aug 2012
Quote:
Originally Posted by autoprime View Post
[INDENT]

Don't see your modem version? If you have a D821 please PM me.
Great work!
I have a D821 (international), i've copied the modem file from /dev/block/platform/msm_sdcc.1/by-name/modem to my sdcard using rootexplorer.
Is this the file you're looking for?
 
mymusicathome
Old
#4  
mymusicathome's Avatar
Senior Member
Thanks Meter 106
Posts: 485
Join Date: Dec 2011
Great work. Thanks for the piece of mind

Sent from my SGH-I337M
 
Aerowinder
Old
#5  
Recognized Contributor
Thanks Meter 1,216
Posts: 3,089
Join Date: Aug 2012
Here it is in script format. Not recovery flashable, not directly restorable. Requires busybox.

Code:
echo "";
echo "Creating backup directory: /storage/sdcard0/EFS Backup.";
mkdir -p "/storage/sdcard0/EFS Backup/temp/";
cd "/storage/sdcard0/EFS Backup/temp/";

echo "Commencing backup...";

echo "Copying mmcblk0p12: modemst1";
dd if=/dev/block/mmcblk0p12 of=p12_modemst1.img > /dev/null 2>&1;
echo "Copying mmcblk0p13: modemst2";
dd if=/dev/block/mmcblk0p13 of=p13_modemst2.img > /dev/null 2>&1;

datetime=$(date +'%Y%m%d_%H%M');
echo "Compressing backup (backup_$datetime.tar.gz)...";
tar -chzf "/storage/sdcard0/EFS Backup/backup_$datetime.tar.gz" *;

echo "Cleaning up...";
rm -rf "/storage/sdcard0/EFS Backup/temp/";
echo "Backup complete!";
echo "";
 

Google Firmware: Google
USB Drivers: Google | Mirror
ADB+ADB Drivers: 19.0.2 (4.4.4) + Koush Universal ADB Drivers

TWRP Official: hammerhead | flo
TWRP Holofied: hammerhead | flo

Gapps: BaNkS

Superuser: Chainfire | Mirror
The Following 4 Users Say Thank You to Aerowinder For This Useful Post: [ Click to Expand ]
 
casonswag
Old
#6  
casonswag's Avatar
Senior Member
Thanks Meter 896
Posts: 3,944
Join Date: Aug 2011
Location: Jacksonville
What's efs?

Sent from my Nexus 5 using Tapatalk
 
theesotericone
Old
#7  
theesotericone's Avatar
Senior Member
Thanks Meter 303
Posts: 579
Join Date: Sep 2013
This is what I've been waiting for. Well this and my device. lol Thanks.
The Following User Says Thank You to theesotericone For This Useful Post: [ Click to Expand ]
 
gee one
Old
#8  
gee one's Avatar
Senior Member
Thanks Meter 565
Posts: 1,560
Join Date: Jul 2010
Location: linux command line
Can these be pulled with adb? I wrote a script to dump everything using adb. It should be the same end result, right?
HTC Dream
HTC Vision
ASUS Transformer

If you found this post helpful, please consider a donation to charity:
World Vision
International Red Cross
Wikipedia
International Justice Mission
or pick your own
 
pathtologos
Old
#9  
pathtologos's Avatar
Senior Member
Thanks Meter 239
Posts: 1,531
Join Date: Mar 2009
Location: Ft. Lauderdale, FL
So efs isn't getting backed up with regular twrp system, data, boot options checked? I'm guessing we keep the back up separate--just a "just in case" thing, am I right? In general, we should be able to backup, flash, and restore without ever losing efs, correct?

Thanks all.

Nexus 5--That is all.
 
riassan
Old
(Last edited by imfloflo; 7th November 2013 at 09:12 AM.)
#10  
riassan's Avatar
Senior Member
Thanks Meter 525
Posts: 2,017
Join Date: Jan 2008
Location: Pennsylvania
What's up Killa long time. Thanks for providing bro. How's philly treating you? Need to come hit Pats or Ginos.

Sent from my Nexus 7 using Tapatalk 4

The Following 2 Users Say Thank You to riassan For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes