yashsingh1/xdaforums huggingface dataset:
[G2 Android Development] Steamer86:
Per CWM.
[G2 Android Development] terhiha:
I managed to do efsbackupflashable.zip, efs1.img and efs2.img with OP zip and CWM.

Found EFS_backup folder from data/media.

Tried to copy folder and files to sdcard, so I could move it to my computer. But my compurter doesn't see these files.

With root explorer I can see files, and they are 3mb each.

How on earth can I have those files to safe place. I really don't know how to use adb and pull :/
[G2 Android Development] Steamer86:
Answered in other thread.
[G2 Android Development] adichandra:
Thanks! Works great!
[G2 Android Development] ericdabbs:
Thanks for the zip files.
[G2 Android Development] 1stichiban:
Thanks, now i have backup of the EFS.

i got my G2 back from the service center (lost imei, unknown build, etc.) i wasn't able to "revive" it with my limited knowledge.

At least now i have a backup and hopefully won't brick it (again)
[G2 Android Development] hydeah:
Hi, considering above, once we are rooted and installed TWRP, we don't need to use this ZIP or any other tool like this: http://xdaforums.com/showthread.php?t=2466362, right?

Does TWRP back up IMEI information as well? I just want to know if I need anything else besides TWRP to back up essential stuff that will save me from a brick later on. Once I get that I am hitting every single "back up" or "take image" or any other back up options and storing them in a safe!

Thank you!
[G2 Android Development] cityneversleepz:
I was on the htc evo 4g and Firerat had a way to alter the partition sizes. EVO had storage space shortage so you could move things around to make system partition smaller, etc. Do you think this could be modified to do something like that? Looks like most of the roms for the LG G2 don't use up the entire system partition space. Usually an gig or so is left to go to waste.
[G2 Android Development] JRJ442:
I think IMEI and other things are in the EFS backup. So in TWRP, when you're making a backup and you've checked EFS backup, IMEI and everything else will be included when you restore that backup. I personally still flashed the EFS zip in the op, and uploaded that backup to Dropbox and Copy. Because you never know what could go wrong. And multiple backups are good to have.
[G2 Android Development] hydeah:
Thanks.

So flashing it is enough? I thought we need to run something after flashing it. Sorry, I am a rookie with these things and I could by understand how the backup is created.

Sent from my LG-D800
[G2 Android Development] JRJ442:
When you flash the EFS backup zip in the OP it creates a folder on your SD, it looks like this

Now tap that and there should be some files

See the efsbackupflashable.zip? That what was created when you flashed the zip from the OP. This one has IMEI and other stuff needed in case all hell breaks loose. So upload that to you favorite cloud, put it on your laptop too if you want. Honestly I don't think the chance of losing the IMEI is likely. I came from a S3 which is notorious for losing it, in a year and probably 100 flashes it never happened to me at all. Still, backups are good to have.
[G2 Android Development] hydeah:
Great info, really valuable and helps.

I always thought flashing just installs it, but in this case flashing it actually runs a code and creates a backup. When flashed does that install anything at all that unrequited removal later? Or is it just flash it every time you need to take a back up, but once is enough.

What about the other file he attached?

Sent from my LG-D800
[G2 Android Development] JRJ442:
Yup, you are exactly right about flashing it runs a script and creates the backup. And no it doesn't install anything that needs removal later. So just flash it once, and if it makes that backup zip in the folder it creates on the SD, it was successful. You don't have to do it again.

What do ya mean the other file he attached, do you mean the backup all zip in the op?
[G2 Android Development] marshygeek:
Sir can i flash this using CWM? and let's say i flashed this on TWRP can i restore it with CWM?
[G2 Android Development] Steamer86:
Yes. The data is held in /data/media if used with CWM. Move it and store it,
[G2 Android Development] ayysir:
what happens if you wipe system in twrp before this....
[G2 Android Development] autoprime:
if u wipe system only the backup would be untouched. only if you format entire /data partition(twrp advanced wipe for example) or wipe /data/media will the efs backups be gone. I always suggest storing the backup of efs off the device itself. I see people accidentally wiping their phone.. or forgetting they have the efs backup before wiping wayyyy too often.
[G2 Android Development] sefirosu0522:
Thanks for this. I had heard of it but did not know how to do it.
[G2 Android Development] honest1212:
I got my device yesterday and the first thing after rooting was to take Nandroid backup and efs backup. Thanks autoprime for all your efforts.

