CyanogenMod 12.1 for YU Yureka

YU Yureka recently received an official Cyanogen OS 12S update. If you prefer to use a newer revision of … more

Open War for Open Android: Antitrust for Cyanogen?

Android and openness is something we talk about all the time, but the recent … more

What Do You Do with All of Your Old Photos?

Smartphone cameras have advanced so tremendously over the past few years that they have … more

Diving into the April 2015 Material Design Update

Before the release of Android 5.0 Lollipop, the Holo Design guidelines served as the … more
Post Reply Subscribe to Thread Email Thread

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

6th November 2013, 12:19 AM |#1  
autoprime's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 7,311
1,890 posts
Join Date:Joined: Jun 2010
Donate to Me

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

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:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modem of=/sdcard/modem.img

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

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

[See HERE to Enable LTE Bands 3/8 on D820 and LTE Bands 2/4 on D821]

KFS78N (4.4)
QUALCOMM Incorporated Sept 27 2013

KQS81M (4.4)
QUALCOMM Incorporated Sept 30 2013

KRT01B (4.4)
QUALCOMM Incorporated Oct 29 2013

KRT16M (4.4)
QUALCOMM Incorporated Oct 11 2013

KOT49E (4.4.1)
QUALCOMM Incorporated Nov 19 2013

KTU84M (4.4.3)
QUALCOMM Incorporated May 7 2014

KTU84P (4.4.4)
QUALCOMM Incorporated Jun 4 2014

KTU84Q (4.4.4 Release 2)
QUALCOMM Incorporated Jun 9 2014

LPV79 (L Preview)
QUALCOMM Incorporated May 7 2014

LPX13D (L Preview)
QUALCOMM Incorporated Oct 1 2014

LRX22C (5.0.1)
QUALCOMM Incorporated Nov 17 2014

LMY47D (5.1)
QUALCOMM Incorporated Jan 14 2015


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.

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 habit 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.
Backing up EFS
In TWRP, flash the linked below. 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/0/EFS_Backup/ instead.

Flashable EFS Download zip = HERE

To manually backup EFS:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/sdcard/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/sdcard/modemst2.img
Backup your or EFS partitions somewhere else besides your internal SD!!! Email.. cloud.. PC..

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

To manually restore EFS:
adb shell
dd if=/sdcard/modemst1.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst1
dd if=/sdcard/modemst2.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst2
Last edited by autoprime; 10th March 2015 at 04:45 AM.
The Following 469 Users Say Thank You to autoprime For This Useful Post: [ View ]
6th November 2013, 12:31 AM |#2  
Dungeon47's Avatar
Senior Member
Flag The Internet
Thanks Meter: 451
1,623 posts
Join Date:Joined: Oct 2010
Donate to Me
This is one of the most valuable posts for hammerhead yet. Everyone should take 2 minutes and do this.
The Following 13 Users Say Thank You to Dungeon47 For This Useful Post: [ View ]
6th November 2013, 12:43 AM |#3  
Nbsss's Avatar
Senior Member
Thanks Meter: 1,004
1,282 posts
Join Date:Joined: Aug 2012
Originally Posted by autoprime


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?
6th November 2013, 01:06 AM |#4  
mymusicathome's Avatar
Senior Member
Thanks Meter: 113
540 posts
Join Date:Joined: Dec 2011
Great work. Thanks for the piece of mind

Sent from my SGH-I337M
6th November 2013, 01:28 AM |#5  
Recognized Contributor
Thanks Meter: 1,309
3,273 posts
Join Date:Joined: Aug 2012
Here it is in script format. Not recovery flashable, not directly restorable. Requires busybox.

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 "";
The Following 4 Users Say Thank You to Aerowinder For This Useful Post: [ View ]
6th November 2013, 01:41 AM |#6  
casonswag's Avatar
Senior Member
Flag Jacksonville
Thanks Meter: 913
4,126 posts
Join Date:Joined: Aug 2011
What's efs?

Sent from my Nexus 5 using Tapatalk
6th November 2013, 01:48 AM |#7  
theesotericone's Avatar
Senior Member
Thanks Meter: 1,409
1,105 posts
Join Date:Joined: 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: [ View ]
6th November 2013, 01:55 AM |#8  
gee one's Avatar
Senior Member
Flag linux command line
Thanks Meter: 578
1,574 posts
Join Date:Joined: Jul 2010
Can these be pulled with adb? I wrote a script to dump everything using adb. It should be the same end result, right?
6th November 2013, 02:13 AM |#9  
pathtologos's Avatar
Senior Member
Flag Ft. Lauderdale, FL
Thanks Meter: 256
1,616 posts
Join Date:Joined: Mar 2009
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.
6th November 2013, 02:22 AM |#10  
riassan's Avatar
Senior Member
Flag Pennsylvania
Thanks Meter: 526
2,021 posts
Join Date:Joined: Jan 2008
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
Last edited by imfloflo; 7th November 2013 at 09:12 AM.
The Following 2 Users Say Thank You to riassan For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes