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

Search This thread

javskies

Senior Member
Dec 17, 2012
1,076
356
davie
Thanks for the help. Sadly restoring your efs does not fix Houston's jb port call problem:/

Sent from my LG-LS970 using xda premium
 
Last edited:
  • Like
Reactions: engine95

engine95

Inactive Recognized Contributor
Oct 14, 2008
3,912
4,805
Google Pixel 2
Google Pixel 4a
Last edited:

javskies

Senior Member
Dec 17, 2012
1,076
356
davie
Oh I know lol I just wanted to change it so I wouldn't confuse more people

Sent from my LG-LS970 using xda premium
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
Updated Optimus_G_Create_Flashable_EFS.zip to be "safer" and more universal among Optimus G devices.

Updated LS970_ZERO_EFS to include the "backup efs to flashable zip" feature to run before writing the ZERO EFS.

*UPDATE*
yet another edit..

I've decided to include m9kefs3 in the backup process. Even tho m9kefs3 seems to have all 00's and not be used... better safe than sorry.

Both the EFS backup and ZERO EFS zips have been updated in the OP to reflect this change.
 
Last edited:

skullzaflare

Senior Member
Apr 18, 2011
258
56
Updated Optimus_G_Create_Flashable_EFS.zip to be "safer" and more universal among Optimus G devices.

Updated LS970_ZERO_EFS to include the "backup efs to flashable zip" feature to run before writing the ZERO EFS.

*UPDATE*
yet another edit..

I've decided to include m9kefs3 in the backup process. Even tho m9kefs3 seems to have all 00's and not be used... better safe than sorry.

Both the EFS backup and ZERO EFS zips have been updated in the OP to reflect this change.

Auto, would you be able to make a backup zip to make a backup of ALL partitions?
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
Auto, would you be able to make a backup zip to make a backup of ALL partitions?

That's on my to-do list. Planned on looking into that as well as the AT&T EFS later tonight. I need to backup all the partitions once again and them double check to make sure which partitions actually contain data in them and which don't. For the partitions that do not contain data.. I want to try to look into other methods of pulling those.. see whats really doable and what isn't.

If you have a list of which partitions without a doubt have data after backing up.. and which don't.. that'd speed things up. If not, don't worry about it.

All the other partitions shouldn't contain any any unique data from the phone and partitions from other devices could be shared without worry... but yes.. it'd be much easier if we all had our own backups.
 
Last edited:
  • Like
Reactions: matury

engine95

Inactive Recognized Contributor
Oct 14, 2008
3,912
4,805
Google Pixel 2
Google Pixel 4a
I'm not sure this latest update is right.
It backed up the 3 img files to folder EFS_Backup, which all 3 were the same file size, 780kb. And it never created a flashable zip. I thought the second version did.
And if I were to follow the directions in the OP to restore... I don't think it will restore.
Am I missing something? Like the flashable zip that has the "backup????sh"?

Edit. I just reran it and still don't have the "efsbackupflash.zip anywhere.
I do see it in the ZERO.zip though. So do we use the Zero_EFS.zip to restore it now?
 
Last edited:
  • Like
Reactions: ABurningFalcon

toprock23

Senior Member
Jun 11, 2010
508
183
New Jersey
I actually signed the 2 year contract, I have gotten my first LG through craiglist, then got home and saw this, I did it and the radio worked right away, again great job guys.:)

Edit: I will start theming this baby soon.

Sent from my LG-LS970 using Tapatalk 2

At last we have a themer :) :beer:

Sent from my LG-LS970 using xda premium
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
I'm not sure this latest update is right.
It backed up the 3 img files to folder EFS_Backup, which all 3 were the same file size, 780kb. And it never created a flashable zip. I thought the second version did.
And if I were to follow the directions in the OP to restore... I don't think it will restore.
Am I missing something? Like the flashable zip that has the "backup????sh"?

Edit. I just reran it and still don't have the "efsbackupflash.zip anywhere.
I do see it in the ZERO.zip though. So do we use the Zero_EFS.zip to restore it now?

hmm. i just reuploaded the zip with a v4 at the end to make sure it was the new file.

i deleted my EFS_Backup folder on the /sdcard.. booted into recovery.. ran the zip... while still in recovery I used adb to check the /sdcard/EFS_Backup folder with the "ls" command and the efsbackupflash.zip, m9kefs1.img, m9kefs2.img and m9kefs3.img were all there. I rebooted into the rom and using Root Explorer I checked the folder again. Files were all there.. .zip + 3 efs files.

could u try running the new v4 zip? it should work. which recovery are u using? if you do "ls" in /sdcard/EFS_Backup theres no zip? While still in recovery(but after running zip) can you run "ls" in /tmp? still no .zip? can you get me the "recovery.log" file after you flash the zip?
 

engine95

Inactive Recognized Contributor
Oct 14, 2008
3,912
4,805
Google Pixel 2
Google Pixel 4a
hmm. i just reuploaded the zip with a v4 at the end to make sure it was the new file.

i deleted my EFS_Backup folder on the /sdcard.. booted into recovery.. ran the zip... while still in recovery I used adb to check the /sdcard/EFS_Backup folder with the "ls" command and the efsbackupflash.zip, m9kefs1.img, m9kefs2.img and m9kefs3.img were all there. I rebooted into the rom and using Root Explorer I checked the folder again. Files were all there.. .zip + 3 efs files.

could u try running the new v4 zip? it should work. which recovery are u using? if you do "ls" in /sdcard/EFS_Backup theres no zip? While still in recovery(but after running zip) can you run "ls" in /tmp? still no .zip? can you get me the "recovery.log" file after you flash the zip?

I'm using TWRP 2.3.2.3.
In /sdcard/EFS_Backup in recovery, it only shows the 3 img files. No zip
The tmp I have is ".tmp" and it has nothing at all.
Here's the recovery log.

edit: Theres no zip in Explorer either. Just the 3 img files.
 

Attachments

  • recovery.log.txt
    10.9 KB · Views: 28
Last edited:
  • Like
Reactions: autoprime

engine95

Inactive Recognized Contributor
Oct 14, 2008
3,912
4,805
Google Pixel 2
Google Pixel 4a
autoprime just spent alot of time with me trying to figure out why I'm not getting the EFS zip.
Can a few of you with TWRP try this to see if it's just a me thing? It won't hurt your phone, just another backup.
You should end up with 4 files in the EFS_Backup folder, I think.

Edit. autoprime I hope you don't mind.

Sent from my LG-LS970 using xda premium
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
autoprime just spent alot of time with me trying to figure out why I'm not getting the EFS zip.
Can a few of you with TWRP try this to see if it's just a me thing? It won't hurt your phone, just another backup.
You should end up with 4 files in the EFS_Backup folder, I think.

Edit. autoprime I hope you don't mind.

Sent from my LG-LS970 using xda premium

not at all... im very curious as well. i have some ppl confirming it works on both cwm and twrp.. some ppl with issues on old cwm(fixed with new version) and then theres at least 2 of you where there is NO error present... 7z just fails to run.

id like to see how many others are running into this. this will also help me find more testers to send the newer test files to.
 
Last edited:

sharkboy0901

Senior Member
Jun 15, 2011
1,319
670
I'm using TWRP 2.3.2.3.
In /sdcard/EFS_Backup in recovery, it only shows the 3 img files. No zip
The tmp I have is ".tmp" and it has nothing at all.
Here's the recovery log.

edit: Theres no zip in Explorer either. Just the 3 img files.

You should update twrp it's been through some pretty good changes.

Sent from my LG-LS970 using xda app-developers app
 

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
dees_troy just posted on his twitter.. "Building TWRP 2.4.2.0 for release tomorrow..."

so hopefully someone builds that for us soon... of even better... optimus g gets official support :)
 
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: