[GUIDE] Backup/Restore/Repair Your EFS Partition [LS970]

Search This thread

drewss02

Senior Member
Jun 4, 2014
100
14
If the m9kefs1.img is radio related and it got corrupted would it be possible for someone to put theirs up here so i can see if it fixes things? Of course only if it doesn't have any personal or phone specific related info in it.
 
Last edited:

dopy25

Senior Member
Feb 21, 2009
1,103
416
Fresno
If the m9kefs1.img is radio related and it got corrupted would it be possible for someone to put theirs up here so i can see if it fixes things? Of course only if it doesn't have any personal or phone specific related info in it.

Do you have your original stock backup? That should contain everything and not be corrupted if it was done correct. Try to restore that stock, or any other fully working backup and boot into it, check your cell service and if that works, use the "createFlashableZip" posted in the OP to create a new EFS backup, then you should be able to restore that.

On a side note, if any of your partitions got corrupted, it's not usually just the data that gets corrupted, it's the partition. And if the partition is corrupted, there isn't much chance to restore. A warranty replacement is usually in order if that happens.

EDIT I just remembered that your exact same scenario has happened to me before. Just flash the restore multiple times and then reboot. I swear that worked for me. I remember it saying that the feature is unavailable (or something close), is that what the error is when you try to make a call?
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,875
Somehow after flashing cm12 geehrc my phone stopped getting a signal so no calls and no sms. I restores my EFS and mobile data works fine but still no signal. Everything in settings/about phone/phone identity is filled in and seems ok, in network it shows sprint but no signal strength and out of service as service state. I'm not really sure what else to do to get this working again?

Also there was the red x over the signal bars at first but now it is gone.

which mobile data works? EVDO? EHRPD? LTE? EHRPD and LTE are auth'd by your sim card... while EVDO is auth'd by EFS. If EVDO is working I would assume your EFS is still good.

You have an original backup of your efs?
If so, did you backup m9kefs1.img and m9kefs2.img manually? or did you use the flashable zip?

and you only mentioned m9kefs1.img... EFS is made up of 2 partitions.. both are needed... you have restore BOTH m9kefs1 and m9kefs2? and not just m9kefs1?

You didn't try to flash my "ZeroEFS" zip did you? Hopefully not.

Where did you try to restore EFS... while booted in a rom? .. or while in TWRP? and how did you restore it.. did you flash a zip or use the manual "dd" commands? It is easier for the EFS restore to "stick" if doing it in TWRP. If trying while booted in rom it may not stick.

Have you tried flashing back to a stock-based rom or a known working rom? Trying to fix data while still on CM12 would only make things more difficult.
Have you tried using LGNPST and flashing a stock firmware bin? If you are properly restoring m9kefs1/m9kefs2 while in TWRP and still no signal.. I would try a stock rom or stock restore with LGNPST as the next step.
 

drewss02

Senior Member
Jun 4, 2014
100
14
Do you have your original stock backup? That should contain everything and not be corrupted if it was done correct. Try to restore that stock, or any other fully working backup and boot into it, check your cell service and if that works, use the "createFlashableZip" posted in the OP to create a new EFS backup, then you should be able to restore that.

On a side note, if any of your partitions got corrupted, it's not usually just the data that gets corrupted, it's the partition. And if the partition is corrupted, there isn't much chance to restore. A warranty replacement is usually in order if that happens.

EDIT I just remembered that your exact same scenario has happened to me before. Just flash the restore multiple times and then reboot. I swear that worked for me. I remember it saying that the feature is unavailable (or something close), is that what the error is when you try to make a call?

Yes i have the stock backup and restored to it but still no signal, i also restored my Artmod G3 rom and that was the same except that in about phone it was showing some signal strength but i still couldn't make calls (strange). I tried restoring EFS with freegee, the zip, and through terminal but nothing has changed. When trying with freegee it said it restored efs but it didn't really seemed like it actually did anything. I just flashed the restore 3 times in a row but still nothing.

---------- Post added at 10:35 AM ---------- Previous post was at 10:29 AM ----------

which mobile data works? EVDO? EHRPD? LTE? EHRPD and LTE are auth'd by your sim card... while EVDO is auth'd by EFS. If EVDO is working I would assume your EFS is still good.

You have an original backup of your efs?
If so, did you backup m9kefs1.img and m9kefs2.img manually? or did you use the flashable zip?

and you only mentioned m9kefs1.img... EFS is made up of 2 partitions.. both are needed... you have restore BOTH m9kefs1 and m9kefs2? and not just m9kefs1?

You didn't try to flash my "ZeroEFS" zip did you? Hopefully not.

Where did you try to restore EFS... while booted in a rom? .. or while in TWRP? and how did you restore it.. did you flash a zip or use the manual "dd" commands? It is easier for the EFS restore to "stick" if doing it in TWRP. If trying while booted in rom it may not stick.

Have you tried flashing back to a stock-based rom or a known working rom? Trying to fix data while still on CM12 would only make things more difficult.
Have you tried using LGNPST and flashing a stock firmware bin? If you are properly restoring m9kefs1/m9kefs2 while in TWRP and still no signal.. I would try a stock rom or stock restore with LGNPST as the next step.

I get 3g and 4g, restored original EFS both with zip and manually, no i didnt flash the zeroEFS, i tried restoring in factory rom using freegee and using the zip in cwm. Have flashed a couple previously working roms but got no signal and i was waiting to use LGNPST as a last resort.
 

dopy25

Senior Member
Feb 21, 2009
1,103
416
Fresno
which mobile data works? EVDO? EHRPD? LTE? EHRPD and LTE are auth'd by your sim card... while EVDO is auth'd by EFS. If EVDO is working I would assume your EFS is still good.

You have an original backup of your efs?
If so, did you backup m9kefs1.img and m9kefs2.img manually? or did you use the flashable zip?

and you only mentioned m9kefs1.img... EFS is made up of 2 partitions.. both are needed... you have restore BOTH m9kefs1 and m9kefs2? and not just m9kefs1?

You didn't try to flash my "ZeroEFS" zip did you? Hopefully not.

Where did you try to restore EFS... while booted in a rom? .. or while in TWRP? and how did you restore it.. did you flash a zip or use the manual "dd" commands? It is easier for the EFS restore to "stick" if doing it in TWRP. If trying while booted in rom it may not stick.

Have you tried flashing back to a stock-based rom or a known working rom? Trying to fix data while still on CM12 would only make things more difficult.
Have you tried using LGNPST and flashing a stock firmware bin? If you are properly restoring m9kefs1/m9kefs2 while in TWRP and still no signal.. I would try a stock rom or stock restore with LGNPST as the next step.

The Optimus G did not have a sim card, so we have everything in the EFS.

Yes i have the stock backup and restored to it but still no signal, i also restored my Artmod G3 rom and that was the same except that in about phone it was showing some signal strength but i still couldn't make calls (strange). I tried restoring EFS with freegee, the zip, and through terminal but nothing has changed. When trying with freegee it said it restored efs but it didn't really seemed like it actually did anything. I just flashed the restore 3 times in a row but still nothing.

Please answer the questions above as the information would be helpful to all trying to assist you. thank you^^
As far as freegee, IDK why that even makes a backup, it works to restore very rarely. The create zip by autoprime is the best tool I have ever used. Are you sure you are restoring the zip and not flashing the create zip multiple times? Boot into stock ROM (genuine stock and not stock based) ArtMod is not stock for us, either use the ZVC or one of the stock based in the sprint thread and not one that was ported or edited and you will have better luck. If you can boot into the ZVC (the one I use to update PRL and Profile) Then do both and see if that helps.

EDIT: Try using TWRP.
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,875
The Optimus G did not have a sim card, so we have everything in the EFS.

there is a sim card.. it's just embedded and not removable. You wouldn't have working LTE otherwise.


and to @drewss02 you mentioned 3g and 4g.. but you did not specify if 3G was using EVDO or EHRPD. If using EHRPD (check network settings in about phone section)... try to force it to EVDO and see if you get working 3G while set to EVDO.

if you have working EVDO then that would be proof that some of the EFS is still working. And you've already said you still have your original imei/meid, correct? and that's pulled from the EFS as well. You could try reflashing a PRL manually... or trying to maybe update PRL and Profile over wifi to see if that helps. Maybe even try ##72786# dialer code while on a stock rom... this will reactivate your phone (best to try it over wifi).

and as dopy25 mentioned... try flashing the backups in twrp. Not a fan of CWM.. and many people have confirmed that the EFS restore from FreeGee doesn't always work. I always stick to manual backup and restore and have never had an issue restoring the EFS thru twrp that way. I have broken my EFS many many many times (often on purpose) and have always come out of it doing nothing more than the manual steps I've listed in the OP.
 
  • Like
Reactions: dopy25

drewss02

Senior Member
Jun 4, 2014
100
14
The Optimus G did not have a sim card, so we have everything in the EFS.



Please answer the questions above as the information would be helpful to all trying to assist you. thank you^^
As far as freegee, IDK why that even makes a backup, it works to restore very rarely. The create zip by autoprime is the best tool I have ever used. Are you sure you are restoring the zip and not flashing the create zip multiple times? Boot into stock ROM (genuine stock and not stock based) ArtMod is not stock for us, either use the ZVC or one of the stock based in the sprint thread and not one that was ported or edited and you will have better luck. If you can boot into the ZVC (the one I use to update PRL and Profile) Then do both and see if that helps.

EDIT: Try using TWRP.

I am flashing the efsbackupflash.zip, and im using the original rom that came with the phone stock. I can't update prl or profile because it says no service but if i use ##72786# it goes thru the whole process, activate service, update prl, firmware check, but still same result in the end. All of this only happened after flashing the CM12 lollipop build and it searched for an available network, it found sprint but never connected to it or any network. I guess its possible that could have screwed something up or rewritten something? I just dont understand how it says im on sprint network yet i have no service, it's almost like it's one of the demo phones you mess with in the stores.
 

dopy25

Senior Member
Feb 21, 2009
1,103
416
Fresno
there is a sim card.. it's just embedded and not removable. You wouldn't have working LTE otherwise.

Sorry about that, What I meant was it is not removable/changeable. Doesn't it get backed up as well though with the efs backup?
@drewss02 might be a rare case, but I have indeed had the exact same thing happen to me and all I did was restore the EFS a few times. (Mine happened when flashing a rom not meant for the Sprint OG) I forget which one but I was trying to adapt it for the Sprint version and it kept having the same result this user is having.
 

tiguy99

Senior Member
Oct 3, 2007
1,607
252
Chicago
To the OP, I say thank you. Your guide is exactly what i need. Do you have this for the Tmobile version of the LG G2 D801?

I successfully did the method from droid view and was able to get the imei written however i'm stuck with 2g service.

Your methods to restore data for the Sprint version is exactly what I need to get 4G back on my phone. Can anyone assist?
 

einsteino

Senior Member
Oct 5, 2012
61
1
please on writing my imei using dfs it refuses to stick. what do i do to make it stick? do i need to be on any particular rom for it to stick?
 

kz6fittycent

Senior Member
Sep 1, 2011
190
23
Murfreesboro, TN
Great Work and Tutorial!!


LS970 EFS Backup/Restore/Repair

Every rooted Optimus G user should backup their EFS partitions!

Thanks goes to interloper, toastcfh and everyone in #lg-optimus-g that helped out.


PM me if interested in my Sprint LGOG LS970 EFS repair service.


Contents
1. Flashable EFS for backing up your EFS partitions and packing them into a new flashable .zip.
2. Commands for backing up/restoring EFS manually with terminal or ADB.
3. Flashable "ZERO EFS" with guide for repairing your EFS. This EFS needs to be reprogrammed but could be used in a "worst case" scenario where you didn't backup your EFS and the phone cannot be replaced by any LG/Sprint warranty.

Backup script/commands also work on the ATT/Telus variants. ZERO EFS zip is ONLY for Sprint LS970 users. ATT/Telus users, if you would like a ZERO EFS, please send me your efsbackup.tar in a private message. It is not suggested to publicly post your EFS file.

Background
You never know when your NV/EFS/PRL/RADIO may stop working. 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. A few users who flashed the test/Korean JB builds found 3g not working.. or calls/text not working. Some users ran into radio issues after PRL writing failures. My own issues was a missing ICCID which resulted in no 4G. Data wipes, reactivations, ##786# resets were not helping. All of the above 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: MEID, IMEI, phone number, MSL, data profiles 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).

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

Repairing EFS

YOUR EFS IS *NOT* BROKEN IF YOU FLASHED AN AOSP ROM AND NO LONGER HAVE SIGNAL BUT STILL HAVE YOUR MEID AND PRL SAYS "40000"...
GO BACK INTO AOSP ROM > SETTINGS > MORE... > MOBILE NETWORK SETTINGS > CDMA SUBSCRIPTION > SET TO "NV"
YOU SHOULD NOW HAVE A SIGNAL AGAIN... NO EFS REPAIR NEEDED!!


If you have a messed up PRL/Radio/EFS(no signal.. calls/text doesn't work.. no PRL showing.. no 3G) then you should first confirm there are no outages in your area. After confirming no outages you may want to try a factory data reset(settings > backup & reset) or perform a ##786# reset(MSL required). If you are feeling daring you could even try a lgnpst reset which involves installing lgnpst(automated install on IRC suggested) and flashing a stock .tot to your phone while it's in download mode(power off phone > plug phone into USB cable/computer > vol up + vol down + power buttons). If none of the previous suggestions work you could see if Sprint/LG will warranty repair your device.

If NOTHING ABOVE works your final option is to flash a new EFS. Technically you could possibly look through each and every NV item with QXDM and see what's incorrect but that may take forever... so I have included a flashable zip at the bottom of this thread which flashes a fresh LS970 EFS to your device. This EFS is clear of all personal data and any previous phone identifiers. Below are directions on how to reprogram your EFS to the Sprint network after flashing the LS970_ZERO_EFS.zip. I'd rate this as medium-hard difficulty for those that are unfamiliar with how (Sprint)CDMA phones are programmed. For those that have flashed a phone in the past, this ZERO EFS zip just made your day even easier.

The ZERO EFS has a zero'd out SPC/MSL, zero'd out IMEI/MEID, zero'd out MDN/MSID and all data profiles emptied.
NV item 114(NV_FACTORY_INFO_I) has been "anonymized" and no longer identifies to anyones real account.




In recovery, flash LS970_ZERO_EFS.zip then wipe data/cache(factory wipe in TWRP). LS970_ZERO_EFS.zip backs up your current EFS partitions to /sdcard/EFS_Backup and then replaces your EFS with the ZERO EFS.

You will have to manually program your phone to get it working again.


READ EVERYTHING BELOW IF YOU DON'T KNOW WHAT YOU'RE DOING.

After flashing LS970_ZERO_EFS.zip:

For talk/text working - use DFS(www.cdmatool.com) or other known working CDMA tools.
a1. Set LS970 into diag mode.. open the dialer and hit ##3424# . Also make sure phone is set to "Charge only"
b1. Connect phone to DFS and set correct COM port. Use the diag port NOT the serial port.
c1. In DFS send SPC(MSL) to phone using "SPC" button(under the green ports button, top left). SPC = 000000.
d1. On Programming > General tab... Write desired IMEI with DFS. Hit "status" button to make sure it stuck. IMEI = MEID + 1 extra digit.
e1. After writing IMEI.. write the matching MEID. Hit "status" button to make sure it stuck.
f1. On your phone, open dialer and hit ##000000# and program in your MDN/MSID. Hit done. Phone will reboot.
Talk/text will now work!
b4xaJkv.png


SASfXKo.png


For 1X/3G working - use DFS
a2. Connect phone to DFS and send SPC using above methods.
b2. In DFS, open the Programming > Data tab and hit the read button.
c2. Set the UID under HDR AN LONG to your MEID@hcm.sprintpcs.com
d2. Set the Pwd to your 32-char hex password, no spaces between hex bytes. Make sure box is checked next to Pwd!!
e2. In DFS go to the Programming > Mobile IP tab. Hit the blue "Read" button in the lower left.
f2. Set the username(NAI) to the same username you just wrote in step c2... MEID@hcm.sprintpcs.com
g. Set the AAA Shared Secret password. The same 32-char password used in step d. Make sure box is CHECKED for AAA!!!
h. Set the HA Shared Secret password to: secret . Yes, the word secret. MAke sure the box is UNCHECKED for HA!!!
i. Hit the red "Write Current Profile Settings" button.
j. Back on your phone, open the dialer and press ##3282# and click "Data Profile" then "edit". Enter 000000 for code.
k. Once inside Data Profile menu, set up your Sprint username and password(AAA password).
username@sprintpcs.com and the AAA password is a 6-char password.
l. Once data profile is written back out of the menu and the phone should reboot.
1X/3G will now work!! [as long as ALL usernames and passwords were written correctly with the 100% correct info!!!]

*Notes*
1. If a ##786# reset is ever done, the 1X/3G data passwords will be wiped and have to be rewritten.
2. Dialer code 3845#*970# > Data -LG menu has a PPP setting. Never set this to Sprint... always leave on "Undetermined"
3. You shouldn't have to do anything for 4G to work.


GV2kyPw.png


RycEgCM.png




Now you may say "yeah, that's great... but I don't know my MEID, IMEI, MDN, MSID, 32-char AAA password, Data Profile username... now what?"

Good question.

IMEI - Hopefully your phone isn't TOO messed up and you can still view your IMEI via Settings > About Phone > Phone Identity.
If you can't read it, call Sprint and ask them for it, mention your phone acting up or blah blah. The IMEI is your MEID + 1 extra digit.
MEID - MEID is on your LG OG box. You can also see this by viewing the current phone on your plan using Sprint.com
You want to use the MEID HEX not MEID DEC. If you can only find the DEC you can use online converters to convert MEID DEC to HEX.
MDN - MDN is your phone number. You should know this.
MSID - MSID is sometimes the same as your phone number, but sometimes not. You can view this info in Settings > About Phone > Phone Identity
You can call Sprint to get this info if you can't view it on your phone.
Data Profile username/password - You can get this info by calling Sprint. You may be able to view the username with ##3282# > Data Profile > View
32-char AAA Password - If you are unable to acquire your 32-char AAA password(NV item 466 and 1192), ask Sprint. You may have to speak to some form of advanced tech support.


Code:
[B]My other LS970 threads..[/B]
[B][URL="http://xdaforums.com/showthread.php?t=2049701"][How-To] Enable DIAG mode without Service Code(MSL)[/URL][/B]
[B][URL="http://xdaforums.com/showthread.php?t=2052816"][Info] LS970 Hidden Dialer Codes[/URL][/B]
[B][URL="http://xdaforums.com/showthread.php?t=2058506"][WIP]Optimus G AT Commands[/URL][/B]

I would add that those (like me) who choose to use the terminal and adb shell, make sure that you are pointing dd to the correct directory. It's an easy mistake to try to copy/paste stuff into the terminal. It doesn't work that way, so make sure you are following the file tree appropriately.
 

jbaker22

Senior Member
Jan 18, 2014
63
3
data size

Hello, I am glad I found this forum, but I am curious whether I can restore my files without taking up a lot of space. The file used to show 0 bytes. Thanks for any help.
 

Pearl@ndroid

Member
Oct 5, 2012
47
7
New Delhi
IMEI Unknown :(

hi all,

I have LG optimus g PRO E988 20c indian version, I flashed beanstalk on my device, everything was working fine but then I flashed madmack modem (with wrong modem), I then got bootloop but I restored my nandroid backup then, so phone is working now but I have lost my IMEI and phone not detecting any sim card...:crying:

I have my EFS backup image which I backedup using freegee, I restored EFS backup using freegee but it is not working....... Please tell me some way to get my IMEI back and network signal........:(:crying:

How to restore IMEI using EFS backup.. I tried methods adb and terminal but no use....:crying::crying:

Please help me.. I will be very grateful,...:crying::crying:

Thanks in Advance.....:(:crying:
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,875
hi all,

I have LG optimus g PRO E988 20c indian version, I flashed beanstalk on my device, everything was working fine but then I flashed madmack modem (with wrong modem), I then got bootloop but I restored my nandroid backup then, so phone is working now but I have lost my IMEI and phone not detecting any sim card...:crying:

I have my EFS backup image which I backedup using freegee, I restored EFS backup using freegee but it is not working....... Please tell me some way to get my IMEI back and network signal........:(:crying:

How to restore IMEI using EFS backup.. I tried methods adb and terminal but no use....:crying::crying:

Please help me.. I will be very grateful,...:crying::crying:

Thanks in Advance.....:(:crying:

have you rewritten the correct modem for your device? a nandroid backup (clockwork or twrp backup) doesn't usually backup modem and it will have to be flash separately. tho some custom builds of cwm/twrp do have modem backup.. so perhaps you already have restored the proper modem... but just trying to cover everything.

when you use terminal emulator/adb... is the phone booted into the rom... or are you booted in custom recovery? I suggest that you only try to restore your EFS backup while in custom recovery. you can use adb shell in custom recovery (clockwork/twrp) to restore your efs backup. when restoring via adb... run each dd command 2 times.

with the proper modem and restoring EFS backup while in custom recovery... that should get it working. if not.. be sure to back your EFS up off of your internal storage... maybe on your computer... and backup anything else you need... then use LG Flash and restore your phone in Download Mode with official TOT for your model.

good luck. if that does not work... I am not sure what else you could try other than maybe rebuilding your EFS and rewriting the IMEI via diag mode with QPST or something.
 

Pearl@ndroid

Member
Oct 5, 2012
47
7
New Delhi
Solved IMEI Problem

hi,
Very much thanks for ur suggestion...:fingers-crossed::fingers-crossed:

Yesterday I flashed original modem of my phone which I backed up before with flashable zip... and I got my signal and IMEI back... :fingers-crossed::fingers-crossed:

I want to mention the mistake which I did:rolleyes:
--Before I was doing mistake in packaging flashable zip file when replacing the modem in that file. So before it was giving abort error when flashing that zip but yesterday I drag and drop my original modem.img in that flashable zip and the flashed and it worked..::D


But one thing I want to ask.... that flashable.zip did not flashed till the end it was showing aboot img error abort error in the end, but I got my IMEI back after that flash..

Please if you know, help me to understand how to make a proper flashable.zip file for modem and all.. IS there any guide???
:fingers-crossed:
Thanks for your support.....:fingers-crossed::eek:
 

supermaxkato

Senior Member
Feb 21, 2010
199
29
EFS 0 question....

Autoprime, how would I go about getting a 0 EFS backup for an LG optimus fuel, or Kyocera Hydro Vibe?
Thank you!
 

F160K

New member
Nov 23, 2016
1
0
I have LG-F160K. However, the efs partition(m9kefs1,2,3) is deleted and does not exist. I found your article while searching. How do I create efs partition? I tried to flash your file(zero efs.zip), but it was useless. Plz teach me. thank you.
 

Dombrizzle

New member
Sep 30, 2014
2
1
Thanks autoprime ! :)

I know this is an ancient thread but I just wanted to say thanks autoprime for everything you shared with this phone, I have a real old phone right now and can't afford a new one and came across one of these
and was able to repair it with all your other posts. so now I have a new old phone :p You're a badass...
Thank you to you and everyone else who contributes for all your hard work and effort on this stuff... :) :good:
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 34

    LS970 EFS Backup/Restore/Repair

    Every rooted Optimus G user should backup their EFS partitions!

    Thanks goes to interloper, toastcfh and everyone in #lg-optimus-g that helped out.


    PM me if interested in my Sprint LGOG LS970 EFS repair service.


    Contents
    1. Flashable EFS for backing up your EFS partitions and packing them into a new flashable .zip.
    2. Commands for backing up/restoring EFS manually with terminal or ADB.
    3. Flashable "ZERO EFS" with guide for repairing your EFS. This EFS needs to be reprogrammed but could be used in a "worst case" scenario where you didn't backup your EFS and the phone cannot be replaced by any LG/Sprint warranty.

    Backup script/commands also work on the ATT/Telus variants. ZERO EFS zip is ONLY for Sprint LS970 users. ATT/Telus users, if you would like a ZERO EFS, please send me your efsbackup.tar in a private message. It is not suggested to publicly post your EFS file.

    Background
    You never know when your NV/EFS/PRL/RADIO may stop working. 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. A few users who flashed the test/Korean JB builds found 3g not working.. or calls/text not working. Some users ran into radio issues after PRL writing failures. My own issues was a missing ICCID which resulted in no 4G. Data wipes, reactivations, ##786# resets were not helping. All of the above 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: MEID, IMEI, phone number, MSL, data profiles 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).

    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

    Repairing EFS

    YOUR EFS IS *NOT* BROKEN IF YOU FLASHED AN AOSP ROM AND NO LONGER HAVE SIGNAL BUT STILL HAVE YOUR MEID AND PRL SAYS "40000"...
    GO BACK INTO AOSP ROM > SETTINGS > MORE... > MOBILE NETWORK SETTINGS > CDMA SUBSCRIPTION > SET TO "NV"
    YOU SHOULD NOW HAVE A SIGNAL AGAIN... NO EFS REPAIR NEEDED!!


    If you have a messed up PRL/Radio/EFS(no signal.. calls/text doesn't work.. no PRL showing.. no 3G) then you should first confirm there are no outages in your area. After confirming no outages you may want to try a factory data reset(settings > backup & reset) or perform a ##786# reset(MSL required). If you are feeling daring you could even try a lgnpst reset which involves installing lgnpst(automated install on IRC suggested) and flashing a stock .tot to your phone while it's in download mode(power off phone > plug phone into USB cable/computer > vol up + vol down + power buttons). If none of the previous suggestions work you could see if Sprint/LG will warranty repair your device.

    If NOTHING ABOVE works your final option is to flash a new EFS. Technically you could possibly look through each and every NV item with QXDM and see what's incorrect but that may take forever... so I have included a flashable zip at the bottom of this thread which flashes a fresh LS970 EFS to your device. This EFS is clear of all personal data and any previous phone identifiers. Below are directions on how to reprogram your EFS to the Sprint network after flashing the LS970_ZERO_EFS.zip. I'd rate this as medium-hard difficulty for those that are unfamiliar with how (Sprint)CDMA phones are programmed. For those that have flashed a phone in the past, this ZERO EFS zip just made your day even easier.

    The ZERO EFS has a zero'd out SPC/MSL, zero'd out IMEI/MEID, zero'd out MDN/MSID and all data profiles emptied.
    NV item 114(NV_FACTORY_INFO_I) has been "anonymized" and no longer identifies to anyones real account.




    In recovery, flash LS970_ZERO_EFS.zip then wipe data/cache(factory wipe in TWRP). LS970_ZERO_EFS.zip backs up your current EFS partitions to /sdcard/EFS_Backup and then replaces your EFS with the ZERO EFS.

    You will have to manually program your phone to get it working again.


    READ EVERYTHING BELOW IF YOU DON'T KNOW WHAT YOU'RE DOING.

    After flashing LS970_ZERO_EFS.zip:

    For talk/text working - use DFS(www.cdmatool.com) or other known working CDMA tools.
    a1. Set LS970 into diag mode.. open the dialer and hit ##3424# . Also make sure phone is set to "Charge only"
    b1. Connect phone to DFS and set correct COM port. Use the diag port NOT the serial port.
    c1. In DFS send SPC(MSL) to phone using "SPC" button(under the green ports button, top left). SPC = 000000.
    d1. On Programming > General tab... Write desired IMEI with DFS. Hit "status" button to make sure it stuck. IMEI = MEID + 1 extra digit.
    e1. After writing IMEI.. write the matching MEID. Hit "status" button to make sure it stuck.
    f1. On your phone, open dialer and hit ##000000# and program in your MDN/MSID. Hit done. Phone will reboot.
    Talk/text will now work!
    b4xaJkv.png


    SASfXKo.png


    For 1X/3G working - use DFS
    a2. Connect phone to DFS and send SPC using above methods.
    b2. In DFS, open the Programming > Data tab and hit the read button.
    c2. Set the UID under HDR AN LONG to your MEID@hcm.sprintpcs.com
    d2. Set the Pwd to your 32-char hex password, no spaces between hex bytes. Make sure box is checked next to Pwd!!
    e2. In DFS go to the Programming > Mobile IP tab. Hit the blue "Read" button in the lower left.
    f2. Set the username(NAI) to the same username you just wrote in step c2... MEID@hcm.sprintpcs.com
    g. Set the AAA Shared Secret password. The same 32-char password used in step d. Make sure box is CHECKED for AAA!!!
    h. Set the HA Shared Secret password to: secret . Yes, the word secret. MAke sure the box is UNCHECKED for HA!!!
    i. Hit the red "Write Current Profile Settings" button.
    j. Back on your phone, open the dialer and press ##3282# and click "Data Profile" then "edit". Enter 000000 for code.
    k. Once inside Data Profile menu, set up your Sprint username and password(AAA password).
    username@sprintpcs.com and the AAA password is a 6-char password.
    l. Once data profile is written back out of the menu and the phone should reboot.
    1X/3G will now work!! [as long as ALL usernames and passwords were written correctly with the 100% correct info!!!]

    *Notes*
    1. If a ##786# reset is ever done, the 1X/3G data passwords will be wiped and have to be rewritten.
    2. Dialer code 3845#*970# > Data -LG menu has a PPP setting. Never set this to Sprint... always leave on "Undetermined"
    3. You shouldn't have to do anything for 4G to work.


    GV2kyPw.png


    RycEgCM.png




    Now you may say "yeah, that's great... but I don't know my MEID, IMEI, MDN, MSID, 32-char AAA password, Data Profile username... now what?"

    Good question.

    IMEI - Hopefully your phone isn't TOO messed up and you can still view your IMEI via Settings > About Phone > Phone Identity.
    If you can't read it, call Sprint and ask them for it, mention your phone acting up or blah blah. The IMEI is your MEID + 1 extra digit.
    MEID - MEID is on your LG OG box. You can also see this by viewing the current phone on your plan using Sprint.com
    You want to use the MEID HEX not MEID DEC. If you can only find the DEC you can use online converters to convert MEID DEC to HEX.
    MDN - MDN is your phone number. You should know this.
    MSID - MSID is sometimes the same as your phone number, but sometimes not. You can view this info in Settings > About Phone > Phone Identity
    You can call Sprint to get this info if you can't view it on your phone.
    Data Profile username/password - You can get this info by calling Sprint. You may be able to view the username with ##3282# > Data Profile > View
    32-char AAA Password - If you are unable to acquire your 32-char AAA password(NV item 466 and 1192), ask Sprint. You may have to speak to some form of advanced tech support.


    Code:
    [B]My other LS970 threads..[/B]
    [B][URL="http://xdaforums.com/showthread.php?t=2049701"][How-To] Enable DIAG mode without Service Code(MSL)[/URL][/B]
    [B][URL="http://xdaforums.com/showthread.php?t=2052816"][Info] LS970 Hidden Dialer Codes[/URL][/B]
    [B][URL="http://xdaforums.com/showthread.php?t=2058506"][WIP]Optimus G AT Commands[/URL][/B]
    12
    So if I'm reading this right, for simple minded people like me, make a backup with the backup zip. Then to restore, just follow that paragraph about restoring?
    Does this mean that if I mess up my phone as far as reception, I could just use my backup to restore it? This stuff is way beyond me, so I gotta pick your brain. ;)

    it doesn't touch the actual modem/baseband... but it backs up your entire EFS/NV. NV items are sort of like Windows Registry... but lower level than the Android filesystem. The PRL is also contained in the EFS.

    If you ever go into a hidden menu and set a weird setting which kills 3g... if you write a PRL and it goes wrong and you lose all reception.. if you flash a rom and all of the sudden your MEID is gone(etc etc etc).. then having an EFS backup would help.

    Backing it up saves the current state of the EFS. So yes, if you had a working backup and then ran into issues down the road... you could reflash your backup EFS and you'd have a fix(hopefully).

    The EFS contains all the unique parts of your phone... MEID, IMEI, Data Profiles, Phone number.. etc etc. Its the one thing that can't be replaced if it gets screwed up. If you don't have a backup and replaced all partitions from someone elses phone you'd have their meid, imei, phone number data profile etc.. instead of your own. This is where the 2nd half of my guide comes in. In the extreme case that you have no EFS backup and you can't get your phone replaced by Sprint/LG.. the ZERO EFS zip + guide can get your phone working again.
    4
    Just ran on my TWRP 2.4.0.0 and 2.4.1.0 -> no zip file being created.
    Switched to CWM and ran again, this time got zip.
    Thanks for all the work!

    i meant to say no "error" present.. i hope no one thinks i was yelling at them for not providing a log file ;) its strange because on my tests before i got 7z working right.. 7z would spit out errors. these new logs seem to show the 7z command being skipped over. glad to know it works on CWM.. but it's really bugging me why it won't work on all recoveries for everyone. Not sure if the issue is the script.. or the recovery. I'll keep messin'



    I've spoken with dee_troy about official TWRP for our device... that's something I'll try to get rolling today.

    engine95, thanks again for all your testing.. sorry to make you flash so many zip files ;) Hopefully I can get this sorted so it works on all recoveries.



    *UPDATE*

    So dees_troy has gotten things worked out for our device. Much thanks goes to him(as always). We are officially supported now!! Should show up on goomanager tomorrow. 2.4.2.0.. and we'll see updates as they arrive from now on. dees_troy has also added a EFS backup feature to the normal TWRP backup section. You can manually select EFS1, EFS2 and EFS3 when performing backups now.

    The EFS backup feature will NOT pack the EFS into a flashable zip like the zip in this thread does.. instead you would restore via TWRP restore. More options are a good thing! This is definitely an awesome addition for our device.

    I will continue working on the backup zip to try to make it as "universal" as possible for LG OG devices.. no matter the recovery.
    4
    Updated the Optimus_G_Create_Flashable_EFS.zip in the OP

    Now creates a flashable EFS backup instead of just a .tar. Just flash the "efsbackupflash.zip" in recovery to restore.

    m9kefs1.img, m9kefs2.img and efsbackupflash.zip are stored in /sdcard/EFS_Backup

    I suggest remotely backing up the zip somewhere(Dropbox, PC, etc) just in case /sdcard gets erased.
    3
    Wish I new about this a week ago....

    your broken EFS + skullzaflare's broken EFS + my broken ICCID were the reasons I put this together. Wish I put it out sooner :(


    So crazy question.... Can you use this to correct the radio in the Korean JB rom?

    I don't know enough about the Korean JB rom to answer that correctly. I do know it fixes the efs issues if you flash back to a Sprint rom after flashing the korean rom.

    is the Korean JB rom CDMA or GSM? I'm not even sure it matters.. but if it's also CDMA I'd have a better feeling about it maybe being possible.

    could you tell me the exact issues people were facing after flashing and using the Korean JB rom? was it working minus radio? was radio "active" but not working? etc etc.

    as long as you make a backup of your working efs first.. you can always restore back to it. I've flashed bad data to both efs partitions just to see how well this worked. my phone had no baseband.. no working radios... flashed my backup.. all working again. :good: