First things first, I did NOT write this; however I am reposting this here because I think it's extremely important everyone do this. Find OP here, guide was originally written by Candanga. Please hit thanks on his post and show him love for the write up.
-----------------------------------------------------------------------------------
I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone (my case).
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centers.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
Please don’t ask how to recover your IMEI if you have previously messed your SGS without backing up this folder. I’m not familiar with such methods plus it is UNRELATED to this thread.
What you will need:
Rooted SGS to get permissions as a SU (Super User) and perform the backup
I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile.<- Busybox Commands(or Google them)
Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
--------------------------------------
Backup commands
--------------------------------------
Depending on the type of root, you might have to use “busybox” at the beginning of the sting or just the string:
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS during this process, because it will request SU permissions; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS. Once you are finished with the files, you need to turn it off so you can get the files.
Code:
su
tar zcvf /sdcard/efs-backup.tar.gz /efs or
busybox tar zcvf /sdcard/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
In another forum I also saw a recommendation to back up the st13 under /dev/block which can support greatly to recoveryour IMEI in case of a screw-up:
Code:
su
cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img or
busybox cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img
Same thing, the target is the INTERNAL SDCARD, so go ahead and copy the file.
----------------------------
nv_data.bin - Restore
----------------------------
In case you screwed your IMEI by playing with the nv_data.bin and you are experiencing issues like:
Fake IMEI (usually 004999010640000)
Unable to download apps from the market
Unable to unlock your SIM card using your PIN
Weird apps are downloading automatically from the market
Blinking SIM card icon on the top tray… ETC
You may want to upload your fresh copy of this file back to the phone. Use this commands:
(thanks to Methyldioxide method to recover the product code http://forum.xda-developers.com/showthread.php?t=780509 )
Copy the file from your backup (efs-backup.tar.gz) and paste it in the INTERNAL SDCARD:
Code:
cp /sdcard/nv_data.bin /efs/nv_data.bin
rm -rf /efs/nv_data.bin.md5
Reboot your SGS
The md5 hash/signature is removed (rm) as the system will generate a new one.
**Most likely your SIM code won’t work after this and you won’t be able to log into the phone**
Pop off your SIM card, boot your SGS and execute the following commands to change ownership of the file under ADB or Terminal as well:
Code:
su
busybox chown 1001:1001 /efs/nv_data.bin or
chown 1001:1001 /efs/nv_data.bin
Hope this can help anyone with doubts. Cheers!
I use SGS Toolbox to back up my efs; is that sufficient?
It's on the market for less than $2, and has a ton of other features so well worth the money regardless.
Sent from my rough sketch of a Vibrant on a brick.
Droidificator said:
I use SGS Toolbox to back up my efs; is that sufficient?
It's on the market for less than $2, and has a ton of other features so well worth the money regardless.
Sent from my rough sketch of a Vibrant on a brick.
Click to expand...
Click to collapse
yeah that should do it, but it never hurts to do it again
I read this from the original op, back then when I was trying to change the IMEI. But good you posted this, easier to find.
I am really hoping someone can help me sort this problem. I recently bought a LG P970, and after long await from customs, i received it! On day 1 before even purchasing a simcard i rooted and changed roms. I went through all sorts of roms from nightly cm7 to cm10, nove, aokp etc.. I finally decided i like AOKP Rom and day 2 bought my sim card. SUPRIZE!! no network! IMEI unknown. Unfortunately i was to ignorant to do a backup and i have been searching for +- 40hours now to try resolve this issue.
I have tried the tutty/Hyperterminal.. Does not work! If i dial 3845#*970# and access the hidden menu. as soon as i select CP USB, the pc just makes the insert/ takeout sound constantly and does not install driver, but on AP USB, the sd card can be accessed, my device shows on system and everything is 100%. I have tried this on 2 windows 7 computers. So that option is out.
Does anyone know another way to restore the IMEI? I dont have any fancy box tools, just my pc.
jugz54 said:
I am really hoping someone can help me sort this problem. I recently bought a LG P970, and after long await from customs, i received it! On day 1 before even purchasing a simcard i rooted and changed roms. I went through all sorts of roms from nightly cm7 to cm10, nove, aokp etc.. I finally decided i like AOKP Rom and day 2 bought my sim card. SUPRIZE!! no network! IMEI unknown. Unfortunately i was to ignorant to do a backup and i have been searching for +- 40hours now to try resolve this issue.
I have tried the tutty/Hyperterminal.. Does not work! If i dial 3845#*970# and access the hidden menu. as soon as i select CP USB, the pc just makes the insert/ takeout sound constantly and does not install driver, but on AP USB, the sd card can be accessed, my device shows on system and everything is 100%. I have tried this on 2 windows 7 computers. So that option is out.
Does anyone know another way to restore the IMEI? I dont have any fancy box tools, just my pc.
Click to expand...
Click to collapse
The AOKP hasn't been updated in a while and has more bugs than CM10 and V30 repacks.
When did this start? You can only wipe IMEI if you select "Wipe Entire AP" or something like that on SFT. Does the problem persist on other ROMs? Also no network connection isn't related to IMEI, more likely ROM related.
If your really desperate you can extract your nv partition and hex edit your IMEI in and push back to device. All you need is microusb to usb cable and computer (and a hex editor, but thats free to download ), but I will only do this as a last resort.
xonar_ said:
The AOKP hasn't been updated in a while and has more bugs than CM10 and V30 repacks.
When did this start? You can only wipe IMEI if you select "Wipe Entire AP" or something like that on SFT. Does the problem persist on other ROMs? Also no network connection isn't related to IMEI, more likely ROM related.
If your really desperate you can extract your nv partition and hex edit your IMEI in and push back to device. All you need is microusb to usb cable and computer (and a hex editor, but thats free to download ), but I will only do this as a last resort.
Click to expand...
Click to collapse
Thanks for you reply,
When i bought the phone, before i put in a simcard, i ended up flashing and changing roms, so the next day i bought a sim and there was no network, did research and found out that my IMEI is missing. if i type *#06# then is just says IMEI and no number. I have flashed back to original rom but still no luck. I have tried many things on youtube but nothing works, i tried the tutty to try restore an IMEI but doesn't work,
What do you suggest i do? and is there a step by step guide to resolving this?
jugz54 said:
Thanks for you reply,
When i bought the phone, before i put in a simcard, i ended up flashing and changing roms, so the next day i bought a sim and there was no network, did research and found out that my IMEI is missing. if i type *#06# then is just says IMEI and no number. I have flashed back to original rom but still no luck. I have tried many things on youtube but nothing works, i tried the tutty to try restore an IMEI but doesn't work,
What do you suggest i do? and is there a step by step guide to resolving this?
Click to expand...
Click to collapse
This will only work with the P970
Use adb shell from your computer or use a app like terminal emulator.
Code:
echo $IMEI | dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=8 conv=notrunc
echo $IMEI | dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=4096 conv=notrunc
where $IMEI is you IMEI
The large bold print is for people that can't read headings that might run this and brick their devices.
Something I learned that isn't mentioned on the forum is that its important to backup your nv partition since that contains info that can't be retrieved after damaging it and nothing backs it up for you. Like MAC addresses, your IMEI etc.
On you computor
Backup using
Code:
adb pull /dev/block/mmcblk0p11 nv.img
Restore using
Code:
adb push nv.img /dev/block/mmcblk0p11
EDIT: Added notrunc to not truncate the rest of the partition
xonar_ said:
Use adb shell from your computer or use a app like terminal emulator.
Code:
echo $IMEI | dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=8 conv=notrunc
echo $IMEI | dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=4096 conv=notrunc
where $IMEI is you IMEI
Click to expand...
Click to collapse
Hey, Thanks for getting back to me. I tried the command on Terminal Emulator and it says IMEI not found and conv disabled. Any suggestion?
Did you try the official LG Mobile Update Tool?
There is emergancy and recovery mod where you can fix it.
sbdemir said:
Did you try the official LG Mobile Update Tool?
There is emergancy and recovery mod where you can fix it.
Click to expand...
Click to collapse
I tried the LGMobile Support Tool various times. The recovery module does not work, if i type IMEI adn select check phone, nothing happens. The strange thing is the support tool picks up my phone model as LGKU5900 version V10I. That could have happened with me trying to repair the phone with various programs and youtube videos.
I have tried uninstalling and reinstalling the support tool as well as the drivers but still no luck.... I reflashed the original rom V10F with no patch etc.. but still the Support tool picks up the model as LGKU5900, and when i select update phone, it downloads the update and during installing of update it stays on 6% for roughly 20 minutes then just stops. I have tried this numerous times and same things happens everytime.
If this is of interest to you to, you can take control of my system and check it out via team viewer.
jugz54 said:
Hey, Thanks for getting back to me. I tried the command on Terminal Emulator and it says IMEI not found and conv disabled. Any suggestion?
Click to expand...
Click to collapse
rather try this. included dd might not be up to standard
Code:
echo $IMEI | busybox dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=8 conv=notrunc
echo $IMEI | busybox dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=4096 conv=notrunc
and replace $IMEI with your IMEI.
EDIT: The above should repair your IMEI, but if SFT fails to update your phone then it's wrong firmware or HW problem and it will cause problems elsewhere aswel.
xonar_ said:
rather try this. included dd might not be up to standard
Code:
echo $IMEI | busybox dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=8 conv=notrunc
echo $IMEI | busybox dd of='/dev/block/mmcblk0p11' obs=1 ibs=1 count=15 seek=4096 conv=notrunc
and replace $IMEI with your IMEI.
EDIT: The above should repair your IMEI, but if SFT fails to update your phone then it's wrong firmware or HW problem and it will cause problems elsewhere aswel.
Click to expand...
Click to collapse
Still no luck, it says dd applet not found with the busybox command, and the abouve code i tried {$IMEI | dd of} just disabled my conv, thats all. Do you think the phone has no chance of being network active again?
jugz54 said:
Still no luck, it says dd applet not found with the busybox command, and the abouve code i tried {$IMEI | dd of} just disabled my conv, thats all. Do you think the phone has no chance of being network active again?
Click to expand...
Click to collapse
dd should be included in busybox. What busybox are you using?
The conv=notrunc just tells it not to truncate the rest of the file (in this case don't truncate the rest of the nv partition)
the echo pipes the IMEI to dd which writes it to /dev/block/mmcblk0p11 (your nv partition) on two different spots. I
You need su permissions to write to /dev/block/mmcblk0p11. I forgot to mention that. Otherwise dd will fail and the included binutils dd doesn't always list error messages. Just terminates silently without doing anything most of the time.
You can also try reflashing just the baseband. (The fls file with SFT)
If all that doesn't work then you need to take it into repairs.
jugz54 said:
Still no luck, it says dd applet not found with the busybox command, and the abouve code i tried {$IMEI | dd of} just disabled my conv, thats all. Do you think the phone has no chance of being network active again?
Click to expand...
Click to collapse
I don't have a solution to your problem however I am in a similar situation. I purchased my Optimus Black from an ebay seller located in Hong Kong, it was advertised as an Optimus Black P970. The software version was similar to yours, outdated, so I grabbed a stable gingerbread version patched it with root etc. and flashed.
Upon reboot I had no cellular network, tried two different sims/networks. No Joy. Further troubleshooting uncovered the loss of the imei. I came across this thread and decided to give it a try, it didn't work. I suspect I messed up the command, in my case this was lucky because I was able to see the content of the mmcblk0p11 file using a hex editor. The imei is in there, and it is also in the same location as my Optimus Black P970, I assume it is stored elsewhere as well....
Long and short of this is you and I have purchased the KU5900, the Korean version not the P970, flashing with P970 firmware is what has messed the phones up.
Note. I did try flashing with the only Korean version that was available to me, a V30 something, that bricked the device. It is now unbricked but still shows no imei. I haven't given up but wading through reams of forum posts trying to get info on this is daunting ... My seller has agreed to replace the phone, but I fear I will end up with another KU5900 which isn't any good to me unless I can upgrade the firmware.
had the same problem recently..got it fixed because of this...
http://forum.xda-developers.com/showthread.php?t=2107419
IAP001 said:
had the same problem recently..got it fixed because of this...
http://forum.xda-developers.com/showthread.php?t=2107419
Click to expand...
Click to collapse
I just fixed one P970 with unknown IMEI by flashing it with Octopus box, I think that you can solve it by flashing with original flash file using SFT.
Best Regards.
Hi....few days back, I had the same problem....After flashing my phone to V30B(CIS version) which was not available for my phone in my country India, the IMEI then got removed automatically(*#06#- shows IMEI not available), then I installed the latest version V20G which was available for my country then (through smartflash tool) and then got back the IMEI. Try installing the latest version available for your country and do let us know if that solve your problem. Best of luck
Sent from my LG-P970 using xda app-developers app
sunnygunjesh said:
Hi....few days back, I had the same problem....After flashing my phone to V30B(CIS version) which was not available for my phone in my country India, the IMEI then got removed automatically(*#06#- shows IMEI not available), then I installed the latest version V20G which was available for my country then (through smartflash tool) and then got back the IMEI. Try installing the latest version available for your country and do let us know if that solve your problem. Best of luck
Sent from my LG-P970 using xda app-developers app
Click to expand...
Click to collapse
i had similar problem when installing cm10 rom and cici rom, after flashing those roms my device had no IMEI and no network, it didnt even rcognize my contacs in sim card. the strange part is that i was able to make calls, but when i flashed back to the rom i had, everything was back and looking good.
i had marvel v9 rom thats runs pretty good.
After bricking my device like 10 times, I realized efs backup is very neccessary. so i thought i should post it, so more people can back it up.. efs have major details like meid, imei, serial number, config, diag settings and radio settings, etc etc.. its something like registry in windows.
you can backup efs via adb, root is required..
Code:
adb shell
su
dd if=/dev/block/platform/f9824900.sdhci/by-name/modemst1 of=/sdcard/modemst1.bin
dd if=/dev/block/platform/f9824900.sdhci/by-name/modemst2 of=/sdcard/modemst2.bin
or you can also backup via this code :-
Code:
adb shell
su
dd if=/dev/block/mmcblk0p24 of=/sdcard/modemst1.bin
dd if=/dev/block/mmcblk0p25 of=/sdcard/modemst2.bin
done..
Restoring efs if you messed it up..
Code:
dd if=/sdcard/modemst1.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst1
dd if=/sdcard/modemst2.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst2
or
Code:
dd if=/sdcard/modemst1.bin of=/dev/block/mmcblk0p24
dd if=/sdcard/modemst2.bin of=/dev/block/mmcblk0p25
RESTORE EFS AT YOUR OWN RISK, I WONT BE RESPONSIBLE IF YOU BRICK YOUR DEVICE. Though major will only flash it in brick mode
Good guide mate. I learned on my g2 that efs backup are important. Killed 3 diffrent g2s with crazy ad type expeirents
I tell errbody dont matter wut phone u have backup the efs.
Back it up. Cant say it enough. Even if u dont learn how to restore it now. Back it up
TheMadScientist420 said:
Good guide mate. I learned on my g2 that efs backup are important. Killed 3 diffrent g2s with crazy ad type expeirents
I tell errbody dont matter wut phone u have backup the efs.
Back it up. Cant say it enough. Even if u dont learn how to restore it now. Back it up
Click to expand...
Click to collapse
I actually bricked my phone like 10 to 15 times in 5 days, just to enable extra bands on my phone. i even extracted qcn files from h815, h8111. i was close untill i bricked it again, while playing with sprint policyman which have policies to connect to which band and stuff.. i followed a way from some chinese site and damn.. no qpst, no dfs, no tool were able to read, no imei, no meid, everything on my phone was unknown.. i flashed zv6 tot again, still i wasnt able to restore..
but eventually after going to marshmallow fixed, zv9 flashed new policyman.. THATS WHAT made me backup EFS>> cause in download mode you cant even restore nv via DFS. or qpst. no tool gets connected to the device except restoring via DD
till yet one guy was able to add extra band on sprint nexus (its just not adding band via dfs), it something more.. . and i learned his patching way, basically he extracted parameters from variant and added it on sprint nexus.
soon i will make a thread of my finding about it..
Missing a 'd' in your restore snippet
Code:
d if=/sdcard/modemst1.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst1
dd if=/sdcard/modemst2.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst2
natator99 said:
Missing a 'd' in your restore snippet
Code:
d if=/sdcard/modemst1.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst1
dd if=/sdcard/modemst2.bin of=/dev/block/platform/f9824900.sdhci/by-name/modemst2
Click to expand...
Click to collapse
corrected. Thanks..
Can anyone provide me the qcn file for le2 indian version.
I cooked my imei number.
Any links, any help would be appreciated.
Thanks
https://forum.xda-developers.com/le-2/development/tools-unbrick-thread-leeco-le-2-x52x-t3634609
Mr YesNoWhat said:
https://forum.xda-developers.com/le-2/development/tools-unbrick-thread-leeco-le-2-x52x-t3634609
Click to expand...
Click to collapse
my phone is not bricked plus i needed the qcn file for imei restoration.
scroll down and find Qualcomm IMEI Fixing Tool
Mr YesNoWhat said:
scroll down and find Qualcomm IMEI Fixing Tool
Click to expand...
Click to collapse
I have tried recovering the imei number by IMEI & SN WRITE but no success most probably its the port fault
The qualcom HS-USB Android DIAG 901D not showing and i have some other ports lined up, namely
Qualcomm HS-USB Diagnostics 9025
Qualcomm HS-USB NMEA 9025
got root and unlocked bootloader?
Mr YesNoWhat said:
got root and unlocked bootloader?
Click to expand...
Click to collapse
it it rooted, the bootloader is unlocked and i even have xposed module working.
I'm having the same issue
https://www.4shared.com/get/UBQdonhrca/x526_qcn_read_by_qpst.html
here you go, qcn for x526
i cant use it since mine is x522 but please pm me if you suceed
sparsh_iris said:
Can anyone provide me the qcn file for le2 indian version.
I cooked my imei number.
Any links, any help would be appreciated.
Thanks
Click to expand...
Click to collapse
I restored my imei through the following steps
1. root your rom
2. enable usb debugging
3. install minimal adb on your computer, goto the folder you installed it in, hold shift then right click, select open command prompt here
4. in command window, enter the following ( each line followed by pressing enter)
5. adb shell
6. su
7. grant su request on phone screen
7b. command prompt should look similar to "[email protected]_s2_na:/ #" without the quotes depending on the version of your phone.
8. on command prompt type
9. ls -al /dev/block/platform/soc.0/7824900.sdhci/by-name/
10. this lists out all your phones partitions ( not really necessary if you are using an le 2 but it's a good practice to confirm for the following steps)
11. confirm the following entries appear in the list
11a. fsg -> /dev/block/mmcblk0p18
11b. modemst1 -> /dev/block/mmcblk0p13
11c. modemst2 -> /dev/block/mmcblk0p14
11d. these three entries are where the phone stores the imei, wifi mac address, and Bluetooth address.
12a. if they don't then... if you are technical enough you cant edit this guide to suit your needs else STOP!!!
12b. if they do then you are all good. continue
13. on the command prompt enter
13a. dd if=/dev/block/mmcblk0p18 of=/sdcard/fsg.bin
13b. dd if=/dev/block/mmcblk0p13 of=/sdcard/modemst1.bin
13c. dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst2.bin
14. this will backup the partitions and create 3 files on your sdcard 'fsg.bin' 'modemst1.bin' and 'modemst2.bin'
15. copy these to a safe place on your computer
16. this part restores your backup, on the command prompt enter
16a. dd if=/sdcard/fsg.bin of=/dev/block/mmcblk0p18
16b. dd if=/sdcard/modemst1.bin of=/dev/block/mmcblk0p13
16c. dd if=/sdcard/modemst2.bin of=/dev/block/mmcblk0p14
16d. reboot
17. after your phone reboots repeat steps 5 & 6
18. cross fingers
19. the next step will zero out (erase) the partitions so your phone can hopefully recreate them with the correct data
19. in the command prompt enter the following in this exact order
19a. dd if=/dev/zero of=/dev/block/mmcblk0p18
19b. dd if=/dev/zero of=/dev/block/mmcblk0p14
19c. dd if=/dev/zero of=/dev/block/mmcblk0p13
20. without rebooting your phone try to check the imei by dialing *#06#
21. if your imei is restored i would recommend making a qcn backup using qpst software on your computer ( the code to enable diag port on le 2 is *#*#76937#*#*) google for steps
22. if your imei is not restored then you have a different problem than i did. but do note that after following step 19-19c then and only then can you restore a qcn backup or edit your imei. and yes it works on Qualcomm HS-USB Diagnostics 9025 port. so hopefully you can progress from there.
Hi Guys,
I was flashing a custom rom on my Le2 X526 Snapdragon version, somehow I've managed to Delete the IMEI details. The Mobile Network section is grayed out, Although the Wifi and BT are working fine.
No, I didn't perform a backup before flashing.
The bootloader is unlocked, the phone is rooted. It turns on and everything just no network.
I've tried flashing IMEI number using Qualcomm Flashing tools and QFIL, they seem to get stuck at Connecting and ultimately fail. Although I can see my device connected in DIAG Mode in Device Manager (Qualcomm HS-USB Android DIAG 901D - COM !=1X)
I've also tried the method which included the following adb shell commands:
dd if=/dev/zero of=/dev/block/mmcblk0p13
dd if=/dev/zero of=/dev/block/mmcblk0p14
dd if=/dev/zero of=/dev/block/mmcblk0p16
These give me a weird Write Error saying "write error: No space left on device"
Even though there is plenty of space.
Can anyone suggest some things which can be done to investigate this further, can it be some other issue pertaining to partions or something like that.
Any leads and suggestions would be appreciated,
Thanks