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
[See HERE to Enable LTE Bands 3/8 on D820 and LTE Bands 2/4 on D821]
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
LMY47D (5.1)
M8974A-2.0.50.2.25
AAAAANAZQ20500024
QUALCOMM Incorporated Jan 14 2015
LMY48B (5.1.1)
M8974A-2.0.50.2.26
AAAAANAZQ20500024
QUALCOMM Incorporated Mar 26 2015
MRA58K (6.0)
M8974A-2.0.50.2.27
AAAAANAZQ20500024
QUALCOMM Incorporated Jun 24 2015
MMB29K (6.0.1)
M8974A-2.0.50.2.28
AAAAANAZQ20500024
QUALCOMM Incorporated Oct 20 2015
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 Backup 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
This is one of the most valuable posts for hammerhead yet. Everyone should take 2 minutes and do this.
autoprime said:
Don't see your modem version? If you have a D821 please PM me.
Click to expand...
Click to collapse
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?
Great work. Thanks for the piece of mind
Sent from my SGH-I337M
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 "";
What's efs?
Sent from my Nexus 5 using Tapatalk
This is what I've been waiting for. Well this and my device. lol Thanks.
Can these be pulled with adb? I wrote a script to dump everything using adb. It should be the same end result, right?
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.
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
gee one said:
Can these be pulled with adb? I wrote a script to dump everything using adb. It should be the same end result, right?
Click to expand...
Click to collapse
yes, tho id suggest using adb while in recovery and not while the phone is booted if possible.
pathtologos said:
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.
Click to expand...
Click to collapse
yes it's a just in case thing.. tho suggested if you're flashing stuff around. Never know when it may come in handy.
TWRP should be adding an EFS backup option.. you will soon see an EFS box to check along with the usual Boot, Data, System options.
pathtologos said:
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.
Click to expand...
Click to collapse
Yea... essentially just in case it happens. Was a known and fairly common occurrence on the Galaxy S3. Believe the issue was that that the IMEI number and such was stored essentially in an accessible part of storage, and there was a chance that performing a factory reset and flashing a new ROM could have wiped out the IMEI number stored on the phone... resulting in a tedious process of having to go in and manually re-enter it i believe through ADB somehow. It actually happened to my GS3, but thankfully i had actually performed said backup a month or a few prior to it happening, so getting it back was a breeze.
casonswag said:
What's efs?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Did you read the OP?
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.
grneyez said:
Did you read the OP?
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.
Click to expand...
Click to collapse
Um i didnt understand it thays why i was asking n was gonna ask do we have to back it up but i see u say recommended
Sent from my Nexus 5 using Tapatalk
I would highly recommend you doing so, its very easy and can save you a lot of headaches if the EFS gets screwed up somehow.
Sent from my Nexus 5 using Tapatalk
What is Modems and EFS backup?
A noob question
What is flashable Modem and EFS backup means?
Thanks in advance
Does this mean that the modems can be interchanged - made from D820 model D821?
Regards
So with the backup if we want to go back flash the modem then backup or vise versa?
Sent from my Nexus 5 using Tapatalk
casonswag said:
So with the backup if we want to go back flash the modem then backup or vise versa?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
root/unlock bootloader... install twrp.. backup efs... store efs backup off the device somewhere... flash modems/roms/anything you want.
autoprime said:
root/unlock bootloader... install twrp.. backup efs... store efs backup off the device somewhere... flash modems/roms/anything you want.
Click to expand...
Click to collapse
What about going back to normal modem i had flash the latest modem then the backup?
Sent from my Nexus 5 using Tapatalk
Related
I have now seen a number of cases of the EFS partition getting wiped / corrupted on the SGS II, leaving users with an effectively useless phone.
With this in mind, i've written a little init.d script for my ROM which backs up the EFS partition on boot if a backup does not already exist. A non intrusive safety net for users if you will.
The script just needs a suitable boot image that runs init.d, although it could easily be tacked onto the end of install-recovery.sh if that's not the case.
I'd love to encourage all developers to use this script for users' sake!
You can download the script here - http://cl.ly/2j0p0R3F07052m2T2u0e - but it's very simple, here's the code...
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs.autobackup.img ];
then
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs.autobackup.img
fi
umount /sdcard
Note the manual mount / umount of sdcard is necessary because this happens late in the boot process.
Cheers!
P
Hats of to you Paul.Although I have already made a backup of my EFS folder,such a script would save MANY people from A LOT of trouble.
tolis626 said:
Hats of to you Paul.Although I have already made a backup of my EFS folder,such a script would save MANY people from A LOT of trouble.
Click to expand...
Click to collapse
i havent...never did. i think i wiped about a hundred times now and flashed and reflashed...is it possible to recover the efs folder?
haasgo said:
i havent...never did. i think i wiped about a hundred times now and flashed and reflashed...is it possible to recover the efs folder?
Click to expand...
Click to collapse
If your phone is working, it means your EFS partition is still there...
You can back it up using the many tutorials out there in the forum...
Sent from my GT-I9100 using XDA Premium App
Problem is that the users who read how to backup EFS folder fall in to two category s those that read up first and would have backed up EFS and those that only pick the manual up after something is broke .
This script would be a saver for many of the second group and big thanks to Paul and i hope devs do run with it .
jje
I would like to adapt your script for Nexus S.
Once i got the img file of efs partition, how do can a make a script for restoring thet img file to efs partition?
Or what to do with that img file?
EDIT: @ paul - One more question - how do I mount /sdcard on Nexus S through the script? mount command in the Terminal Emulator shows my /dev/blocks/vold/179:3 as mount point, but if I use that mount point in the script it won't mount the /sdcard. Any idea?
EDIT2: I got it working with this command:
mount /dev/block/platform/s3c-sdhci.0/by-name/media /sdcard
and I got the efs.autobackup.img on my sdcard.
How do I restore the efs.autobackup.img to efs partition?
Thanks Paul this is a very useful utility hope it gets sticky
May i ask what conditions these people are falling foul of getting the EFS wiped? Is it rouge roms/cwm zips, wiping to much in recovery, Odin flashing?
Curious so i may steer clear, have a backup but staying away is half the battle
paulobrien said:
You can download the script here - http://cl.ly/2j0p0R3F07052m2T2u0e - but it's very simple, here's the code...
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs.autobackup.img ];
then
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs.autobackup.img
fi
umount /sdcard
Click to expand...
Click to collapse
Hi Paul, I have modified your script so that it makes a tar file, tar file keeps the permissions for the efs partition and its easier to restore. Here it is:
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs_autobackup/efs-backup.tar.gz ];
then
mkdir /mnt/sdcard/efs_autobackup
busybox tar zcvf /sdcard/efs_autobackup/efs-backup.tar.gz /efs
fi
umount /sdcard
mynamesteve said:
Thanks Paul this is a very useful utility hope it gets sticky
May i ask what conditions these people are falling foul of getting the EFS wiped? Is it rouge roms/cwm zips, wiping to much in recovery, Odin flashing?
Curious so i may steer clear, have a backup but staying away is half the battle
Click to expand...
Click to collapse
Some hit "wipe EFS" in ODIN.
It's possible to mess up a zip badly enough to wipe EFS
A normal wipe shouldn't do it, but a bad CWM build could in theory do it...
A dodgy "virus" could do it, if it were targetting rooted phones, or had a root exploit.
That's why I keep an EFS backup on my PC and off-site
brainmaster said:
Hi Paul, I have modified your script so that it makes a tar file, tar file keeps the permissions for the efs partition and its easier to restore.
Click to expand...
Click to collapse
Nope dd is much better, but safer to have both, but dd should be used with bs=4096k option.
how to restore the efs folder?
how to restore the efs folder?
Please, need to restore EFS, not sure what happened but tried installing Cognition R3 and lost my EFS, I do however have a prior efs.autobackup. Please help.
Hello,
I'm trying to get back to working 911. I've used Odin to flash all the way back to stock Eclair, yet when I dial 911 it just hangs right up without connecting. I flashed Froyo and the same thing. I thought all I needed to do was flash back to an earlier rom? Can someone point me in the right direction?
If it doesn't work on stock, it's probably a busted efs.
1) Go in About Phone > Status and check if your IMEI is "004999010640000"
2) You'll want to restore your efs. Check your sd card for a folder called "backup" and a folder inside that called "efs", copy that the "efs" folder into root, replacing the efs folder there, then reboot. You'll want root for that. Then go in and check that your IMEI is not 004999010640000
FaultException said:
If it doesn't work on stock, it's probably a busted efs.
1) Go in About Phone > Status and check if your IMEI is "004999010640000"
2) You'll want to restore your efs. Check your sd card for a folder called "backup" and a folder inside that called "efs", copy that the "efs" folder into root, replacing the efs folder there, then reboot. You'll want root for that. Then go in and check that your IMEI is not 004999010640000
Click to expand...
Click to collapse
Yeah my IMEI is "004999010640000". So I'm going to check for the efs back up. I'll report back.
FaultException said:
If it doesn't work on stock, it's probably a busted efs.
1) Go in About Phone > Status and check if your IMEI is "004999010640000"
2) You'll want to restore your efs. Check your sd card for a folder called "backup" and a folder inside that called "efs", copy that the "efs" folder into root, replacing the efs folder there, then reboot. You'll want root for that. Then go in and check that your IMEI is not 004999010640000
Click to expand...
Click to collapse
There wasn't an efs folder in the root to copy over. But I did go ahead and copy the efs folder that was inside of the backup folder to the root and rebooted and my IMEI is still "004999010640000"
ImHavenHart said:
There wasn't an efs folder in the root to copy over. But I did go ahead and copy the efs folder that was inside of the backup folder to the root and rebooted and my IMEI is still "004999010640000"
Click to expand...
Click to collapse
Oh did you copy it into the root of the sd card? Because I meant the root of the device.
FaultException said:
Oh did you copy it into the root of the sd card? Because I meant the root of the device.
Click to expand...
Click to collapse
I accidentally copied to the root of sd and then noticed you meant the root of the device. So I went ahead and copied to the root of the device and restarted and still have the same fake imei number. I even tried the "Recover your imei in 9 steps" tutorial and no luck. Now I'm using EFS Pro to see if I can restore or repair or something. Ugh. I just moved into my own apartment (I used to live with a male roommate) and seeing as though I am a female living alone now, I really need 911 in case of an emergency. I'm considering just buying a new phone I'm so frustrated. When I attempt to scan with EFS Pro it says "no backup to restore" even though there is a back up.
Are there multiple efs folders in the backup folder on your sd card?
FaultException said:
Are there multiple efs folders in the backup folder on your sd card?
Click to expand...
Click to collapse
Yeah there is one marked "EFS" and then about 20 others like "efs-770" "efs-759, "efs-659" etc
ImHavenHart said:
Yeah there is one marked "EFS" and then about 20 others like "efs-770" "efs-759, "efs-659" etc
Click to expand...
Click to collapse
Okay, sort by date and find the oldest one and then go and delete the contents of your root /efs folder and copy the files from the oldest efs backup into the root /efs folder then reboot and check.
FaultException said:
Okay, sort by date and find the oldest one and then go and delete the contents of your root /efs folder and copy the files from the oldest efs backup into the root /efs folder then reboot and check.
Click to expand...
Click to collapse
K I'm copying the contents now..................
FaultException said:
Okay, sort by date and find the oldest one and then go and delete the contents of your root /efs folder and copy the files from the oldest efs backup into the root /efs folder then reboot and check.
Click to expand...
Click to collapse
I sorted to the oldest, which was from December 2011 and deleted the files in the root efs and copied the files from the December 2011 backup and rebooted. Same fake IMEI Arghhhh.
ImHavenHart said:
I sorted to the oldest, which was from December 2011 and deleted the files in the root efs and copied the files from the December 2011 backup and rebooted. Same fake IMEI Arghhhh.
Click to expand...
Click to collapse
What files do you see in the efs backup and what app are you using to move them?
FaultException said:
What files do you see in the efs backup and what app are you using to move them?
Click to expand...
Click to collapse
I'm using root explorer to copy and paste the files and I see the following 14 files in the backup:
.imei
.nv2.bak
.nv2.bak.md5
.nv.data.bak
.nv.data.bak.md5
.nv_state
cryptprop_applied_result
cryptprop_data
cryptprop_onetimeboo
tcryptprop_securewipedata
imei
nv.log
nv_data.bin
nv_data.bin.md5
I'm not sure if they're pasting correctly though. It says "merging" but shows today's date for the files instead of the Dec 2011 date that shows in the backup.
I renamed the .bak files to regular ones to see if that will restore the backups, the copied them to the root efs. rebooting now.
Okay try this, download a terminal emulator or use an adb shell and run these commands:
Code:
su
rm -r /efs/*
cp -r /mnt/sdcard/backup/efs-NNN /efs
Replacing NNN with the backup from December 2011.
Then close it and reboot.
FaultException said:
Okay try this, download a terminal emulator or use an adb shell and run these commands:
Code:
su
rm -r /efs/*
cp -r /mnt/sdcard/backup/efs-NNN /efs
Replacing NNN with the backup from December 2011.
Then close it and reboot.
Click to expand...
Click to collapse
When I try to run the command it says "cannot create" because there is no more space on device. Which is weird because I dont really have anything on here.
I did double check the time from the backup that copied to the root efs and it did update so the files were copied. Same fake imei though. I'm guessing all of the backups on my phone are of the fake imei because I got the phone in June 2010 and was flashing roms within two months, yet the earliest backup is December 2011. I vaguely remember upgrading my SD Card with one that had more space. So the original imei back up is probably long gone on my old SD Card. Is there any hope for restoring my imei and getting 911 or should I just get a new phone?
FaultException said:
Okay try this, download a terminal emulator or use an adb shell and run these commands:
Code:
su
rm -r /efs/*
cp -r /mnt/sdcard/backup/efs-NNN /efs
Replacing NNN with the backup from December 2011.
Then close it and reboot.
Click to expand...
Click to collapse
I haven't done anything else to it so far, yet I rebooted and now it saya IMEI unknown / null and I can't access tmobile network at all lol
ImHavenHart said:
I haven't done anything else to it so far, yet I rebooted and now it saya IMEI unknown / null and I can't access tmobile network at all lol
Click to expand...
Click to collapse
I'm back to the fake imei and now have tmobile connection. I tried http://forum.xda-developers.com/showthread.php?t=1264021 guide with no luck. It just puts me to an "unknown imei" with no network connection. So I have to delete the efs folder and hard reset to get back to the fake imei. I also tried to install HC-ktool IMEI Recovery app and it says "problem parsing package" and won't install the app. I'm guessing it's not compatible with Stock Eclair. Im going to try upgrading to froyo and try to get the HC-ktool IMEI recovery working. If all else fails I'm honestly just going to go buy a new phone today. Ive had this since it came out June 2010 which was over 2 years ago so maybe this is a reason to upgrade to the Galaxy S II or III.
FaultException said:
Okay try this, download a terminal emulator or use an adb shell and run these commands:
Code:
su
rm -r /efs/*
cp -r /mnt/sdcard/backup/efs-NNN /efs
Replacing NNN with the backup from December 2011.
Then close it and reboot.
Click to expand...
Click to collapse
I donated to you. Thanks for helping.
After hours of trying to get my imei back I just decided to try a rom that was known to have working 911 since that's all im after any way. I went with stock Gingerbread and 911 is working. I still have the generic imei but all I wanted was 911 so I'm all good.
LG Optimus G EFS Backup/Restore
Every rooted Optimus G user should backup their EFS partitions! Included in this thread is a flashable EFS backup script and terminal/adb commands if you want to do it manually. The script automates the entire backup of all 3 EFS partitions and then packs the files into a flashable zip for easy restoring later. Place this zip somewhere safe other than your sdcard!
Thanks goes to toastcfh for the script help and everyone in #lg-optimus-g that helped out with EFS testing.
Original Optimus G EFS Thread(ZERO EFS) - HERE
I have received an ATT EFS backup from an ATT user and will be attempting to create a ZERO EFS zip for ATT devices. This thread will be updated if I'm successful.
Background
You never know when your NV/EFS may stop working correctly. Restoring your WORKING EFS may save the day. A few users in the #lg-optimus-g IRC channel have run into issues and found their phone unusable, myself included. Our issues could have been fixed if an EFS backup was made while the phone was still in working order.
m9kefs1 seems to be radio related
m9kefs2 contains your unique phone identifiers: IMEI, phone number, etc
m9kefs3 seems to be blank 00s
Backing up EFS
It's easiest to run the Optimus_G_Create_Flashable_EFS.zip attached to this thread. Run in recovery. Optimus_G_Create_Flashable_EFS.zip creates a flashable zip backup of your EFS in /sdcard/EFS_Backup/(instead of just a .tar). Confirmed working on TWRP 2.3.2.3/2.4.1.0 and CWM 6.0.2.7. Confirmed NOT working on CWM 6.0.1.5. Please check to make sure the backup zip worked and actually made a .zip file in /sdcard/EFS_Backup. Any issues please list what recovery and version you are using and please post the recovery.log.
If you don't like convenience this can also be done manually with adb or terminal with the commands below.. root required.
Code:
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs1 of=/sdcard/m9kefs1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs2 of=/sdcard/m9kefs2.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs3 of=/sdcard/m9kefs3.img
Restoring EFS
To restore your original EFS just boot into recovery and flash the efsbackupflash.zip in your /sdcard/EFS_Backup folder.
If you don't like convenience this can also be done manually with adb or terminal with the commands below. Adjust the "dd if=/sdcard/" command depending on where your backup EFS .img files are located.
Code:
su
dd if=/sdcard/m9kefs1.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs1
dd if=/sdcard/m9kefs2.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs2
dd if=/sdcard/m9kefs3.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs3
Code:
[B]Changelog[/B]
[I]v1 EFS backup zip[/I]:
backed up m9kefs1.img and m9kefs2.img then .tar'd them.
[I]v2 EFS backup zip[/I]:
backed up EFS then creates a flashable .zip containing the EFS partitions.
[I]v3 EFS backup zip[/I]:
zip script is now "safer" and should work on all Optimus G variants.
[I]v4 EFS backup zip[/I]:
backup zip now backs up m9kefs3. this is for "completeness" only.
I believe m9kefs3 contains no worthwhile data.
Does this work on any of the Canadian variants?
on stock rooted firmware i run zip but the backup tar in nowhere to be found
sucsss said:
Does this work on any of the Canadian variants?
Click to expand...
Click to collapse
I know that the Telus version will work. I'd assume both Bell and Rogers have the same m9kefs1/m9kefs2 partitions as well.
Going to confirm then I will make a thread in the Canadian section as well.
pinkster said:
on stock rooted firmware i run zip but the backup tar in nowhere to be found
Click to expand...
Click to collapse
Hmm.. I've had confirmation from ATT users that this works... even received some EFS backups from them for further testing.
The zip no longer makes a .tar. You should have an EFS_Backup folder on your INTERNAL /sdcard containing both efs partitions as well as a flashable .zip backup. Please check the internal card and not the external. If there is still no backup to be found please post the recovery.log file after you flash Optimus_G_Create_Flashable_EFS.zip
All of my personal tests were done while using TWRP 2.4.1.0 . Can't confirm older TWRP versions or CWM.. but I see no reason why they shouldn't work as well.
*UPDATE*
The above issue was fixed after updating CWM. CWM 6.0.1.5 is no good. Upgrade.. or better yet.. switch to TWRP.
The latest cwm works perfectly, that's what I used.
Sent from my LG-E970 using Tapatalk 2
autoprime said:
I know that the Telus version will work. I'd assume both Bell and Rogers have the same m9kefs1/m9kefs2 partitions as well.
Going to confirm then I will make a thread in the Canadian section as well.
Hmm.. I've had confirmation from ATT users that this works... even received some EFS backups from them for further testing.
The zip no longer makes a .tar. You should have an EFS_Backup folder on your INTERNAL /sdcard containing both efs partitions as well as a flashable .zip backup. Please check the internal card and not the external. If there is still no backup to be found please post the recovery.log file after you flash Optimus_G_Create_Flashable_EFS.zip
All of my personal tests were done while using TWRP 2.4.1.0 . Can't confirm older TWRP versions or CWM.. but I see no reason why they shouldn't work as well.
Click to expand...
Click to collapse
I've got the E971. need any help to confirm?
sucsss said:
I've got the E971. need any help to confirm?
Click to expand...
Click to collapse
can u run this in adb/terminal: ls -la /dev/block/platform/msm_sdcc.1/by-name/
post output.. or at least confirm that you have an m9kefs1, m9kefs2 and m9kefs3. could you also post the actual locations of the 3.. like.. do they use /dev/block/mmcblk0p12 and /dev/block/mmcblk0p13 and /dev/block/mmcblk0p14 ?
Used the .zip in TWRP 2.3.2.3 and it successfully created backups of m9kefs1 & 2 it looks like.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Nexus 7 using Tapatalk HD
autoprime said:
can u run this in adb/terminal: ls -la /dev/block/platform/msm_sdcc.1/by-name/
post output.. or at least confirm that you have an m9kefs1, m9kefs2 and m9kefs3. could you also post the actual locations of the 3.. like.. do they use /dev/block/mmcblk0p12 and /dev/block/mmcblk0p13 and /dev/block/mmcblk0p14 ?
Click to expand...
Click to collapse
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs2 -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs3 -> /dev/block/mmcblk0p14
interesting note, why are the dates like that?
sucsss said:
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs1 -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs2 -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 1970-04-22 03:41 m9kefs3 -> /dev/block/mmcblk0p14
interesting question, why are the dates like that?
Click to expand...
Click to collapse
thanks for the update.. this confirms what i suspected.. its just like all the other Optimus G devices and the backup efs zip will work! I will post a new thread in the Canadian Dev forums so that it catches everyones eye.
i forget the technical reason for the date issue.. but its something with recovery not reporting the time correctly. it's the same with my device. sorry i dont have a better answer
nymica said:
The latest cwm works perfectly, that's what I used.
Sent from my LG-E970 using Tapatalk 2
Click to expand...
Click to collapse
Same here.
Well if latest you mean Sk8s CWMRTouch 6.0.2.7 14.4.7
I apologize for this noob question but what is the difference between this and making a nandroid backup or the one created in let us say twrp?
yhe2x said:
I apologize for this noob question but what is the difference between this and making a nandroid backup or the one created in let us say twrp?
Click to expand...
Click to collapse
as far as i know.. a nandroid doesn't backup the efs partition. a nandroid contains android data and system stuff.
*edit*
TWRP recovery should now have EFS backup in the "Backup" option when using an LG OG(this feature is not in all devices).
clorbag said:
so do i go into twrp and choose install zip to use this ?
Click to expand...
Click to collapse
If you dont want to use TWRP to backup EFS then yes, you can flash my zip in recovery.. just the the OP states.
DraginMagik said:
Can you elaborate on how we would know when we'd need to restore the EFS partition?
What would cause a problem with the EFS partition?
Sent from my Optimus G using xda premium
Click to expand...
Click to collapse
here's a bit more info on possible efs issues - http://forum.xda-developers.com/showpost.php?p=38350918&postcount=4
EFS is much more important on a CDMA device(what I use).. but its also good practice to do it on GSM devices. Example... Any time someone lost their IMEI and can't fix it no matter what modem/baseband they flash... restoring your EFS could maybe fix that.
autoprime said:
as far as i know.. a nandroid doesn't backup the efs partition. a nandroid contains android data and system stuff.
Click to expand...
Click to collapse
so do i go into twrp and choose install zip to use this ?
Can you elaborate on how we would know when we'd need to restore the EFS partition?
What would cause a problem with the EFS partition?
Sent from my Optimus G using xda premium
So rooting the phone isn't enough to use this flashable Zip, we should be on a customer Kernel that has either TWRP or Clockwork Mod, that is what I am getting from this so would I be correct? Thanks. I am more intimately familiar with the AT&T SGS2 SGH 777 and new to LG.
WarEagleUS said:
So rooting the phone isn't enough to use this flashable Zip, we should be on a customer Kernel that has either TWRP or Clockwork Mod, that is what I am getting from this so would I be correct? Thanks. I am more intimately familiar with the AT&T SGS2 SGH 777 and new to LG.
Click to expand...
Click to collapse
This device doesn't have recoveries baked into the kernel like the i777. They are flashed independently.
Sent from my Optimus G using Tapatalk 2
WarEagleUS said:
So rooting the phone isn't enough to use this flashable Zip, we should be on a customer Kernel that has either TWRP or Clockwork Mod, that is what I am getting from this so would I be correct? Thanks. I am more intimately familiar with the AT&T SGS2 SGH 777 and new to LG.
Click to expand...
Click to collapse
After rooting the boot loader must be unlocked with FreeGee app from play store. I think the latest version only has option to install twrp, but you can use that to flash cwm if you prefer it.
lg optimus G radio not working..helpp
autoprime said:
LG Optimus G EFS Backup/Restore
Every rooted Optimus G user should backup their EFS partitions! Included in this thread is a flashable EFS backup script and terminal/adb commands if you want to do it manually. The script automates the entire backup of all 3 EFS partitions and then packs the files into a flashable zip for easy restoring later. Place this zip somewhere safe other than your sdcard!
Thanks goes to toastcfh for the script help and everyone in #lg-optimus-g that helped out with EFS testing.
Original Optimus G EFS Thread(ZERO EFS) - HERE
I have received an ATT EFS backup from an ATT user and will be attempting to create a ZERO EFS zip for ATT devices. This thread will be updated if I'm successful.
Background
You never know when your NV/EFS may stop working correctly. Restoring your WORKING EFS may save the day. A few users in the #lg-optimus-g IRC channel have run into issues and found their phone unusable, myself included. Our issues could have been fixed if an EFS backup was made while the phone was still in working order.
m9kefs1 seems to be radio related
m9kefs2 contains your unique phone identifiers: IMEI, phone number, etc
m9kefs3 seems to be blank 00s
Backing up EFS
It's easiest to run the Optimus_G_Create_Flashable_EFS.zip attached to this thread. Run in recovery. Optimus_G_Create_Flashable_EFS.zip creates a flashable zip backup of your EFS in /sdcard/EFS_Backup/(instead of just a .tar). Confirmed working on TWRP 2.3.2.3/2.4.1.0 and CWM 6.0.2.7. Confirmed NOT working on CWM 6.0.1.5. Please check to make sure the backup zip worked and actually made a .zip file in /sdcard/EFS_Backup. Any issues please list what recovery and version you are using and please post the recovery.log.
If you don't like convenience this can also be done manually with adb or terminal with the commands below.. root required.
Code:
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs1 of=/sdcard/m9kefs1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs2 of=/sdcard/m9kefs2.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/m9kefs3 of=/sdcard/m9kefs3.img
Restoring EFS
To restore your original EFS just boot into recovery and flash the efsbackupflash.zip in your /sdcard/EFS_Backup folder.
If you don't like convenience this can also be done manually with adb or terminal with the commands below. Adjust the "dd if=/sdcard/" command depending on where your backup EFS .img files are located.
Code:
su
dd if=/sdcard/m9kefs1.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs1
dd if=/sdcard/m9kefs2.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs2
dd if=/sdcard/m9kefs3.img of=/dev/block/platform/msm_sdcc.1/by-name/m9kefs3
Code:
[B]Changelog[/B]
[I]v1 EFS backup zip[/I]:
backed up m9kefs1.img and m9kefs2.img then .tar'd them.
[I]v2 EFS backup zip[/I]:
backed up EFS then creates a flashable .zip containing the EFS partitions.
[I]v3 EFS backup zip[/I]:
zip script is now "safer" and should work on all Optimus G variants.
[I]v4 EFS backup zip[/I]:
backup zip now backs up m9kefs3. this is for "completeness" only.
I believe m9kefs3 contains no worthwhile data.
Click to expand...
Click to collapse
need helpp...i was on stock ics in optimus g e970, i tried flashing korean kdz onto it via R n D tool and messed it up...when i went back to stock via lgnpst, lost my radio (network signal).....now i have tried soooooooooo many things but no use....i guess this efs is the last left procedure and hope for me...helpp please....
i didnt backup my efs file and deleted everything.....now no radio, no sim working
You LGNPST'd a KOREAN FIRMWARE FFS. You richly deserve your misfortune. Your actions might constitute the most incredible "derp" that I've seen since migrating to this device.
Problem solved!
**********************
I think my problem happened because a flashed a ROM with MG4 baseband, and then flashed UltimaROM with another baseband which caused my baneband to corrupt.
I tried to flash Stock ROM and install different baseband but non of this worked.
finally I flashed BTU stock ROM (Which comes with MG4) but the problem still here.
Then I installed root, deleted the efs folder and replaced all the files with the files in the backup - restart and everything is working! my IMEI returned to normal.
**********************
Original question
Hello devs,
I have Siyah kernel which auto backup my EFS, i have backup named "efs_28Aug2013-1852.tar.gz"
I want to restore from this backup because I lost my IMEI when I flashed UltimaROM
I renamed it to "efsbackup.tar.gz" and put it in the root of the sdcard
then I started adb shell & run the code
Code:
su
umount /efs
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox tar zxvf /sdcard/ efsbackup.tar.gz -C /
I granted ADB shell root access
then i went to recovery and run the command (because I can't run umount /efs while device's running it gives resource busy message)
However when I run the first command "su" in gives me this message
Code:
/sbin/sh: su: not found
so I skipped to the next command
but I get the message
Code:
umount: can't umount /efs: Invalid argument
Please guys any help appreciated
Click to expand...
Click to collapse
Unzip it with a file manager and use a root explorer to replace manually
Sent from my GT-I9300 using Tapatalk 4
.
I've backup my efs with adb but how do you have a file on tar format, i've got a file on .img, it's normal ?
There's about nine different ways to backup the efs, .img is fine but a little on the large side at 20mb. A .tar of the same is only 5mb.
rootSU said:
Unzip it with a file manager and use a root explorer to replace manually
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
Thank you for your reply, I did as you said but this only changed my IMEI from "Unknown" to the generic IMEI "004999..."
Is there something wrong in the method or my backup may be corrupt
Sent from my Nexus 7 using Tapatalk 2
Read the imei / efs thread in general.
Sent from my GT-I9300 using Tapatalk 4
Thank you again, I read the thread in the past but it looks like it has been updated recently.
I think my problem happened because a flashed a ROM with MG4 baseband, and then flashed UltimaROM with another baseband which caused my baneband to corrupt.
I tried to flash Stock ROM and install different baseband but non of this worked.
finally I flashed BTU stock ROM (Which comes with MG4) but the problem still here.
Then I installed root, deleted the efs folder and replaced all the files with the files in the backup - restart and everything is working! my IMEI returned to normal.
Thank you RootSU for your help.
hey bro,
i am stuck
help me out
- my efs(folder) is blank
- i installed stock with pit file but no help!
- right now my cell is in bootloop!
- it goes to recovery, download mode.
i have efs.tar.gz file and a folder named efs in my ext sd
how do i copy that to int memory?
can't even create a cwm flashable zip file of the same?????
help me bro.....
You are posting in a thread that tells you how to restore an efs backup, how much more could you possibly need?
Go to recovery, factory reset.
Get the phone to boot, unpack the .tar file and follow the instructions in the OP.
boomboomer said:
You are posting in a thread that tells you how to restore an efs backup, how much more could you possibly need?
Go to recovery, factory reset.
Get the phone to boot, unpack the .tar file and follow the instructions in the OP.
Click to expand...
Click to collapse
Dear boomboomer,
i am sorry, but my phone is in "bootloop" how am i suppose to delete the "EFS" ? that s what i am asking!!!!!
i have both efs.tar.gz and extracted folder ready in my ext-sd......
i wonder if somebody can help me with creating a cwm.zip from the .tar file
thanks ....
try to install stock again via odin but this time install a diffrent version (for example if you installed INU this time try INS).. before that factory reset your phone and wipe cache via recovery mode.. don't lose your efs backup it's very important copy it to your PC in case something wrong happens
i already did so
almousawi said:
try to install stock again via odin but this time install a diffrent version (for example if you installed INU this time try INS).. before that factory reset your phone and wipe cache via recovery mode.. don't lose your efs backup it's very important copy it to your PC in case something wrong happens
Click to expand...
Click to collapse
bro, thanks for your help recently i tried cm 10 also but nothing happened.
believe me i tried everything now the only option is left that is
to restore efs backup from efs.tar.gz (which is about 12 MB)
OR
create a cwm flashable zip from the efs folder which is about 22 MB)
OR
take my phone to download mode and try to push whole "efs" folder to the location with help of "ADB"
hello
mikks said:
bro, thanks for your help recently i tried cm 10 also but nothing happened.
believe me i tried everything now the only option is left that is
to restore efs backup from efs.tar.gz (which is about 12 MB)
OR
create a cwm flashable zip from the efs folder which is about 22 MB)
OR
take my phone to download mode and try to push whole "efs" folder to the location with help of "ADB"
Click to expand...
Click to collapse
hello nobody is here to help......??????
mikks said:
hello nobody is here to help......??????
Click to expand...
Click to collapse
Correct this is not a paid for service .
Suggest you take it to a service centre .
know that i did that already....
JJEgan said:
Correct this is not a paid for service .
Suggest you take it to a service centre .
Click to expand...
Click to collapse
thanks for the reply, respect to your reply and interest no disrespect ...
i took that to the center but they failed and by the way they come to me in some cases... so they give me free service...
my phone is in boot loop, i have efs.tar.... can i use phills recovery ????? or can i use someone elses backup... just to boot up my device ...then i'll be good .... i just need to get my device booted up.....
WARNING: Do NOT use TWRP to restore EFS!
Several people have used TWRP to do a backup and restore of EFS, and rendered their phone's mobile settings invalid. This is typically indicated by cellular data not working and/or invalid IMEI.
This thread will attempt to find out how to restore these devices to a functional state. We will need help from the community to make this successful! Please read through the thread and try to help with any requests.
WARNING: Do NOT use TWRP to restore EFS!
To backup your EFS data for safe keeping or sending to someone, do the following:
1. Boot into TWRP (any version).
2. Backup:
Code:
adb shell dd if=/dev/block/bootdevice/by-name/modemst1 of=/tmp/modemst1.img
adb shell dd if=/dev/block/bootdevice/by-name/modemst2 of=/tmp/modemst2.img
3. Pull the files:
Code:
adb pull /tmp/modemst1.img
adb pull /tmp/modemst2.img
Now you should have the backup files on your PC. They should each be exactly 2097152 bytes long. DO NOT share these files with anyone that you don't trust.
Okay so the first thing to note is that the signed TWRP provided by tenfar has an error in the EFS backup procedure. From the backup log:
Code:
Backing up EFS...
I:Reading '/dev/block/sdf1', writing '/data/media/0/TWRP/BACKUPS/.../efs1.emmc.win'
Backing up efs2...
I:Reading '/dev/block/sdf2', writing '/data/media/0/TWRP/BACKUPS/.../efs1.emmc.win'
Note that it read sdf1 (aka modemst1), placing the backup into efs1.emmc.win. Then it read sdf2 (aka modemst2), also placing the backup into efs1.emmc.win. In other words, sdf1 data was overwritten and lost.
I am looking into what is in each of these partitions and how to best recover.
The twrp in question is different from the 'unofficial' twrp, correct?
I have this one installed on my phone
12/03/2016 15:12 17,932,169 twrp-recovery-3.0.2-2.zip
I believe this is the unofficial one?
gpz1100 said:
The twrp in question is different from the 'unofficial' twrp, correct?
I have this one installed on my phone
12/03/2016 15:12 17,932,169 twrp-recovery-3.0.2-2.zip
I believe this is the unofficial one?
Click to expand...
Click to collapse
I can't say which is which. But regardless of the version you are using, the safest option is to never backup and restore EFS using TWRP.
Agreed. There's really no reason one should be messing/touching the EFS partition in the first place. I'm not sure why it was included. The only partitions needed for a successful backup include those below.
Boot
System
Data
Alright, so the first thing I think we'll need is two known working backups of the EFS data for each model. I have a U model so if I can get a backup from someone else's U model, I can compare. This will provide some insight on where the IMEI is stored.
Just a thought here, back when I had my original Galaxy S we had an issue with the EFS partition getting destroyed all the time. We almost always get a clean backup as a "just in case". However if you ever did a factory restore, meaning using Odin on that phone your EFS would always be restored. Is there any factory restore images for this phone that work in the same fashion?
Velrix said:
Just a thought here, back when I had my original Galaxy S we had an issue with the EFS partition getting destroyed all the time. We almost always get a clean backup as a "just in case". However if you ever did a factory restore, meaning using Odin on that phone your EFS would always be restored. Is there any factory restore images for this phone that work in the same fashion?
Click to expand...
Click to collapse
Nope, not that I am aware of anyway. But I could possibly make one. It's a good idea. But first I want to see about helping people that have corrupted EFS.
tennear said:
Nope, not that I am aware of anyway. But I could possibly make one. It's a good idea. But first I want to see about helping people that have corrupted EFS.
Click to expand...
Click to collapse
Ya, the issue you will face here is TWRP overwriting the original backup image with the second blob. The only fix is going to be finding the location of the IMEI inside that initial file and doing a manual change possibly without it being something the backup files would replace naturally. The problem here is the legality, while you are replacing the IMEI with the one original to the phone something like this being published would/could be used maliciously as well.
Has any of the users affected by this tried to roll back to a completely stock phone, removing TWRP?
Velrix said:
Ya, the issue you will face here is TWRP overwriting the original backup image with the second blob. The only fix is going to be finding the location of the IMEI inside that initial file and doing a manual change possibly without it being something the backup files would replace naturally. The problem here is the legality, while you are replacing the IMEI with the one original to the phone something like this being published would/could be used maliciously as well.
Has any of the users affected by this tried to roll back to a completely stock phone, removing TWRP?
Click to expand...
Click to collapse
I am sadly affected by this mishap on an otherwise brilliant phone.
I have not tried this. I have re-flashed completely to stock, but didn't relock my BL and/or remove TWRP. I do not know a lot about these matters, but tbh I don't see why that would help us, flashing the stock recovery back would only change the recovery partition, amirite?
Here's a thankful plea from an affected user. Please share a valid EFS partition backup with @tennear, @Tebor, @jcadduono or myself. We are NOT going to mess around with your IMEI or other data, we just want to try to help out ourselves and provide a future reference for people who happen to be in the same situation. THANK YOU. ETERNAL RESPECT.
This is weird. I never run across this issue?
Are maybe only A2017G affected?
I'm still on Tenfar's TWRP and due to habits I always creat a full backup. Meaning I included the EFS partitions.
While working on my own Axon-7 CM bring-up I have probably flashed my CM (while working on my bring-up) and restored those affected partitions like 20x times and never experienced above problems.
I'm on B29 stock. I just went into about phone to see if my IMEI's are listed. Everything is fine.
I extracted my efs partitions to the sd card. Appears there are 5 blocks that make up the sdf block devices.
Code:
[email protected]_ii:/sdcard # dd if=/dev/block/sdf1 of=/sdcard/efs1.img bs=4096
dd if=/dev/block/sdf1 of=/sdcard/efs1.img bs=4096
512+0 records in
512+0 records out
2097152 bytes transferred in 0.015 secs (139810133 bytes/sec)
[email protected]_ii:/sdcard # dd if=/dev/block/sdf2 of=/sdcard/efs2.img bs=4096
dd if=/dev/block/sdf2 of=/sdcard/efs2.img bs=4096
512+0 records in
512+0 records out
2097152 bytes transferred in 0.007 secs (299593142 bytes/sec)
[email protected]_ii:/sdcard # dd if=/dev/block/sdf3 of=/sdcard/efs3.img bs=4096
dd if=/dev/block/sdf3 of=/sdcard/efs3.img bs=4096
1+0 records in
1+0 records out
4096 bytes transferred in 0.008 secs (512000 bytes/sec)
[email protected]_ii:/sdcard # dd if=/dev/block/sdf4 of=/sdcard/efs4.img bs=4096
dd if=/dev/block/sdf4 of=/sdcard/efs4.img bs=4096
128+0 records in
128+0 records out
524288 bytes transferred in 0.008 secs (65536000 bytes/sec)
[email protected]_ii:/sdcard # dd if=/dev/block/sdf of=/sdcard/efs.img bs=4096
dd if=/dev/block/sdf of=/sdcard/efs.img bs=4096
10240+0 records in
10240+0 records out
41943040 bytes transferred in 0.212 secs (197844528 bytes/sec)
Appears efs3 and efs4 are blank inside (just 00's). Efs, efs1, efs2 do contain data. Search all of them using a hex editor for either of the two imei's resulted in nothing. From past flashing, I know these are sometimes stored in a backward manner. Tried searching for that too with no luck. My guess is if the imei is stored in one of these files, it's in an encrypted manner.
Hash checksums for my files are below:
Code:
File: efs4.img
CRC-32: 95d0e631
MD4: 06be904db85f2f54e2cfe3ed65c11311
MD5: 06f49b34524d523cbd925c2fa6fa27bf
SHA-1: 7da5cedafe502f32a68ee9fb7a98433e71c2cf13
File: efs3.img
CRC-32: 9adc2b3a
MD4: 4075c3bfd61127e287dbb5c92a7e04fb
MD5: 778800e21d5e0d70ae337c730b2d5e18
SHA-1: 1ac72bb3eadcfa8af694ace9ebe096f97524424b
File: efs2.img
CRC-32: eecb36a2
MD4: 7d2f020ce6e3f1fcc8f2510fc60b5956
MD5: a009e1cf60afdb6e03b3cb65a5695e95
SHA-1: 76f9d21c1ef95983ff68c1ea8c771909b743fd7e
File: efs1.img
CRC-32: 518ab8df
MD4: e26a4c53061102537a868826e56e22e2
MD5: 913ac8e53227eb6eadbaf0054c2e9092
SHA-1: e9be6f2cd08e7a0fe2a7326920a920aefd064cb8
File: efs.img
CRC-32: 7603f894
MD4: 105bbc7d6d3d082c38d7bc25a7a3c02e
MD5: 3b89d12ee514bbaa4dae27fd180237c3
SHA-1: d8d260b860781c5da48f70c98c42c2c49d8f94f6
Controllerboy said:
I am sadly affected by this mishap on an otherwise brilliant phone.
I have not tried this. I have re-flashed completely to stock, but didn't relock my BL and/or remove TWRP. I do not know a lot about these matters, but tbh I don't see why that would help us, flashing the stock recovery back would only change the recovery partition, amirite?
Here's a thankful plea from an affected user. Please share a valid EFS partition backup with @tennear, @Tebor, @jcadduono or myself. We are NOT going to mess around with your IMEI or other data, we just want to try to help out ourselves and provide a future reference for people who happen to be in the same situation. THANK YOU. ETERNAL RESPECT.
Click to expand...
Click to collapse
I really hope I you didn't think I was implying anyone here needing this fix would be acting maliciously. I am just saying people could use it as so.
To answer your question, flashing recovery wouldn't fix that exactly, I mean getting a completely stock full image of the nand and re-flashing it.
gpz1100 said:
I extracted my efs partitions to the sd card. Appears there are 5 blocks that make up the sdf block devices.
Click to expand...
Click to collapse
Well, /dev/block/sdf is a device and sdf1, sdf2 etc. are partitions of that device.
If you backup the device itself, you backup all partitions within that device.
I don't know what sdf3 & sdf4 are but it appears that they are not important (as you have already stated).
There should be no need to backup the whole device but it doesn't hurt.
celoxocis said:
This is weird. I never run across this issue?
Are maybe only A2017G affected?
I'm still on Tenfar's TWRP and due to habits I always creat a full backup. Meaning I included the EFS partitions.
While working on my own Axon-7 CM bring-up I have probably flashed my CM (while working on my bring-up) and restored those affected partitions like 20x times and never experienced above problems.
I'm on B29 stock. I just went into about phone to see if my IMEI's are listed. Everything is fine.
Click to expand...
Click to collapse
No, the issue is definitely present. You can examine your recovery.log in your backup directory to see for yourself. You should have a file named efs1.emmc.win that is 2mb and the text that I showed in the recovery.log file.
If you have restored your EFS data and you still have functional data and IMEI, consider yourself lucky. I honestly don't know how that would be possible.
Someone in this forum said that turning off the phone, switch the SIM to the other SIM-slot, turn on and then do it otherwise again might help...
But I am not affected, so I cannot test this.
tennear said:
No, the issue is definitely present. You can examine your recovery.log in your backup directory to see for yourself. You should have a file named efs1.emmc.win that is 2mb and the text that I showed in the recovery.log file.
If you have restored your EFS data and you still have functional data and IMEI, consider yourself lucky. I honestly don't know how that would be possible.
Click to expand...
Click to collapse
I've just double checked in the log.
I must have at some point in time been lucky to have switched to UDev's TWRP after having unlocked the bootloader.
As it reads:
Code:
ro.build.host=overrated
ro.build.tags=test-keys
ro.build.type=eng
ro.build.user=unjust
I doubt Tenfar's would have those flags.
I remember the subpartion restore being a bug that was fixed by TWRP. So Tenfar's build probably never included that fix. That warning should be posted in the thread he created too.
@gpz1100 the /dev/sdf "disk" contains 5 partitions:
sdf1 = modemst1 -> EFS data
sdf2 = modemst2 -> EFS data
sdf3 = fsc -> Unused?
sdf4 = ztecfg -> ZTE specific config stuff for stock ROM, unused in CM.
sdf5 = persist -> ext4 filesystem mounted as /persist, some device specific configs etc.
Update: I have one good backup of the EFS partitions from a G user. I'd like to get another to compare.
Velrix said:
Has any of the users affected by this tried to roll back to a completely stock phone, removing TWRP?
Click to expand...
Click to collapse
I have tried:
restoring stock recovery
flashing stock B02, B03, B05, B06 and B08
Flashing the small incremental updates
Flashing DrakenFX's twrp updates and bootstacks
I have swapped recoveries so many times, I can use tennear's tool with my eyes closed
Hell I've even tried flashing the U version firmware. (Nice boot animation by the way. Heaps better than the G version with the pictures :good
None of the factory firmware made any difference. Im guessing that none of the factory firmware makes changes to EFS related items
@tennear, have you had a chance to look into how this little program works --> http://en.miui.com/thread-271552-1-1.html
I can restore my imei numbers with it but it still wont connect to cellular. Funny thing is, when I restore my own numbers, enter my sim pin after rebooting, my carrier logo appears with full signal minus the 4G icon but I cannot make calls. It then proceeds cycle between my carrier and emergency calls only.
All this flashing and wiping has kind of shown me how good the Axon 7 is. I haven't had a single error nor bootlooped. It just takes everything and always boots up.