yashsingh1/xdaforums huggingface dataset:
[G2 Android Development] autoprime:
in modemst1 and 2 files in ioroot folder are your efs partitions. they can be restored manually.. tho they shouldnt be restored unless your EFS is broken somehow.

you will need to stick both files onto your internal sdcard.

then boot into recovery and use the following 3 commands using adb...

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

as long as there are no errors... you're good to go.
[G2 Android Development] Liquid5n0w:
So when I did a return to stock with a .tot file it did not affect my EFS I assume.
[G2 Android Development] vixman:
Well i went to about phone and everything says unknown. I was looking around and it seems like it is the efs partitions. One question, my phone keeps on booting off and on. so i do not have time to connect to my sdcard. how would i be able to copy those files to it? i was thinking adb but i have no idea what are the commands for that.. any help?
[G2 Android Development] jurington:
Im glad i stumbled upon this thread, i never new you could lose your imei number. And your zip worked like a charm in twrp 2.7 and im uploading the files to my google drive account as im typing this. Thanks for your hard work and keep it up!!!! :)
[G2 Android Development] chewy74:
got an error saying cannot open for write: Permission denied
[G2 Android Development] dafunk2:
Hi [MENTION=2684188]autoprime[/MENTION] and everybody.

I'm in this situation:

- I have a backup of stock rom including efs partition made with twrp 2.6.3.3 in my pc. If I browse the backup folders i can find 4 files into. I think the "img" files are efs1.emmc.win and efs2.emmc.win.

- i flashed back to stock to 4.2.2 then i have no root nor recovery. (I know, I'm an IDIOT!)

- because (i assume) of a messed up efs partition the phone boots but after about 1-2 mins reboots, so i haven't enough time to root it again and to install a recovery.

- the phone can enter in download mode.

This is a nightmare for me.

I sent under repair to lg italy (d802 with international warranty) but i checked on their website and i could see the phone has been sent back not repaired, so maybe Monday or Tuesday i will have my brick back. :(

It's there a way to fix it? Is possible to"flash" or push via adb when in download mode or via lg flashtool the two efs images backed up with twrp?

Even better, is there a way to install a recovery so that i can restore the backup containing the efs partition?

Many many thanks in advance for your kind help, this will save me to have a wonderful brick over my desktop :(
[G2 Android Development] dafunk2:
Bump!

Anyone? Please, i'm living a nightmare. :(
[G2 Android Development] autoprime:
if you have 1-2 min before it reboots then u have PLENTY of time to root and then install recovery. then u can restore efs.
[G2 Android Development] lord dredd:
Thanks a lot AP :)
[G2 Android Development] dafunk2:
Thanks a lot autoprime, now I have my g2 working again. :D

Inviato dal mio Nexus 7 utilizzando Tapatalk
[G2 Android Development] DracoPiece:
why cant i flash this on my philz? the efs backup
[G2 Android Development] DJMaj07:
Read about possible EFS corruption so I went to check if my backups were in the ioroot folder on my pc... only to find I had deleted the folder at some point previously :(

But then I realized those file names looked familiar. They've been chillin in my internal storage since I rooted! Thanks for the redundancy, you saved me a lot of hassle!! You rock dude
[G2 Android Development] thenorm89:
Hello, I'm running stock rooted 4.4.2 d800 at&t variant, and was trying to manually backup the efs partitions (no custom recovery installed) using the commands in Ubuntu 13.10

adb shell
su
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

it says the file was transferred, but only thing showing on the internal storage is two blank files (0 bytes) EXMEDIA_DB_COMPLETE File and INMEDIA_DB_COMPLETE File

can anyone help me out? adb connects properly and lists my device correctly.

[edit] In ubuntu and windows it shows the above file names with 0 bytes, but upon downloading ES file explorer and navigating to sd/ the modemst1,2.img files are present. saved to dropbox and computer, thanks autoprime!
[G2 Android Development] tomc585:
Running Sprint stock zvc via tot and rooted with ioroot25. From what I understand my EFS files are already backed up on that pc? Where would I look?, thanks.
[G2 Android Development] autoprime:
ioroot will only back up efs automatically if on 4.2.2. due to a different method used in 4.4.2... it doesnt do efs backup.

you'd have to run the efs backup commands manually. my ioroot25 main post details this.
[G2 Android Development] tomc585:
I used iroot when i was on 4.2.2, would that file be there? and where? I looked around in the iroot folders., and would it be compatible with 4.4.2?
[G2 Android Development] tomc585:
Now I know why I couldn't find the files modemst1 and modemst2 in the iroot25 folder....because I used iroot24 and deleted it when I got iroot25. I did still have it in my recycle bin and restored it and there they where. So, can these still be used if they were created from when i rooted on ZVA to repair the phone with ZVC? or should I make a new backup of them?
[G2 Android Development] autoprime:
if you have a few seconds then you have enough time to root. if using 4.2.2 you only need temp root.. which takes about 2 seconds to push the file to internal sd(you simply use steps 1 and 2 of the manual root directions). then if u have another 2 sec.. you can use that to push twrp img to internal sd... and with another 2 sec... you can use adb shell commands to dd twrp into the recovery partition. so all you need is usb debugging enabled and about 2 sec to get the job done. if it reboots after 3 sec... then it'll simply take 3 reboots to do all 3 commands. if youre really quick.. u only need 1 sec to do each command... and theres enough time to be in adb shell to do that before the boot animation even stops. be quick with adb/commands and you can do this. then once u have twrp you can boot into recovery to restore.

they can still be used. only 1 efs copy(modemst1/modemst2) is needed. rom/android version is irrelevant. store efs somewhere safe.. dropbox.. email it to yourself.. something.
[G2 Android Development] buracho:
Thanks for the reply! I Wish i was a pro.... with rooting, kingo and ioroot are only ones I know, i will google temp root now:).. for the twrp.img part i will use OTG like i did for the efs files to copy to sdcard, thats done:) But the last part hmm when i type adb shell it says error: closed, ive tried 3 different adb tools and all dont work. I used them successfully for adb push and pull in twrp before. what am i doing wrong autoprime? Thank you again for the help:) I appreciate it:)

Ok not rooted yet but I managed to get recovery.img on sdcard and got passed the adb shell error and ready to type commands:):)

Still looking for a temp root file:)
[G2 Android Development] buracho:
progress:)

Rooted my G2 before it shutdown again:)

Sent recovery.img (twrp 2.6.3.3) to /sdcard

Sent modemst1/2 on /sdcard.....

I guess next step is to flash twrp in recovery partition, do i boot into stock recovery and flash it from there or use adb shell while its booted up? OP is for flashing efs on custom recovery not on stock....am so confused? What are the commands?:)
[G2 Android Development] kennguy:
Can I use this method to backup EFS on stock 4.4.2?
[G2 Android Development] buracho:
Ok ive been at it for the last 18hrs:( Please please please help Autoprime!!

I have modem1/2 and recover.img on internal storage.
[G2 Android Development] thenorm89:
Yeah, just manually run the dd commands autoprime has in OP, ioroot25 does not automatically backup the efs.
[G2 Android Development] OfficialPerson:
I have no imei so no cell service I have the backup modemst.img's but I tried putting them on my internal storage in a folder called EFS_Backup and doing the dd commands but even though it won't give me errors and will say it copied them over it doesnt actually replace them when I checked the dev folder with root browser it still had the empty modemst's now I get stuck on the sprint spark screen when booting up if anyone could please help me to get this situated I would be eternally grateful
[G2 Android Development] guvno:
Is there a easier way?

Hi all,

I'm a bit of a noob on this, but I've got my 2 modemst1.img and modemst2.img files containing my EFS and I would like to restore my EFS params.

I'm using a D802 with stock 4.2.2 and I am fully rooted.

Is there perhaps a "easier" way to just extract the parameters from the 2 .img files and stick them in the EFS folder in the phone using root explorer or something similar?

Or do you have to use TWRP and "do something" to the 2 .img files to make them "flashable" and boot into recovery etc ?

Could someone please help ? A step by step guide would be great as I don't even know where to download TWRP from or how to install it...

Please help

Many thanks in advance
[G2 Android Development] buracho:
Thanks Autoprime for the help!! It was on OP all along lol:)

ALIVE and kicking again!.

---------- Post added at 04:42 PM ---------- Previous post was at 04:36 PM ----------

For those of you who are stuck:

Put modemst1 and modemst2 on sdcard and run these two commands through 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

Its the same as OP but different efs location. NO twrp needed
[G2 Android Development] guvno:
I think I'm in a similar position as you were

Hi there buracho,

I'm looking to restore my EFS as well, I have my 2 modemst .img files which I got when I rooted my G2 using iroot25.

I'm a bit of a noob using ADB, any chance you can give some pointers?

I assume I need to put the 2 .img files on the root of my storage space (of the G2) ?

Then, start a CMD on my PC (I'm using WinXP) and then start ADB, that much I've done before, and typed "ADB devices" which usually returns

the serial number of the device connected, but that is all I've done before.

Should I type "ADB shell" and then the 2 lines:

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

Does the G2 need to be in any "special mode" for the EFS restore ?

Is that it?

Many thanks in advance!
[G2 Android Development] WNTR:
When to backup efs

Maybe a very stupid question but I backed up my efs partitions when I was on 4.2.2. Now I'm on 4.4.2 but do I have to backup again or is backing up once enough? Does the efs changes with android version?
[G2 Android Development] tomc585:
Your good, just save it somewhere safe.
[G2 Android Development] buracho:
Hello guvno, Am not an expert by any means, G2 is my first project but i guess this is basic stuff as i am coming to understand. Nway....First thing to do is paste the files in internal storage of the device, not in any specific folder tho otherwise it will be like /sdcard/thatfolder/modemst1....and so on. And Yes you type in adb devices in cmd and it will return the imei and device status provided usb debugging and drivers are in order. Once your device is recognised, type in adb shell and wait for the # (super user permission) at end of the line, then fill in commands, first line then enter and so on. And you are done.

If you get $ or something else when typing adb shell just type su then hit enter.

You can do it when the device in ON. I did this while the device was boot looping on me every 15 seconds but it was enough?. Good luck!!
[G2 Android Development] guvno:
Good stuff, thanks buracho!

I'll give this a try, seems fairly straight forward...

---------- Post added at 10:38 PM ---------- Previous post was at 10:07 PM ----------

Well, all done, not sure if the EFS parameters got in or no though...

Below is a printout of what my CMD window said, anyway to verify if my EFS actually got restored?

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>cd desktop

C:\Documents and Settings\user\Desktop>cd ioroot25

C:\Documents and Settings\user\Desktop\ioroot25>adb devices

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

List of devices attached

0641db5793db538c device

C:\Documents and Settings\user\Desktop\ioroot25>adb shell

root@android:/ # dd if=/sdcard/modemst1.img of=/dev/block/platform/msm_sdcc.1/by

-name/modemst1

dev/block/platform/msm_sdcc.1/by-name/modemst1 <

6144+0 records in

6144+0 records out

3145728 bytes transferred in 0.208 secs (15123692 bytes/sec)

root@android:/ # dd if=/sdcard/modemst2.img of=/dev/block/platform/msm_sdcc.1/by

-name/modemst2

dev/block/platform/msm_sdcc.1/by-name/modemst2 <

6144+0 records in

6144+0 records out

3145728 bytes transferred in 0.253 secs (12433707 bytes/sec)

root@android:/ #
[G2 Android Development] adam1741:
I'm an idiot and flashed a Rom without backing up my efs abd I also deleted the ioroot folder on my computer because I didn't think I needed it anymore. Is there any other method of restoring my efs? Having some connection issues on the new Rom. I'm on cloudyflex 2.1 Rom running kit Kat. Or am I just screwed?

Edit. When I type in *#06# into my dialer an emei number comes up. Does that mean I never lost my original emei number and that I could still do a backup? I've used the autorec app to install a recovery and installed 1 stock Rom. I made a backup in recovery of my original stock kit Kat Rom. If I were to flash that back would my emei be safe to backup? Thank you. Sorry for newb questions. I am new to the LG g2.
[G2 Android Development] kennguy:
You mean use 2 commands to backup EFS?

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

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

But these commands for restoring EFS...
[G2 Android Development] buracho:
Yep! Am guessing you are done my friend. Double check your status and software information to be sure.
[G2 Android Development] guvno:
Thanks buracho,

I'm still wondering if this really restored my EFS or just pushed 2 .img files to some location...

Did the 2 .img files even get extracted as I assume they compressed somehow...

Perhaps Prime can confirm?

---------- Post added at 01:24 PM ---------- Previous post was at 01:19 PM ----------

Hi Prime,

I ran the 2 below commands, does this really extract the 2 .img files and restore the EFS parametars in the phone?

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

Here is the full log window of what I did:

C:\Documents and Settings\user\Desktop\ioroot25>adb shell

root@android:/ # dd if=/sdcard/modemst1.img of=/dev/block/platform/msm_sdcc.1/by

-name/modemst1

dev/block/platform/msm_sdcc.1/by-name/modemst1 <

6144+0 records in

6144+0 records out

3145728 bytes transferred in 0.208 secs (15123692 bytes/sec)

root@android:/ # dd if=/sdcard/modemst2.img of=/dev/block/platform/msm_sdcc.1/by

-name/modemst2

dev/block/platform/msm_sdcc.1/by-name/modemst2 <

6144+0 records in

6144+0 records out

3145728 bytes transferred in 0.253 secs (12433707 bytes/sec)

root@android:/ #
[G2 Android Development] BlakeSm:
deleted
[G2 Android Development] baublitz:
So, I may have done the blondest thing. I have reason to believe I deleted my EFS partitions. I did this by going to far into dialer code settings. My phone has no MEID, ESN, etc. No cell service, obviously. Do I have a brick or is there a way to fix it? I have the box with the MEID and other info.

Thanks all.
[G2 Android Development] goast:
Use kdz or tot method that's all I can recommend
[G2 Android Development] Lawlrus:
To the vest of my knowledge, once you lose your imei number, there is no way to get it back.

As poster above said, you can try to tot back to stock, but you might have to send it away to lg.

Phone has a one year warranty.

Sent from my Vs980 running Steel Droid
[G2 Android Development] baublitz:
I just sent it to them this week. They are returning it claiming "damage" and thus non-repairable. Yet to see what damage they are claiming. Can anyone else confirm that once my IMEI is gone, I am done for? Thanks lawlrus.
[G2 Android Development] Lawlrus:
Have you checked to make sure you don't have an efs backup folder? Using ioroot auto backs it up.

Sent from my Vs980 running Steel Droid
[G2 Android Development] baublitz:
Didn't know that worked on a Sprint G2. But no, I don't. I highly doubt that I have the backup. Will be getting the phone back on Friday. Thanks for the quick replies.
[G2 Android Development] goast:
Yeah since your on sprint try the tot method and report back let us know
[G2 Android Development] baublitz:
Forgive me, tot method? I would greatly appreciate a link to the appropriate forum. Thanks goast
[G2 Android Development] goast:
Ill pm u
[G2 Android Development] Lawlrus:
If you haven't wiped your internal you should have a folder names efs backup from when you used ioroot.

Just check it before you tot, because it will male you factory reset to remove your recovery, and if you did have the folder from rooting you would lose it.

Sent from my Vs980 running Digital Dream v2.1
[G2 Android Development] goast:
How would someone lose their imei number and stuff? Flashing a rom for a different variant?
[G2 Android Development] Lawlrus:
Flashing a ROM in general can do it, its not common though.

The easiest way I've seen is messing with flashing different radios on whatever base you're on.

The op links this thread in his radio flashing thread.

Sent from my Vs980 running CloudyFlex 2.2
[G2 Android Development] david black:
Did you check the stickers on the back of the phone or the box it came in? My IMEI is on the back of my M8 and I think my G2 has it on the box. I know the G2 has the MEID on the sticker on the back of the phone.
[G2 Android Development] CheyTac-12:
For some things that happened, I lost my IMEI, baseband, etc. My phone is now rebooting itself and I have no connections at all. What can I do?
[G2 Android Development] Lawlrus:
Read the first and last five pages of a thread before posting.

Sent from my Vs980 running CloudyFlex 2.2
[G2 Android Development] 6ril1:
Hello,

I have not seen this question asked before, the modem is not saved in LG_G2_Backup_All_Partitions.zip, is not?

If I want to include it, should I just add:

/sbin/busybox dd if=/dev/block/platform/msm_sdcc.1/by-name/modem of=/sdcard/backupz/modem.img;

in the backup.sh ?
[G2 Android Development] deathsquad737:
efs back up

thanks for your work bro worked slicker than deer guts on a door knob
[G2 Android Development] stewyfallingup:
Has anyone gotten this to work on The latest Philz. It created the folder but there is nothing in it.
[G2 Android Development] ECrispy:
Verizon VS980 running Mahdi rom, recovery is TWRP 2.7.1.0. I ran flashed the flashable zip but no EFS backup was created, tried this multiple times. Phone is already rooted so I don't want to root again.

Please help.
[G2 Android Development] Sword.Zero:
I also have Mahdi installed.

The files get created in a '/tmp' folder but recovery.log shows there is an error during the move.

Creating archive /tmp/efsbackupflashable.zip

Compressing META-INF/com/google/android/update-binary
Compressing META-INF/com/google/android/updater-script
Compressing efs1.img
Compressing efs2.img

Everything is Ok
mv: can't create '/sdcard/EFS_Backup/efsbackupflashable.zip': Permission denied
mv: can't create '/sdcard/EFS_Backup/efs1.img': Permission denied
mv: can't create '/sdcard/EFS_Backup/efs2.img': Permission denied
run_program: child exited with status 1

I modified the backupefs.sh file so that it doesn't use mv -f but uses cp -p which appears to correct for the issue with the Permission Denied issue.

Original Script

# move files
mv -f efsbackupflashable.zip /sdcard/EFS_Backup
mv -f efs1.img /sdcard/EFS_Backup
mv -f efs2.img /sdcard/EFS_Backup

Modified Script

# move files
cp -p efsbackupflashable.zip /sdcard/EFS_Backup
cp -p efs1.img /sdcard/EFS_Backup
cp -p efs2.img /sdcard/EFS_Backup
[G2 Android Development] OfficerJimLahey:
Odd question, as I don't have a G2. Rather an Optimus F3Q, so I don't know if the script will play nice (not to pick apart your work, I'd just like to repeat the core of it). I essentially done this a long time ago:

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

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

Is my EFS safe this way? I notice in the LG G thread that you had to run dd three times on the same partition (I guess because you would get different results). Am I good having one copy of the two partitions?
[G2 Android Development] vichunni:
Where is EFS located..??

Hi..

[MENTION=2684188]autoprime[/MENTION]

You have mentioned that the ioroot script will backup efs in computer. Could you please tell me where it will be located..??

Please help me bro..i am in a desperate situation...:(
[G2 Android Development] autoprime:
EFS gets backed up into the ioroot folder on your computer... but only under certain conditions..

you had to have used version ioroot v21 or later...

AND

you had to have rooted your device while it was on android 4.2.2. If you were not on 4.2.2 when you rooted (you were on 4.4) then ioroot wouldnt have backed up your EFS due to the root method changing for 4.4 vs how 4.2.2 root worked.

otherwise, you would've had to have manually backed up EFS yourself after rooting.. either with twrp, or thru adb dd commads.. or with my flashable efs backup zip.
[G2 Android Development] schwem:
Flashable zip worked perfect on my vs980! Thanks [MENTION=2684188]autoprime[/MENTION]! Now I feel like theres nothing I can screw up without fixing!:D
[G2 Android Development] kuduku:
zero efs zip

[MENTION=2684188]autoprime[/MENTION]

Hi can you make a zero efs zip as in your LS970 thread . I was facing issues restoring MEID on LS980
[G2 Android Development] smiler51:
Hi Guys,

my GPS is not working (no proper lock since flashing custom roms, so i want to restore my EFS files). I don't have the flashable .zip file, but i have the modemst1.img, modemst2.img and G2_security files.

I installed Android Studio and Java to get ADB Shell working under Windows 8.

I am trying to enter the mentioned commands but can't get it to work.

Is there a way to create the flashable .zip file with my files and then flash it in TWRP?

Or can i just copy/paste the files, as i am not good with the Terminal commands?

Thanks

Smiler51
[One (M7) Q&A, Help & Troubleshooting] skyjor2012:
Ok, I'm having an issue with my signal qualtiy on my htc one, I'm with rogers, and I flashed the rom, added custom kernel and flashed the Radio multiple times, but the signal strength only shows 1 bar, but when it makes a phone call it jumps up to 4 bars, then back down immediately! I've tried numerous radios, but is this the issue? The last radio seemed to make the call Quality alot better, it was very crackly before! Any help would be greatly appreciatted, thanks!

Rom: Android revolution Hd 21.0

kernel: ElementalX 5.2

Supecid

Radio: 4A.14.3250.12_10.33.1150

hboot: 1.55 and S-off

build: 3.17.401.2
[One (M7) Q&A, Help & Troubleshooting] n1234d:
Hboot 1.55? S-off?
[One (M7) Q&A, Help & Troubleshooting] skyjor2012:
Yes, hboot 1.55 and s-off
[One (M7) Q&A, Help & Troubleshooting] xxquicksh0txx:
It's probably switching to "GSM" for calls, from "WCDMA/LTE." Normal behavior I would say..
[Xperia Z1 Q&A, Help & Troubleshooting] ietsen:
So I just received my xperia z1 yesterday from clove and after spending the whole night setting it all up painstakingly, I found 2 small specks of dust under the display. Seems the QC isn't terribly good -- anyone else face any similar ssues with the first batch of phones?

I'm now waiting for clove to get back to me. Sigh.