Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,909 Members 37,685 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Backup/Restore LG Optimus G EFS Partitions

Tip us?
 
autoprime
Old
(Last edited by autoprime; 25th February 2013 at 04:29 AM.)
#1  
autoprime's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 4695
Posts: 1,604
Join Date: Jun 2010

 
DONATE TO ME
Default [GUIDE] Backup/Restore LG Optimus G EFS Partitions


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

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:
Changelog

v1 EFS backup zip:
backed up m9kefs1.img and m9kefs2.img then .tar'd them.

v2 EFS backup zip:
backed up EFS then creates a flashable .zip containing the EFS partitions. 

v3 EFS backup zip:
zip script is now "safer" and should work on all Optimus G variants. 

v4 EFS backup zip:
backup zip now backs up m9kefs3. this is for "completeness" only. 
I believe m9kefs3 contains no worthwhile data.
Attached Files
File Type: zip Optimus_G_Create_Flashable_EFSv4.zip - [Click for QR Code] (1.06 MB, 2024 views)
The Following 20 Users Say Thank You to autoprime For This Useful Post: [ Click to Expand ]
 
funkym0nk3y
Old
#2  
Senior Member
Thanks Meter 44
Posts: 136
Join Date: Oct 2010
Thanks for posting this, it is very much needed and all OG users must have their EFS partitions backed up. And i can confirm that m9kefs3 doesnt contains anything except zeroes, still its good to have it backed up :P
The Following User Says Thank You to funkym0nk3y For This Useful Post: [ Click to Expand ]
 
jiexi
Old
#3  
jiexi's Avatar
Senior Member
Thanks Meter 25
Posts: 227
Join Date: May 2012
I'm on CWM 6.0.1.5, what is the newest CWM version that works the the Canadian LGOG variants that doesn't give sd-ext mount errors?

I tried 6.0.1.7 but got constant errors.
 
autoprime
Old
#4  
autoprime's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 4695
Posts: 1,604
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by jiexi View Post
I'm on CWM 6.0.1.5, what is the newest CWM version that works the the Canadian LGOG variants that doesn't give sd-ext mount errors?

I tried 6.0.1.7 but got constant errors.
I also get sd-ext mount errors on my Sprint Optimus G(ls970). The errors don't seem to get in the way of anything.. seems it's just visually annoying. I'd love to see official TWRP versions for LGOG device.
 
jiexi
Old
#5  
jiexi's Avatar
Senior Member
Thanks Meter 25
Posts: 227
Join Date: May 2012
Quote:
Originally Posted by autoprime View Post
I also get sd-ext mount errors on my Sprint Optimus G(ls970). The errors don't seem to get in the way of anything.. seems it's just visually annoying. I'd love to see official TWRP versions for LGOG device.
Exactly! 720p screen for viewing errors
 
billybest
Old
#6  
Member
Thanks Meter 19
Posts: 89
Join Date: Dec 2009
Some information: flashable zip does work correctly on official at&t twrp 2.4.2.0 on my rogers e971. sdcard/EFS_Backup only the 3 .img files and no zip
 
autoprime
Old
#7  
autoprime's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 4695
Posts: 1,604
Join Date: Jun 2010

 
DONATE TO ME
Quote:
Originally Posted by billybest View Post
Some information: flashable zip does work correctly on official at&t twrp 2.4.2.0 on my rogers e971. sdcard/EFS_Backup only the 3 .img files and no zip
Thanks for the update. Apparently the 7z binary Im using in the script is dynamic.. and won't work with everyones setup. All my tests were done using CFX 4.2.2... seems there's stuff in that rom not found in some other LGOG roms. You will just have to dd the partitions if you ever need to restore. I guess at this point.. consider a working flashable .zip a "bonus" :-/


Also... the newest FreeGee app in the Play store supports EFS backup.. also backs up 3 separate .img files.

The official TWRP for the Sprint LGOG also has EFS backup support added into the normal backup section. I would *think* this would run on Canadian LGOG's... you guy's don't have external SD right?
 
billybest
Old
#8  
Member
Thanks Meter 19
Posts: 89
Join Date: Dec 2009
We have external sd. There is no sd card slot on my Canadian Rogers E971 phone.
The Following User Says Thank You to billybest For This Useful Post: [ Click to Expand ]
 
geokilla
Old
#9  
geokilla's Avatar
Senior Member
Thanks Meter 275
Posts: 2,591
Join Date: Jun 2010
Location: Toronto
Just backed em up using the FreeGee app.. Aren't EFS flashed every time you flash a ROM?
LG Optimus G E971
ROM: Ported Korean Kit Kat by Paulicat

Google Nexus 4
ROM: Carbon 4.4.2

Google Nexus 7
ROM: Carbon 4.4.2
 
funkym0nk3y
Old
#10  
Senior Member
Thanks Meter 44
Posts: 136
Join Date: Oct 2010
Quote:
Originally Posted by geokilla View Post
Just backed em up using the FreeGee app.. Aren't EFS flashed every time you flash a ROM?
No.

The Following User Says Thank You to funkym0nk3y For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes