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

Search This thread

engine95

Inactive Recognized Contributor
Oct 14, 2008
3,912
4,805
Google Pixel 2
Google Pixel 4a
Just an FYI for anybody that has my predicament. I installed CWM 6027 from the ATT forums and everything worked fine. This is only for us abnormal ones that can't get this to create the backup efs zip. ;)
Thanks auto for all your time.

Sent from my LG-LS970 using xda premium
 
  • Like
Reactions: autoprime

artlan

Senior Member
Aug 7, 2007
227
96
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 log 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.

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!
 
  • Like
Reactions: autoprime

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
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.
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
from the sounds of it.. this .zip wont be needed for much longer. between official TWRP adding EFS backup support.. and I hear freegee will start backing up EFS on unlock now.. everyone should have their efs backed up from the get go. I think it's great that people are paying attention to EFS now.. and taking the steps to stay safe.

It'll still be nice to have a flashable backup I suppose. and the EFS ZERO zip in this thread will still help everyone out that never backed up and has a broken EFS.

I still need to finish the complete phone backup zip(all partitions). Trying to think if there's anything else I can add... or even anything related to Optimus G that hasnt been done yet that we need.

Ideas anyone?
 
Last edited:

Lrod0175

Senior Member
Jan 4, 2011
4,045
2,759
New Jersey
Autoprime is getting some freegee love, credit where credit is due.


Sent from my LG-LS970 using Tapatalk 2
 

Attachments

  • uploadfromtaptalk1361921359301.jpg
    uploadfromtaptalk1361921359301.jpg
    56.8 KB · Views: 289

rixter1972

Senior Member
Oct 29, 2010
63
5
Samsung Galaxy Tab E
cdma tool

Join Date: Oct 2010

Default [Q] repair efs> cdma tool
I just tried to download DFS from www.cdmatool.com and i got a 404 error. Does anyone know where i can get this? I can get my phone replaced but i want to try to fix it first so i can learn how.


Edit sorry I meant to post this in Q and A i had several screens open. I could not delete.
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
Join Date: Oct 2010

Default [Q] repair efs> cdma tool
I just tried to download DFS from www.cdmatool.com and i got a 404 error. Does anyone know where i can get this? I can get my phone replaced but i want to try to fix it first so i can learn how.

DFS downloads just fine. sometimes servers go down for short moments... take a breath and try again.
 
  • Like
Reactions: rixter1972

rixter1972

Senior Member
Oct 29, 2010
63
5
Samsung Galaxy Tab E
I've restored talk and text although my IMEI is still zeroed out the guy i talked to at sprint told me to add a zero to the meid and i don't think that was correct but i guess i could just take 9 more shots at it and one should be correct. Should the 32-char AAA password be all numbers? The tech at sprint gave me one containing letters as well. Also can the 3g data be restored with a locked bootloader? I do currently have root but the bootloader is still locked and i havent yet installed recovery.
 
Last edited:

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
I've restored talk and text although my IMEI is still zeroed out the guy i talked to at sprint told me to add a zero to the meid and i don't think that was correct but i guess i could just take 9 more shots at it and one should be correct. Should the 32-char AAA password be all numbers? The tech at sprint gave me one containing letters as well. Also can the 3g data be restored with a locked bootloader? I do currently have root but the bootloader is still locked and i havent yet installed recovery.

Yes, just keep guessing the last digit. If meid stuck... then imei should stick once last digit is correct.

No 32-char PW is both numbers and letters(hex).

This has nothing to do with being unlocked.. so it's not needed.
 
  • Like
Reactions: rixter1972

devo3d

Senior Member
Oct 10, 2012
314
30
Huntsville
I need to write to EFS (num file)

I've been trying to write to EFS in the "num" file but the changes will not stick. Would it work if I back-up the EFS on my computer and made the changes on my computer then copy the EFS over the one on my phone?
The reason I am wanting to do this is because I have my OG flashed to Verizon Prepay but 3G does not work. Will the above method work in your opinion or should I try to use the "fix 3G" method you outlined? If so, what would the correct IMEI@????? for Verizon be to get the 3G? (PM if you feel it necessary)
 

nuformzdesign

Senior Member
Apr 1, 2010
161
20
Ok. I know very little about the inner workings of Android, despite lurking around these forums for the last several years.

I'm running Lifeless v14,with no other kernels or tweaks besides what's included in his ROM. With no warning whatsoever, I experienced a kernel crash and what appeared like a "blue screen of death" and after that when my phone boots up, there's a red X over my signal bars. No service at all.

I have no idea what happened, but from my limited knowledge of technical terms, it seems like the process detailed in this thread might help me out. Can anyone tell me if I'm on the right track? Or point me further in the right direction?


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

autoprime

Recognized Dev / Inactive Recognized Contributor
Jun 23, 2010
2,630
11,873
Ok. I know very little about the inner workings of Android, despite lurking around these forums for the last several years.

I'm running Lifeless v14,with no other kernels or tweaks besides what's included in his ROM. With no warning whatsoever, I experienced a kernel crash and what appeared like a "blue screen of death" and after that when my phone boots up, there's a red X over my signal bars. No service at all.

I have no idea what happened, but from my limited knowledge of technical terms, it seems like the process detailed in this thread might help me out. Can anyone tell me if I'm on the right track? Or point me further in the right direction?


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

did you backup your EFS with FreeGee when you unlocked your phone? If so you can repair your phone's efs pretty easily. you could also try reflashing the ZVB modem. I have posted the ZV9 and ZVB modems in a thread here - http://xdaforums.com/showthread.php?t=2230106

If you don't have an efs backup and the ZVB modem flash doesn't work then you could try getting your passwords from Sprint like I mention towards the end of my original post. Then you could use that info along with the zero efs zip to restore a working EFS. Other than that... you could try some of the "restoring efs tips" in the first post like a factory reset or a LGNPST flash back to stock.
 
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: