[Q] Restoring /efs after IMEI corruption - Galaxy S I9000 Q&A, Help & Troubleshooting

Hey guys.
Today I flashed JVT via ODIN resulting in no signal and no IMEI - /efs seems kinda empty. But clever me has got a backup of my /efs files. I made it with
busybox tar zcvf /sdcard/efs-backup.tar.gz /efs
which created a tar.gz with all attributes like permissions and owner. Since I'm an absolute ubernoob with tar archives and I don't know how to make it work again I'd really really really appreciate any help with restoring it.
Thanks in advance!
-
Solved it by myself. Some mod could close this thread now.

need to read until the end

frenetico said:
Hey guys.
Today I flashed JVT via ODIN resulting in no signal and no IMEI - /efs seems kinda empty. But clever me has got a backup of my /efs files. I made it with
busybox tar zcvf /sdcard/efs-backup.tar.gz /efs
which created a tar.gz with all attributes like permissions and owner. Since I'm an absolute ubernoob with tar archives and I don't know how to make it work again I'd really really really appreciate any help with restoring it.
Thanks in advance!
-
Solved it by myself. Some mod could close this thread now.
Click to expand...
Click to collapse
hey my friend. how did you solve that issue. i have an exactly same issue with my gs2 and i have efs backup. but unfortunately i dont know how to restore it. can you please help.

Related

[Q] JM6 IMEI Change

Hi, i've just dialled *#06# to get my IMEI and my imei number has changed from 352*********** to 00004**********.
Does anyone currently know of a way to change the imei number back? Thanks in advance.
Your Friend
Phil
I noticed on JM6 and JMA that it made my IMEI number incorrect as well, so when I entered it, it didn't recognise it to change the CSC.
Not sure if there is a way, hopefully so!
I'm sticking with JJ7 now on my replacement tab until we get a proper recovery mode in place.
I had this on my galaxy S. Solved it by backing up the efs directory to be safe. you need root. then delete everything in the efs dir except nv_data.bak then rename it to nv_data.bin and reboot. It should rebuild the efs dir correctly and put the imei back.
But this only works if the nv_data.bak file has not been modified in anyway otherwise it will rebuild with the 0044 imei.
Lordao
Is a corrupted IMEI, can create you problems
I had it too before, but because I deleted also all the .bak files in the EFS folder...
You can recovery in 2 ways:
1st:
I suggest you to delete the nv_data.bin and the nv_data.md5 in EFS folder using rootexplorer then rename the .nv_data.bak to nv_data.bin and the .nv_data.md5.bak in nv_data.bin.md5 (same suggested by lordao); You can also delete the md5 files because it will rebuild it by itselfs.
2nd:
In the bad case the 1st solution will not work, means that your backup files are corrupted and your IMEI is not recoverable.....BUT if you are lucky like I was I recognize that I had a copy in my sdk folder (the one you used when you rooted the Tab!!!) I think the one click root did a backup copy of the nv_data.bin by itself. Grab that file and copy it in the EFS folder (deleting all the other nv_data.bin and nv_data.md5 and relatives .bak that you have in the folder) restart the tab. It will self rebuild the md5. You can make the new .bak files copying the nv_data.bin and rename the copy ad .nv_data.bak
Hope it will help you
Thanks zerocool76 worked perfect!! I now have my imei back. Your a star. Think I will keep a backup of that file. Just in case of future flashing.
diigibio said:
Thanks zerocool76 worked perfect!! I now have my imei back. Your a star. Think I will keep a backup of that file. Just in case of future flashing.
Click to expand...
Click to collapse
Just to know. Where you found the file? In the sdk? Because it would means that your .bak was corrupted too and I'm wondering why..???!!! Anyway glad it was working.I suggest you to backup all the EFS folder
zerocool76 said:
Just to know. Where you found the file? In the sdk? Because it would means that your .bak was corrupted too and I'm wondering why..???!!! Anyway glad it was working.I suggest you to backup all the EFS folder
Click to expand...
Click to collapse
I noticed and fixed this a few days ago.
When I look at my EFS folder backup, done right after rooting the Tab, I can see that nv_data.bak; size 1732608, is a different size, with an earlier creation date than the original nv_data.bin; size 2097152. According to nv.log, my nv_data.bin was corrupted during the time-frame where I was flashing different modems to the Tab while testing the screen timeout bug on JMA, it reports that when nv_data.bak was restored as nv_data.bin the file size was invalid, then says that it restored nv_data.bin, created from scratch I guess, which resulted in the improper IEMI and a serial# of all 0's.
Bell Tab
Roto-JMA firmware
Bell I9000UGJK4 radio
rgbc said:
I noticed and fixed this a few days ago.
When I look at my EFS folder backup, done right after rooting the Tab, I can see that nv_data.bak; size 1732608, is a different size, with an earlier creation date than the original nv_data.bin; size 2097152. According to nv.log, my nv_data.bin was corrupted during the time-frame where I was flashing different modems to the Tab while testing the screen timeout bug on JMA, it reports that when nv_data.bak was restored as nv_data.bin the file size was invalid, then says that it restored nv_data.bin, created from scratch I guess, which resulted in the improper IEMI and a serial# of all 0's.
Bell Tab
Roto-JMA firmware
Bell I9000UGJK4 radio
Click to expand...
Click to collapse
I destroyed my original nv_data.bin editing with a txt editor instead hex editor, plus I deleted baks files for mistake with root manager (no booze when playing with this **** anymore ), I didn't know that the IMEI is encrypted in that file. When I found a copy in my sdk (that I didn't make!?) I restore everything, and after that time I flashed a lots of Firmwares and Modems, but my imei is still ok.I know that a Galaxy S firmware made this issue because it was changing the nv_data and it didn't match anymore with the phone, so corrupted IMEI.I'm wondering if there is a firmware that is doing the same with the Tab
Mine has done the same but with JK5. First noticed when I did the Samsung UK offer thing. Completely different IMEI to whats on the back of my Tab.
Sent from my GT-P1000 using XDA App
Sorry to dig up and old thread, but is this still an issue, can say flashing back and forward from Overcome for example corrupt IMEI etc?
Interesting - are other Samsung devices able to have their IMEI changed?
What this means is that to a technically capable enough thief (or one who knows someone technical enough that will work on credit), Samsung devices are much more valuable: Normally if your mobile got stolen and you had the IMEI, you would report it to your network and they would have it blocked on all networks. Furthermore the police would use the IMEI to prove that the device is yours if it were recovered. If the IMEI can be changed, the device can't be identified and can't be blocked from networks. It only needs slight tweaking to make it appear valid. Don't know about the implications for post-registration call routing, but the thief wouldn't care about that.
In the US, gsm carriers won't block the number - they seem to view stolen phones as a potential new subscriber.
hello,
i have the same trouble ( imei change)on galaxy tab , but the phone work normally (for now ...).
Can i let it so , or could have trouble in future?
because i don't save nv data folder, and i'm not very good to restore rom.The mod was made from my friend.
excuse for my english ,bye
zerocool76 said:
Is a corrupted IMEI, can create you problems
I had it too before, but because I deleted also all the .bak files in the EFS folder...
You can recovery in 2 ways:
1st:
I suggest you to delete the nv_data.bin and the nv_data.md5 in EFS folder using rootexplorer then rename the .nv_data.bak to nv_data.bin and the .nv_data.md5.bak in nv_data.bin.md5 (same suggested by lordao); You can also delete the md5 files because it will rebuild it by itselfs.
2nd:
In the bad case the 1st solution will not work, means that your backup files are corrupted and your IMEI is not recoverable.....BUT if you are lucky like I was I recognize that I had a copy in my sdk folder (the one you used when you rooted the Tab!!!) I think the one click root did a backup copy of the nv_data.bin by itself. Grab that file and copy it in the EFS folder (deleting all the other nv_data.bin and nv_data.md5 and relatives .bak that you have in the folder) restart the tab. It will self rebuild the md5. You can make the new .bak files copying the nv_data.bin and rename the copy ad .nv_data.bak
Hope it will help you
Click to expand...
Click to collapse
i can recovery ANY imei number on ANY android device im currently making a program to do this automaticly
paul.robo said:
i can recovery ANY imei number on ANY android device im currently making a program to do this automaticly
Click to expand...
Click to collapse
Hows that program coming along? I might be in need of it on account of
losing my IMEI on my Galaxy tab.
ktmman said:
Hows that program coming along? I might be in need of it on account of
losing my IMEI on my Galaxy tab.
Click to expand...
Click to collapse
So i got my IMEI no.back but i still don't have a data connection. The strange thing is if i swap sim cards
with my phone it works so im not sure whats wrong with it.

SGS 4G - no nvdata.bin?

I googled and searched but I couldn't quite find an answer. It would seem that my phone (SGS 4G, running Froyo) does NOT have an /efs/nv_data.bin file. I saw a few other users in the same predicament but I found no answers... can anyone shed some light?
Thanks!
Have you flashed a custom rom .
EFS can be restored from your efs backup ..
How do you know you have no efs folder
.
jje
the /efs folder is there. However, it contains nv.log and a few folders, but no nv_data.bin . The phone is as I got it from TMobile, minus the Superoneclick 1.6.5 root exploit. ROM should be the one that the factory put in there.
Well, apparently per the now-updated unlocking thread, the file is in a different location in the 4G. Found, fixed.

[DEV] EFS Autobackup script for ROM Developers & Users

I have created a autobackup script for the EFS partition that contains information for your IMEI number.
I am addressing all ROM Developers to include this script in their ROM's!
What does this script do? It creates efs_autobackup folder on your SDCard and then tars the whole EFS partition into efs-backup.tar.gz file. Once this file is created, you can safely copy it to your PC. The script also looks for that file on reboot and if the file exists, it won't create another one.
What are the benefits of the tar file?
It keeps the permissions information for your EFS partition, so that when you want to restore your EFS partition, you only need to extract that file with the RootExplorer to your EFS partition and overwrite the old files. It sets the permissions automatically for you, so you don't need to mess or handle that yourself.
Please Developers, include this in your ROM so that users that forget to backup their EFS partition, don't have to regret that.
INSTRUCTIONS:​
For Users:
If you are on ROM that don't have this script integrated - you can flash the attached zip file in your Recovery to integrate the script.
For Developers:
Either take the file from the attached zip or create 01efstar file (very important to name it with 01 prefix, since it runs as first when the Phone starts, otherwise it won't work) in the /system/etc/init.d folder with this content:
Code:
#!/system/bin/sh
# EFS Autobackup script for Samsung Nexus S
# By Brainmaster
mount /dev/block/platform/s3c-sdhci.0/by-name/media /sdcard
if [ ! -f /sdcard/efs_autobackup/efs-backup.tar.gz ];
then
mkdir /mnt/sdcard/efs_autobackup
busybox tar zcvf /sdcard/efs_autobackup/efs-backup.tar.gz /efs
fi
umount /sdcard
Reserved 1.
What a good idea.
Should I implement this on the radio zip file too?
window7 said:
Should I implement this on the radio zip file too?
Click to expand...
Click to collapse
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Well done,good job !
Sent from my Nexus S using XDA App
brainmaster said:
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Click to expand...
Click to collapse
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
i hope ur miui rom has this or else should i flash it?
Borky_16 said:
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Not so easy to mount the efs partition through the updater-script.
ancilary said:
i hope ur miui rom has this or else should i flash it?
Click to expand...
Click to collapse
From the next release on. If you want you can flash the script now.
yeah i dunno, first i made my own script and put into etc/init.d (running netarchy 1.3.9 which obv supports init.d scripts) - no dice. so i removed that file and flashed the zip and still getting no backup on sd.
ideas?
brainmaster said:
Not so easy to mount the efs partition through the updater-script.
Click to expand...
Click to collapse
oh that is right! :O forgot about it
Script successfully injected into my current installation of CM nightly, and successfully executed on reboot.
Uploaded the resulting file to Dropbox -- where I know I'll never lose it!
Two thumbs up!
I will include this script in my next rom update. I believe every dev should do the same.
Sent from my Google Nexus S using XDA Premium App
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Just got my phone back from Regenersis with the IMEI restored! Shows that it can be done!
Ezekeel said:
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Click to expand...
Click to collapse
Actually it should be as follows seeing as we get a read-only error;
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
atrixboy said:
Actually it should be as follows seeing as we get a read-only error;
dd if=/Dec/block/mtdblock6 of=/months/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that, because tar is easier to extract and keeps the permissions), THEN you need right command.
You misspelled allot.
Code:
dd if=/dev/block/mtdblock6 of=/sdcard/efs.img
Yea I realised that after I hit post. I agree rfs is much nicer and cleaner to deal with.
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Or efs.rfs. however you prefer. Rfs being the more logical
Sent from my Nexus S using XDA Premium App
brainmaster said:
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that ...)
Click to expand...
Click to collapse
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Dees_Troy said:
Using dd on mtd devices is a bad idea when it comes time to restore. It's a quick path to a brick. It tends to inadvertently mark blocks as bad.
Click to expand...
Click to collapse
Maximilian Mary said:
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Click to expand...
Click to collapse
Darn. I did not know that.
Turns out one should use nanddump and nandwrite from mtd-utils (http://git.infradead.org/mtd-utils.git). Maybe someone can compile a version for Android. That would be quite useful.

can't restore efs backup :/

well after flashing jetpack 5.2 my imei deletedi have efs backup
but but
i cant restore it
when i type
cp /sdcard/nv_data.bin /efs/nv_data.bin
i get error that says :
cp:write error: No space left on device
yes i tried flash 3 file stock jvs , jvq and jvu roms but nothing
i restored nand backup = nothing
i would like some help since im getting screwed cuz phone is not mine :|
thanks
some1 said u need tp flash imcorrupted efs.rfs filewhat is that? where can i get it?
A little search found me this.... Good luck
azzledazzle said:
if you have a .tar version of your EFS. Unzip it. Copy all the contents of it, And paste them to the /EFS on the phone. Making sure they overwrite the current contents.
Once that has done, Restart the phone without backing out of root explorer (or what ever app you are using to copy/paste these files).
If that fails, Repeat the above step but ONLY copy / paste the NV_data.bin & NV_data.bin.md5
And finally if that fails. Backup all your stuff using Titanium Backup (or similar) And re flash a stock Froyo ROM. Maybe older, its upto you.
That will Definitely restore the IMEI, Then re-root and go back to whatever ROM you wish.
Good luck.
Click to expand...
Click to collapse
well i cant paste with ex explorer or root explorer says its fulland when i delete the files in efs the system immdietly make new nv_data,bin so again its full
//
i flashed stock froyo JPU and didnt work :|
i read some topics and i think phone bml3 (stl3) messed up
have you tried nitrality.... download it and make a back up of efs, and then replace the nitrality back up with your back up (sdcard/insanity/backup/efs). Then restore with nitrality.
it restores but not workin weird

Empy Modemfs Folder

Hi, im running JB VSLP9 (Movistar Argentina firmware) and recently i decided i should backup efs and modemfs just in case. I followed the steps in this guide http://forum.xda-developers.com/showthread.php?t=2342100
I don't know if this is related but recently i've been having some problems with 3G connectivity. Sometimes the phone shows good signal but no data connection. You have to restart the phone to correct this. Also, some people have told me that calling me directs them straight to voice mail.
I was looking at my modemfs folder and then discovered that it is empty! 0 files, 0 bytes. So i tried to restore the backup that I made (16mb). But nothing changed, the folder is still empty ....
Is this normal ??? Can my problems be related to the "backup" of efs and modemfs ????
Thanks
Can anyone at least check your modemfs folder and tell me its contents ?
Piachnp said:
Can anyone at least check your modemfs folder and tell me its contents ?
Click to expand...
Click to collapse
Here you go.
But I do not know how to fix yours...
Thanks Shutdown, i tried wiping everything and flash the firmware again, but the modemfs folder is still empty... That crappy backup guide ****ed up everything
Does anyone know if i can ask for someone using the same firmware for the contents of this folder and copy them to my phone ????
Piachnp said:
Thanks Shutdown, i tried wiping everything and flash the firmware again, but the modemfs folder is still empty... That crappy backup guide ****ed up everything
Does anyone know if i can ask for someone using the same firmware for the contents of this folder and copy them to my phone ????
Click to expand...
Click to collapse
Maybe you need to mount modemfs partition before restoring? Look how to do that (trough terminal emulator, or ADB shell).

Categories

Resources