Post Reply

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

OP autoprime

6th November 2013, 01:19 AM   |  #1  
OP Recognized Contributor / Recognized Developer
Thanks Meter: 6,514
 
1,795 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:
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

KTU84Q (4.4.4 Release 2)
M8974A-2.0.50.1.17
AAAAANAZQ20500017.1
QUALCOMM Incorporated Jun 9 2014

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

LPX13D (L Preview)
M8974A-2.0.50.2.21
AAAAANAZQ20500024
QUALCOMM Incorporated Oct 1 2014

LRX22C (5.0.1)
M8974A-2.0.50.2.22
AAAAANAZQ20500024
QUALCOMM Incorporated Nov 17 2014

DOWNLOAD MODEMS FROM CODEFIRE HERE



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.
DO NOT RESTORE EFS BACKUPS TO ANYTHING OTHER THAN THE ORIGINAL PHONE.
Backing up EFS
In TWRP, flash the Nexus5_Flash2BackupEFS.zip linked below. Nexus5_Flash2BackupEFS.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/0/EFS_Backup/ instead.

Flashable EFS Download zip = HERE

To manually backup EFS:
Code:
adb shell
su
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 Nexus5_EFS_Flashable_Restore.zip 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 Nexus5_EFS_Flashable_Restore.zip in your /sdcard/EFS_Backup/ folder.

To manually restore EFS:
Code:
adb shell
su
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; 16th December 2014 at 01:23 AM.
The Following 437 Users Say Thank You to autoprime For This Useful Post: [ View ]
6th November 2013, 01:31 AM   |  #2  
Senior Member
The Internet
Thanks Meter: 447
 
1,618 posts
Join Date:Joined: Oct 2010
Donate to Me
More
This is one of the most valuable posts for hammerhead yet. Everyone should take 2 minutes and do this.
The Following 12 Users Say Thank You to Dungeon47 For This Useful Post: [ View ]
6th November 2013, 01:43 AM   |  #3  
Senior Member
Thanks Meter: 990
 
1,281 posts
Join Date:Joined: Aug 2012
Quote:
Originally Posted by autoprime

[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?
6th November 2013, 02:06 AM   |  #4  
Senior Member
Thanks Meter: 112
 
514 posts
Join Date:Joined: Dec 2011
More
Great work. Thanks for the piece of mind

Sent from my SGH-I337M
6th November 2013, 02:28 AM   |  #5  
Recognized Contributor
Thanks Meter: 1,289
 
3,202 posts
Join Date:Joined: Aug 2012
More
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 "";
The Following 4 Users Say Thank You to Aerowinder For This Useful Post: [ View ]
6th November 2013, 02:41 AM   |  #6  
Senior Member
Jacksonville
Thanks Meter: 900
 
4,033 posts
Join Date:Joined: Aug 2011
More
What's efs?

Sent from my Nexus 5 using Tapatalk
6th November 2013, 02:48 AM   |  #7  
Senior Member
Thanks Meter: 603
 
765 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, 02:55 AM   |  #8  
Senior Member
linux command line
Thanks Meter: 569
 
1,568 posts
Join Date:Joined: Jul 2010
More
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, 03:13 AM   |  #9  
Senior Member
Ft. Lauderdale, FL
Thanks Meter: 253
 
1,613 posts
Join Date:Joined: Mar 2009
More
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, 03:22 AM   |  #10  
Senior Member
Pennsylvania
Thanks Meter: 525
 
2,018 posts
Join Date:Joined: Jan 2008
More
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 10: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