Previously I had optimus g where you can flash the zip and zero all your esn. Any similar zip available for g2 yet?
[G2 Android Development] Swamphound:
[MENTION=2684188]autoprime[/MENTION] I can confirm that your zip does beautifully using PhilZ recovery and places the folder in /sdcard. There is an option for efs backup using PhilZ on the GS3 but that option, while available for the LG G2 with TWRP, is not on the latest PhilZ for the G2. I prefer PhilZ so your work saved me from having to switch or recoveries. Thank you!

Sent from my SPH-L710 using Xparent Green Tapatalk 2
[G2 Android Development] honest1212:
I have created full partition using backup all zip, now there are around 14-15 img file in the backupz folder. How I restore all the partitions?
[G2 Android Development] slebit:
Thanks for this tool. Really useful to have. :)
[G2 Android Development] BreakingVZW:
Flash the img using flashify
[G2 Android Development] popkurn611:
Thank you for this! I ran a nandroid yesterday and could not for the life of me find my backup. What a weird spot to store it, coming from the s4 it was right in the cwm folder on internal storage.

Thanks again man
[G2 Android Development] Steamer86:
It's a good place incase /storage or /sd is accidentally wiped...
[G2 Android Development] honest1212:
Anyway to zeroing the EFS like it can be done on Optimus G?
[G2 Android Development] dunda92:
delete
[G2 Android Development] dunda92:
Please help, after do this all, my baseband and imei are still dead. :( I dont have more ideas...
[G2 Android Development] rfarrah:
What exactly did you do?
[G2 Android Development] j0sh1:
I accidentally have deleted my efs folder, its no where in my phone... i have no backups... heres my thread... any help will be highly highly appreciated...

http://xdaforums.com/showthread.php?p=49420390
[G2 Android Development] hydeah:
Does anyone know which version of TWRP is the minimum requirement for this?
[G2 Android Development] rfarrah:
I'm almost positive it was on 2.6.3.2.
[G2 Android Development] transient_itch:
I'm on rooted stock 4.2.2 and tried to flash zip using CWM 6.0.4.4.

It seems to have worked because it spits out:

Flashable EFS .zip located in /sdcard/EFS_Backup

Finished.

but the few lines at the end say this:

Checking if loki-fying is needed/dev/block/platform/msm_sdcc.1/by-name/boot needs lokifying. Error loki-ifying the boot image.

Is that a problem?
[G2 Android Development] autoprime:
is your CWM from freegee? Freegee and some other custom recovery options add an "auto-loki" option and I assume it checks all zips.

As long as you see the backup files it made on your internal sdcard you should be fine. there is no boot image in the zip to loki.
[G2 Android Development] transient_itch:
Ok cool. No I used Flashify to get into CWM.
[G2 Android Development] honest1212:
Any heads up? Please someone point to me on right direction please.
[G2 Android Development] Swamphound:
[MENTION=2684188]autoprime[/MENTION] this thread saved my a** today. Lost EFS when flashing a bad kernel and got it back in a couple of minutes cuz I had the backup. Ty for this method!

Sent from my VS980 4G using Xparent Green Tapatalk 2
[G2 Android Development] amit_sen:
Can i take backup of efs partition while running AOSP rom or stock rom is required ?
[G2 Android Development] honest1212:
Yes, its independent of ROM.
[G2 Android Development] your_m0m:
This saved me today. Out of nowhere my phone freaked out and rebooted with no efs. You sir saved my rear, thanks soooo much!
[G2 Android Development] JMM2009:
Can someone upload a blank restore zip, one that i can put my freegee efs.img’s in and flash. I keep getting an error says cant open file efs1.img .Thanks in advance. Never mind i had the wrong file path
[G2 Android Development] DornoDiosMio:
I'm in the same position you were a couple days ago. Exact same thing where my phone rebooted out of nowhere and could not be restored. Returning to stock did not work and then I saw in the logs my EFS was screwed.

A few hours of reading and searching and I'm 1/3rd of the way to fixing it. Thankfully, I too saw this thread and made a backup of my EFS and all other partition as soon as I was rooted.

So, I managed to root the phone via ADB with IORoot. Taking a break for now, after 4 hours of work, lol. Going to push recovery to my phone and then flash EFS backup from recovery.

The only reason I can think why this happened, is that I was messing around Undervolting my phone. It had run w/o issue that way for a couple of days, then all of a sudden after an intentional reboot the phone would not function. Regardless, I'm just glad you guys blazed this trail for me!
[G2 Android Development] farhanito:
hi [MENTION=2684188]autoprime[/MENTION],

can one easily flash backed-up boot.img to return to stock kernel after flashing a custom one? say, dorimanx for example.

thanks
[G2 Android Development] ousoonerchase:
Hey [MENTION=2684188]autoprime[/MENTION],

I have a backed up efs, but it didn't restore my imei. Everything works (phone calls, data, gps, blue tooth, mms) except sending an sms. I have tried:

Restore stock backup with efs,

Restore just efs from twrp backup,

Restore efs1.img and efs2.img with your script,

Restore from Freegee efs backup saved to Dropbox,

Return back to stock via tot file,

Extract efs1.img and 2 from backup and put into efs backup zip to flash.

After all that I have everything but an imei number. Mine is showing "0" in settings.

I'm on a D800, twrp 2.6.3.3 , att network. Any ideas?

There's a script in the OP for manually restoring your efs1.img and efs2.img
[G2 Android Development] autoprime:
hmm very interesting. How did you lose the IMEI in the first place? Are you 100% sure the efs backups were made prior to you losing the imei?

and these efs partitions you're restoring did come from the exact device you're restoring to right? because an efs from "device A" wouldnt work on "device b".

were more things missing prior to the efs restore.. which restored some thing but not imei?... or was imei always the only thing missing?

yup that'd work.

yes u can use flashify or use the adb shell command I have in the OP used for flashign back efs.. use some logic and you can use the same command format to flash boot... substituting efs1/2.img with boot.img and modemst1/2 with boot.
[G2 Android Development] ousoonerchase:
Yeah I've only had the one device, and the first thing I did when I got it was root, use Freegee to back up efs and install twrp, then made a backuo in twrp of my complete stock setup (data, recovery, efs, cache.. Everything)

Honestly I couldn't say if anything else was broken that the efs fixed, all I know was I had a bad flash (rom flashed successfully, but then wouldn't boot past lg logo.) Forced recovery mode, wiped everything and restored a recent backup that didn't have efs with it. Then noticed I couldn't send an sms despite being able to send mms and group messages. First instinct was just restore efs back up. And that brings you to where I am now. I don't know if it would be of any use to you, but I could pm you my efs and maybe you'd be able to see if my imei is in it at all? Also, I found out that my Freegee backup on Dropbox isn't actually there. I went to the folder created but it's empty. Im willing to try any ideas you have, as worst case scenario I'll just play dumb at att and get it fixed that way. I still have the box and imei sticker to prove it's mine, just have no idea how to write that info to the phone.

I really appreciate your time and efforts, sir.
[G2 Android Development] autoprime:
there's no way to open up an efs and tell if your imei is in there.. the partition is encrypted.

I suppose I'm biased but I like my flashable EFS zip method the best. Did you run my backup efs zip initially or only backup thru twrp/freegee?

I personally dont like the twrp efs backups(or at least backing up efs each time backup) because theres only need for one original efs backup. making new efs backups as you go may backup efs partitions that have issues... original backup gets lost.. and you think you're good because you have other more recent backups. Not sure if something similar may have happened with you.

and did you still have your freegee efs backups in the freegee folder... or were you only relying on the ones that should have been in dropbox?

either way.. if none of the backups are restoring your imei then I think you're out of luck. only things that can fix it would be restoring efs partitions(both partitions) or sometimes re-flashing the modem can help. Since you restored with a tot tho.. the modem should have been reflashed.. which didnt help you.

If taking back to att i would make sure to restore with tot again to wipe any root status.
[G2 Android Development] ousoonerchase:
I was afraid that was the case. Is this something that can be fixed if I find a repair shop with jtag or octoplus box or whatever? Or something the att service center can fix? Or will I need a replacement device? I still have the Freegee folder but don't see anything called efs. I had been relying on Dropbox and twrp. Also, in my twrp backup the file is called efs1.emmc.win and efs2.emmc.win I tried renaming a copy of them to .img and it flashed successfully, but didn't give me an imei.

I'm gonna try the modems now and report back. And yeah, I'm gonna go all the way back to version d with tot, update to o, and then say I downloaded the update finally and idk what happened haha.

---------- Post added at 06:37 PM ---------- Previous post was at 06:09 PM ----------

Tried flashing the modems and no luck there either. Upon flashing the o version my "imei sv" changed from 03 to 06, but nothing else. Also, I don't know if it's my device, or the Freegee app, but I tried switching from twrp to cwm using that app and it caused a secure boot error and never could actually get into cwm recovery. I do really appreciate your help, autoprime. Funny thing is with my OG I used your efs backup solution and never had an issue. I guess lesson learned for next time.

With all this said, is there a way to verify that efs has been backed up successfully without flashing it to test? Like now I have an efs file that's useless, but wouldn't have known that until I needed it and it didn't help. Just wondering.
[G2 Android Development] autoprime:
If EFS is truly gone then it would take some pretty serious EFS rebuilding... which likely wouldnt happen anywhere except perhaps an official LG Service Center. If you take your phone in.. it'd most likely be replaced with a new/refurb device. JTAG wouldn't fix it... its possible Octopus Box could repair IMEI.. but if there were more issues in the EFS on top of IMEI missing Octopus probably wouldn't work.

as for the Freegee folder you have... do you see modemst1.img and modemst2.img ? That is your EFS. If you DO have them.. place them on the internal storage.. reboot into TWRP and run:

adb shell

dd if=/sdcard/modemst1.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst1

dd if=/sdcard/modemst2.img of=/dev/block/platform/msm_sdcc.1/by-name/modemst2

confirm there are no errors when issuing those commands... reboot into system and hope for the best.

There is really no way to confirm a good EFS backup other than to flash it... which, if bad, could ruin the working EFS. :(

Best option is to backup EFS while in recovery using either dd commands to manually backup or using my flashable zip to automate the process.

I'm tinkering with adding EFS backup to IOroot... so everyone will have their EFS backed up on their computer immediately after rooting.
[G2 Android Development] Steamer86:
This is why I offloaded multiple copies of my EFS to PC, laptop, and cloud services in three stock zip runs. If worse came to worse even after the three different stock copies, TEC Verizon, all yours. QPST ect, GL!
[G2 Android Development] Germanese:
I am coming from a Razr M Motorola.

And reading through this, is a bit overwhelming.

I see a lot of TWRP mentions. My curiosity is, is there a way to back up with CWM ?

I got CWM to work on my G2 and it feels more comfi for me to use, though it doesn't have the Auto Backup as TWRP.

So is it possible to use the automated Zip in CWM or they not compatible ?
[G2 Android Development] ousoonerchase:
Unfortunately I could not find those files on any of my backups. And I would absolutely endorse including the efs backup as a step in the ioroot. I'll get my phone sorted out with att in the next couple days, and when I get it back, running your backup zip will be step 1 and 2 haha. Thanks a ton for your help, and your work here.

I found some mentions of qpst, and even downloaded it, but couldn't find any g2 specific guides and kinda chickened out. Do you have any pointers? And what do you mean by tec Verizon?
[G2 Android Development] Steamer86:
Total equipment coverage. When all else fails, bsing then it its. I can't explain pointers. Lots and lots, did I say lots, of googling. I learned the basics from Razor V3M days.

---------- Post added at 11:28 PM ---------- Previous post was at 11:27 PM ----------

Possible, they get stored in data/media. Do both zips, store multiple copies of both.
[G2 Android Development] ousoonerchase:
Well I messed around with QPST and wasn't able to figure out how to get my D800 into diagnostic mode. ##Diag# didn't work, unfortunately, and I couldn't find the appropriate settings in the hidden service menu, and download mode was able to get my phone seen by QPST, just not as a phone, and therefore couldn't modify imei. Either way, I was able to get my device replaced at at&t citing a botched official update. No questions asked. Just bummed a bit because a had a bin 4 device, but now only a bin 3 haha. Anyway, just wanted to give an update to those who had helped me try to get this figured out.

With all this said, I suspect the FreeGee app is having some problems. I tried to back up efs with the inbuilt dropbox support, but no files were actually sent to dropbox, only a folder was created. Secondly, the recoveries it uses seem to have several problems, backing up efs being one,and usbotg support being the other. So, for now, I would recommend that anyone looking to use FreeGee instead use autoprimes efs backup, and a different method of installing recovery. Hope this can save someone from the headaches I've been having.
[G2 Android Development] epapsiou:
I have 2 D800 and tried freegee on both. I am not a big fan.

I got soft bricked too but flashtools fixed it

Also the 8100o does not play nice so if you are able to get back your phone i recommend 8100d and then everything(rooting,recovery) works fine.

---------- Post added at 09:11 AM ---------- Previous post was at 08:58 AM ----------

Autoprime,

I used ioroot21 to root my wife's phone and was able to back up efs. I rooted mine a few days ago but used an older version(17 i think) of ioroot so I could not back up EFS (I assume it is a new feature you added. An excellent feature)

Is there a command line way of backing up efs partition? I know you have zips but I do not trust recoveries (especially on ATT 8100o firmware).

Ioroot21 (for efs backup) does not work on rooted phones. I tried :(
[G2 Android Development] autoprime:
put phone in airplane mode. I find it better to do this in recovery when system is booted up but since you don't want to run recovery... use airplane mode.

dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/sdcard/modemst1.img

dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/sdcard/modemst2.img
[G2 Android Development] ousoonerchase:
Thank you for all the hard work you do here, [MENTION=2684188]autoprime[/MENTION]

Confirmation number: 8KU69768E1922545Y
[G2 Android Development] autoprime:
Thank you very much. I appreciate it. :highfive:
[G2 Android Development] Tinchoska:
Downloading the efs backup zip... dude you are working really hard.... is it a way to donate something?

Enviado desde mi LG-D806 mediante Tapatalk
[G2 Android Development] Spaniard85:
Sooo what are my options for restoring my efs if I'm already back to stock ROM/recovery? I don't have the zip anymore since that was lost during the restore to stock process, but I do have the 2 modemst files in my IOroot22 folder. Any help is greatly appreciated.

EDIT: Solved my own issue... with a new device. Mine was less than 14 days old, so I got a replacement in-store.
[G2 Android Development] apvikes28:
Thanks for all the hard work. I had bricked my phone and had to send it to LG because I didn't know about this. This gave me the confidence to root again when I got it back. Thanks again.
[G2 Android Development] JRJ442:
Next time keep a copy of the efs backup on your laptop, and one in a cloud like Dropbox. You can never have too many copies of it.
[G2 Android Development] Spaniard85:
For sure. I've got a copy in both locations already.
[G2 Android Development] JRJ442:
Me too. Coming from a S3 I've seen too many horror stories of what can happen when the EFS/IMEI gets lost.
[G2 Android Development] pvinodnayak:
EFS COPY

Can a completely stock EFS backup be copied to another completely stock phone of the same model ?

or does it change IMIE of the other phone ?

Why im asking this question ?

G2 LS980 works on Indian carriers in RUIM mode out of the box, that includes DATA CALLS and SMS.

but if the phone was earlier flashed to some other or the same network in NV mode, RUIM data does not work.

meaning calls and sms work but data does not work. by flashing a set of NV and PRL what changes take place in

EFS partition ? can we restore EFS to factory state without any backup ?
[G2 Android Development] j0ff:
Flashing an efs backup from one phone to another doesn't work. Phone still boots up fine but IMEI is 00's so won't register on a network.
[G2 Android Development] drdnght mrk lazarus:
so funny thing

When I first got my lg g2, I rooted it like the day I got it, and ioroot made a backup of the modemst1 & st2, I've backed them up on my dropbox since

After numerous flashing, returning to stock and rooting till this day because of issues regarding data connectivity dropping & such

I open ioroot to root, the files it pulls now, modemst1 & st2

they have the same file size

but the md5 sums don't match the ones I backed up to my dropbox...

imei number in my phone is still correct though, imei sv on the other hand is 00

should I worry?
[G2 Android Development] robogo1982:
I don't believe it's a problem, not really. Keep them all backed up, though.
[G2 Android Development] vixman:
HELP

Do i have any options for restoring my efs if I'm already back to stock after using the LG Flash tool.. I don't have the zip anymore since that was lost during the process, i checked on my IOroot folder and i can see the two zip files modemst1 and 2. Thanks in advance.
[G2 Android Development] vixman:
How much did LG charge you to fix your issue? Thanks.
[G2 Android Development] Liquid5n0w:
[MENTION=2684188]autoprime[/MENTION], I need the find the EFS of a different variant then mine, should I just ask around until I find someone with the phone I need, or do you know of an easier way? I need the D803 Telus variant.
[G2 Android Development] autoprime:
someone elses EFS will not work on your phone. This is why backups are so important.