[Q] data.tar.gz and efs.rfs in Heimdall - Galaxy Tab General

I have been running roto backups for a while now, but have never had the need to restore from one. While looking through the different files that were backed up after I ran the command code, I noticed a file called data.tar.gz. Where is the correct place for selecting this file in Heimdall when doing a restore? For example, do I put it in the recovery slot under other, or does it not matter where I put this file performing a restore?
Also, I found a file called efs.rfs that was backed up and I have the same question for that file.
Thanks in advance for any advice,
caveman999

caveman999 said:
I have been running roto backups for a while now, but have never had the need to restore from one. While looking through the different files that were backed up after I ran the command code, I noticed a file called data.tar.gz. Where is the correct place for selecting this file in Heimdall when doing a restore? For example, do I put it in the recovery slot under other, or does it not matter where I put this file performing a restore?
Also, I found a file called efs.rfs that was backed up and I have the same question for that file.
Thanks in advance for any advice,
caveman999
Click to expand...
Click to collapse
By just taking a look at how data.tar.gz is created it looks as though you could just copy it to your phones sd card and extract it to /data.
Heimdall does support efs.rfs, however it's intentionally not included in the user interface. The efs partition includes a lot of phone specific data, which depending on where you live it might be illegal to tamper with. As a general rule you shouldn't need to flash this file as the phone should retain this information. However, if in the event your efs does become corrupt you can flash the efs partition via the Heimdall command line tool.

Benjamin Dobell said:
By just taking a look at how data.tar.gz is created it looks as though you could just copy it to your phones sd card and extract it to /data.
Heimdall does support efs.rfs, however it's intentionally not included in the user interface. The efs partition includes a lot of phone specific data, which depending on where you live it might be illegal to tamper with. As a general rule you shouldn't need to flash this file as the phone should retain this information. However, if in the event your efs does become corrupt you can flash the efs partition via the Heimdall command line tool.
Click to expand...
Click to collapse
Thanks for the detailed response.
What program would you recommend to extract the data file? Would root explorer be suitable?
Thanks
Sent from my AT&T Galaxy Tab using XDA App

Related

How to make update.zip from boot.img, system.img, data.img (the nandroid backup)

Yes i know the fastboot trick, but can anyone guide me towards making the nandroid backup files into a update.zip that would work?
I'd like to know too ^^.
Me too.
I've successfully scripted the automated creation of a file structure into which the contents of BOOT.IMG, SYSTEM.IMG, DATA.IMG, CACHE.IMG and SD-EXT.IMG are extracted. The script also creates a valid update-script file under ./META-DATA/....
The only issue I have is that I'm using windows so the .IMG files extracted as a yaffs file system, looses the original file permissions. I need someway to recreate the permissions in the update.zip.
Thats all.
Having a way of converting a nandroid backup to an update.zip means you can very easily cook custom roms from a nandroid backup, and port ROMs across phones using a portable .ZIP format.
Maybe dsixda can help
http://forum.xda-developers.com/showthread.php?t=633246
"OR [cook a rom] from a Nandroid backup (under /sdcard/nandroid) [NOT RECOMMENDED]:
Copy the system.img and boot.img files from the backup folder to your kitchen's original_update folder
NOTE: The Nandroid-backup method of cooking is not the best way to cook, because the kitchen may not account for various advanced options that were cooked outside of this kitchen (these options are in the update-script file which was in the original ROM but is not in the backup. The kitchen needs to re-create this file and 'guess' those options). However, it will support Nandroid backups that already have basic features like root, busybox and /data/app functionality. "
You get nandroid backup images by backing up a ROM which was flashed from an update.zip package. What is then the point of recreating that update.zip package?
giant is right with the klitchen by dsixda you can make an update.zip form nandroid very easy
Guys, we're missing the point.
To clarify:
The "point of recreating the ZIP ROM file" are numerous. For example, to create a ROM where the original ROM isnt available, i.e. to create a portable ROM based on an existing set of images in a phone where the phone and/or its sdcard cannot be removed or where we do not wish to remove the card. Simple. But more importantly, the process is a learning and development activity that I want to undertake, its a personal decision, for which support would be welcome.
Secondly, dsixda issues many caveats around cooking ROMs from nadroid backups. It simply doesnt work - I've tried it - thus his caveat is correct and should be observed. Furthermore, his kitchen creates windows based ZIP files. The process is inherently flawed for creating ROMs for linux because the ZIP files contain a windows file structure which does not contain the appropriate linux based file permissions (linux being the O/S base system on android. The restore operation does not work - in stock form - because one looses the critical file permissions, UID and GID that are required in order for the ROM to function correctly, and in some instances from my experience, to even boot up! His update-script attempts to reinstate the appropriate permissions, UID and GIDs, however, and as dsixda admits, the process is not foolproof and does not cover all eventualities, combinations and scenarios. Thus, the issue of permissions, GID and UID remains outstanding.
For these reasons, in my humble view, the issue of permissions is critical in ensuring a successful ROM flash from [linux based] .IMG files. Once this is resolved, the rest of the process is trivial. Indeed, if this one issue could be resolved, then dsixda's kitchen would mature from a useful toolset, to a truly wonderous one-stop solution.
well i don't know what people have tried and got to work or not, but it can eb done and have been done before, one of my sliderom build was done froma nandroid
soo i guess it's up to how much effort you put into it and use the kitchen as a tool, but not only use it, cause then you fail, if you don't do some manual work, nothing 100% automated will ever be a big succes
I have a solution.
I am coding this up as we speak.
My solution will extract the file permission, UID and GID from the .IMG , for each contained file. My script then runs as part of the update-script (i.e. RUN_PROGRAM restore-protection) subsequent to a ROM flash. Thus, the resultant file structure after a ROM update is exactly the same as that contained within the .IMG files.
EDIT:
coding complete.
will test tomorrow on existing phone + sdcard.
The purpose of this exercise is to 'clone' an existing phone software load, as ROM file, that can then be flashed. My script takes all partition images (system, data, cache, sd-ext and so on), creates a ROM that includes functionality that will - when flashing - restore the exact permissions, GID and UID as written in the backup files (.IMG), thus cloning the phone.
I plan to update the script in future so that APK files can be added or removed, and additional low level features such as kernel pre-empting, scheduling and other features can be added --- I think they call this "a kitchen" in Android speak.??
From your description of what you're doing it sounds like you could end up with the simplest and closest to a one click kitchen that allows users with less knowledge to fully backup / restore / clone their phone (rom, personal settings, data and all). A lot of noobs might like this tool big time
Any progess made on this? I have been trying to create a rom for a nandroid backup. When I go to flash it, I get symlink errors and the flash fails.
dazxda said:
I have a solution.
I am coding this up as we speak.
My solution will extract the file permission, UID and GID from the .IMG , for each contained file. My script then runs as part of the update-script (i.e. RUN_PROGRAM restore-protection) subsequent to a ROM flash. Thus, the resultant file structure after a ROM update is exactly the same as that contained within the .IMG files.
EDIT:
coding complete.
will test tomorrow on existing phone + sdcard.
The purpose of this exercise is to 'clone' an existing phone software load, as ROM file, that can then be flashed. My script takes all partition images (system, data, cache, sd-ext and so on), creates a ROM that includes functionality that will - when flashing - restore the exact permissions, GID and UID as written in the backup files (.IMG), thus cloning the phone.
I plan to update the script in future so that APK files can be added or removed, and additional low level features such as kernel pre-empting, scheduling and other features can be added --- I think they call this "a kitchen" in Android speak.??
Click to expand...
Click to collapse
Do you have a link?
dazxda said:
I have a solution.
I am coding this up as we speak.
My solution will extract the file permission, UID and GID from the .IMG , for each contained file. My script then runs as part of the update-script (i.e. RUN_PROGRAM restore-protection) subsequent to a ROM flash. Thus, the resultant file structure after a ROM update is exactly the same as that contained within the .IMG files.
EDIT:
coding complete.
will test tomorrow on existing phone + sdcard.
The purpose of this exercise is to 'clone' an existing phone software load, as ROM file, that can then be flashed. My script takes all partition images (system, data, cache, sd-ext and so on), creates a ROM that includes functionality that will - when flashing - restore the exact permissions, GID and UID as written in the backup files (.IMG), thus cloning the phone.
I plan to update the script in future so that APK files can be added or removed, and additional low level features such as kernel pre-empting, scheduling and other features can be added --- I think they call this "a kitchen" in Android speak.??
Click to expand...
Click to collapse
Hi, could yo share your script? I'm also working on something similar, and could use a bit of help
OMG this is exactly what I need.. I read all the way to the end and then ARRGGGGGG.. no more responses in months. Have you made this script yet? If no .. does anyone else have instructions on taking a nandroid backup and creating an IMG or ?
My personal reasons.. I have a Craig CMP741E tablet that is stuck in the android logo screen after attempting the factory update.. the one that crashes EVERY1's tablet. And there is no working way that I have found to fix it. No custom roms or factory roms that can be flashed without FIRST having the tablet ON and turn on USB Debugging or already have CWM installed. So I cannot use ADB or any other method I can find to do this.
I have a buddy with the same tablet that is rooted and has GAPPS and everything on it. He gave me a copy of his nandroid backup but now I cannot find anything I can actually do with it. If I can turn it into an Update.zip or IMG I can simply put on SD Card.. restart and cross my fingers.
lilc420 said:
OMG this is exactly what I need.. I read all the way to the end and then ARRGGGGGG.. no more responses in months. Have you made this script yet? If no .. does anyone else have instructions on taking a nandroid backup and creating an IMG or ?
My personal reasons.. I have a Craig CMP741E tablet that is stuck in the android logo screen after attempting the factory update.. the one that crashes EVERY1's tablet. And there is no working way that I have found to fix it. No custom roms or factory roms that can be flashed without FIRST having the tablet ON and turn on USB Debugging or already have CWM installed. So I cannot use ADB or any other method I can find to do this.
I have a buddy with the same tablet that is rooted and has GAPPS and everything on it. He gave me a copy of his nandroid backup but now I cannot find anything I can actually do with it. If I can turn it into an Update.zip or IMG I can simply put on SD Card.. restart and cross my fingers.
Click to expand...
Click to collapse
Can you access the tablet's fastboot mode? Turn the tablet fully off, then hold the Menu button and the Power button. I don't have your tablet, but it's a standard boot mode.
Make sure you have the tablet connected to the PC. You should see it pop up in the Device Manager, or by doing "fastboot devices" from a command prompt.
If you can get there, you may be able to flash a recovery image.
Hi, does anybody knows if there is a response for this post??, i am looking for a method to convert the images files that are included in a rom stock (for using with sp flash tool) to an update.zip file. I have no way to use sp flash tool because my tablet has a hardware problem with microusb port and the only way is flashing a new rom via microSD card with an update.zip..
Maybe the solution is in another thread, please be kind and give me a link or at least give me some suggestions where to look for.

[Q] IMEI Backup and Restore

I am totally new to flashing. I just backed up my IMEI (created a rfs file using Terminal Emulator and just copied of the efs folder to my sdcard).
My question is that suppose I happen to lose my IMEI on flashing, can I recover it by simply copying the contents of the backed up efs folder to the original folder using root explorer?
yeah, its as simple as that
manish19 said:
I am totally new to flashing. I just backed up my IMEI (created a rfs file using Terminal Emulator and just copied of the efs folder to my sdcard).
My question is that suppose I happen to lose my IMEI on flashing, can I recover it by simply copying the contents of the backed up efs folder to the original folder using root explorer?
Click to expand...
Click to collapse
U can also flash it with Odin even without rooting.
devc0ol said:
U can also flash it with Odin even without rooting.
Click to expand...
Click to collapse
Thanks but I am not sure how I would do that. I went through the IMEI backup and restore thread. So is this what I have to do?
1. Select the .ops file.
2. In the efs section, add the file and not select the one package option.
3. Connect my phone in download mode
4. Flash
Is this method correct?
manish19 said:
Thanks but I am not sure how I would do that. I went through the IMEI backup and restore thread. So is this what I have to do?
1. Select the .ops file.
2. In the efs section, add the file and not select the one package option.
3. Connect my phone in download mode
4. Flash
Is this method correct?
Click to expand...
Click to collapse
Yup thats the way the say it to do.
But i think u have to change the efs folder into a .tar file to flash it.
DO IT AT UR OWN RISK!
manish19 said:
Thanks but I am not sure how I would do that. I went through the IMEI backup and restore thread. So is this what I have to do?
1. Select the .ops file.
2. In the efs section, add the file and not select the one package option.
3. Connect my phone in download mode
4. Flash
Is this method correct?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=888193
Have a look at this Thread also..
Gives the basics of different ways of mounting the efs partion.
Its safe to use the ADB method i guess.
But flashing with efs.tar file should work.

[GUIDE] Recover your IMEI in 9 steps.

If you did not make any backup of your EFS folder, and your IMEI is messed up, this could be your solution to recover your lost IMEI. NOTE THAT AT LEAST YOU MUST HAVE THE SHIPPED ORIGINAL EFS FOLDER ON YOUR PHONE ( even if you didn't make a backup of it yet and even it's messed up ) FOR THIS METHOD TO WORK
My history with my IMEI:
I flashed my phone with some ROMs, and I didn't backup my EFS folder before, then My SGS2 IMEI was changed to 004999010640000, and we know this is the fake IMEI that is assigned to the phone if the nv_data.bin file is messed up.
so I researched. searched all the forums and didn't find anything that could cure my phone's IMEI and set it to the original IMEI number. so I experimented and after some hours, I fixed my IMEI.
one thing that led me to the conclusion that " .nv_data " file is the thing that I need to fix the IMEI is that they share a very look alike name, and they have the same 2MB size.
PS: I restored my phone's firmware to it's original PDA, Phone and CSC, rooted it with CF-Root, and then done this procedures below
here is what I have done:
you must have:
-Root
-Root explorer for copying files to and from EFS folder
-Android SDK for the ADB tools or Terminal in your phone.
It is interesting to know that the IMEI is stored in ".nv_data" file in ORIGINAL SHIPPED EFS folder too, so you just have to do these:
1) make a copy of your EFS folder to your sdcard using root explorer and then make a backup of the folder to your computer [ to have another copy if you had to format sd card sometime ]
2) delete the EFS folder (BE SURE YOU HAVE BACKED IT UP IN A SAFE PLACE AS SAID IN STEP 1) from the root of your phone using root explorer.
3) reset the phone, after that, go to the root, and you can see that the EFS folder is still there, don't make any mistake, this EFS folder is new and generated by the android OS.
4) go to EFS folder using root explorer, and delete "nv_data.bin", "nv_data.bin.md5".
5) go to your backed up EFS folder on your sdcard, copy the "imei" folder to the EFS folder at the root of your phone, then again go to the backed up EFS folder at yout sdcard and copy the " .nv_data " file to your EFS folder at the root of your phone using root explorer, NOTE: the dot in first of nv_data is not a mistake, copy the ".nv_data" file.
6) make another copy of the ".nv_data" file in EFS folder in your phone, so you would have 2 copies of ".nv_data" in EFS folder
7) rename one of ".nv_data" files to "nv_data.bin" and another one to "nv_data.bin.bak"
8) at your PC open CMD at the ADB tool path, or run Terminal at your phone enter these commands:
adb shell ( use this command of you use ADB, if you're using terminal, skip this line )
su ( ALLOW THE MESSAGE CAME AT YOUR PHONE's DISPLAY BY SUPERUSER PROGRAM )
chown 1001:radio /efs/nv_data.bin
9) reset your phone.... after that you have your original IMEI. you can check your IMEI by dialing *#06#.
and DO IT ON YOUR OWN RISK.
and PLEASE MAKE A COPY OF THE ORIGINAL EFS FOLDER BEFORE DELETING IT. IT HAS IMPORTANT FILES IN IT.
and sorry for bad English.
Thank you very much for taking the time to write this helpful thread, but can you please tell us how your IMEI was changed to a fake one in the first place so that we don't have to go through all this?
maddada said:
Thank you very much for taking the time to write this helpful thread, but can you please tell us how your IMEI was changed to a fake one in the first place so that we don't have to go through all this?
Click to expand...
Click to collapse
Flashing a rom may often be the only reason .
jje
Had you already made a copy of your EFS folder before your IMEI was changed?
kcaz said:
Had you already made a copy of your EFS folder before your IMEI was changed?
Click to expand...
Click to collapse
No, I didn't had the back up before IMEI change.
To make a conclusion:
... You didn't backup your EFS folder.
... Your IMEI changed because of ROM flashings.
... You want to recover your IMEI.
For the purpose of making a backup of the EFS folder, how about simply copying the whole folder into a safe place?
There is an app called Nitrality (if my spelling is not wrong) which one of its various functions is to backup and restore the EFS folder. I've made a backup using this method and it seems that what the app actually did was simply copying the whole folder into a different directory. If it's simple like that, it seems that Root Explorer or similar app would be enough for that purpose.
Nevertheless, as there are numerous guides on this topic, all of which providing more complex methods, either using ADB or Terminal Emulator (I've made a backup using it as well, just in case, which resulted in the EFS being saved as tarball file), I have some doubts whether simply copying the whole folder would be enough for a eventual restoration. Would it?
angelomaldito said:
For the purpose of making a backup of the EFS folder, how about simply copying the whole folder into a safe place?
There is an app called Nitrality (if my spelling is not wrong) which one of its various functions is to backup and restore the EFS folder. I've made a backup using this method and it seems that what the app actually did was simply to copy the whole folder into a different directory. If it's simple like that, it seems that Root Explorer or similar app would be enough for that purpose.
Nevertheless, as there are numerous guides on this topic, all of which providing more complex methods, either using ADB or Terminal Emulator (i've made a backup using it as well, just in case, which resulted in the EFS being saved as tarball file), I have some doubts wheter simply copying the whole folder would be enough for a eventual restoration. Would it?
Click to expand...
Click to collapse
Just copying your EFS folder to a safe place is enough, using any method, but copying EFS folder messes up wih its permissions, so if you want to restore your nv_data.bin file, you must set the owner of the nv_data.bin using "chown" command in ADB like described in my post.
After all, I hope this method works for everyone, worked for me though.
Have copied the efs folder onto my PC.
At least i now know i have a backup, i can mess about with permissions there and then if it ever comes down to it!
I do not have the .nv_data file. onle *.bin or *.bak. Any suggestions or do I have to stick with the generic 00... IMEI? The whole procedure did not word for me, but thanks anyway.
By the way I think you do not need adb for that. You can execute the chmod command in a Terminal editor on the phone.
Schindler33 said:
I do not have the .nv_data file. onle *.bin or *.bak. Any suggestions or do I have to stick with the generic 00... IMEI? The whole procedure did not word for me, but thanks anyway.
By the way I think you do not need adb for that. You can execute the chmod command in a Terminal editor on the phone.
Click to expand...
Click to collapse
yes you can use terminal in your phone, but as for information for the other users, you don't need to enter " adb shell " command in step 8, because you are already connected to the phone's kernel.
I think you deleted your original EFS folder that came preinstalled with your phone, because I had " .nv_data " file.
anyway, use " nv_data.bin.bak " instead of " .nv_data " and see what happens.
thanks for the update.
---------- Post added at 07:55 PM ---------- Previous post was at 07:53 PM ----------
superleeds27 said:
Have copied the efs folder onto my PC.
At least i now know i have a backup, i can mess about with permissions there and then if it ever comes down to it!
Click to expand...
Click to collapse
thank you for your reply. but please don't play with EFS folder too much. the Android OS can't recover your IMEI if you lost it completely. I've been lucky with this method to restore my IMEI.
thanks.
Do you know if there are providers that block your
IMEI? I do not have any problems with my carrier now but I will soon go to the states, and I don't know wether my phone will get blocked there.
Sent from my GT-I9100 using XDA App
Im not messing with it at all. Basically just copied it onto my SD card and then onot my PC. That way i know i deffo have a backup if anything was to happen
Schindler33 said:
Do you know if there are providers that block your
IMEI? I do not have any problems with my carrier now but I will soon go to the states, and I don't know wether my phone will get blocked there.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
I don't know any providers. but as a guess, I think some providers MAY block an irregular IMEI because of their security policy. but it's just a guess.
vaskodogamagmail said:
No, I didn't had the back up before IMEI change.
To make a conclusion:
... You didn't backup your EFS folder.
... Your IMEI changed because of ROM flashings.
... You want to recover your IMEI.
Click to expand...
Click to collapse
I don't understand how you were able to apply the steps you describe to your case if you didn't have a backup of your original efs folder...
Help
My SGS 4G IMEI is corrupted showing some random symbols. Now I have taken backup of my EFS folder. EFS>root>afs>setings has .nv_state and nv_data.bin.
In IMEI folder there are only two files bt.txt and mps_code.dat.
Can it be repaired back to original IMEI? I don't have back up of my original EFS folder.
jerome.d said:
I don't understand how you were able to apply the steps you describe to your case if you didn't have a backup of your original efs folder...
Click to expand...
Click to collapse
I didn't had a backup of my original EFS folder BEFORE IMEI CHANGE.
after my IMEI has been changed to the fake one, then I backed up my EFS folder and do the steps in the first post.
---------- Post added at 05:22 PM ---------- Previous post was at 05:13 PM ----------
s_d123 said:
My SGS 4G IMEI is corrupted showing some random symbols. Now I have taken backup of my EFS folder. EFS>root>afs>setings has .nv_state and nv_data.bin.
In IMEI folder there are only two files bt.txt and mps_code.dat.
Can it be repaired back to original IMEI? I don't have back up of my original EFS folder.
Click to expand...
Click to collapse
the Content of your IMEI folder is correct, we don't have any business with the IMEI folder's content.
but look at your EFS folder contents, find the file named " .nv_data " (no post-fix), then do the steps in the first post.
but NOTE: my SGS 2 is a GSM model, not the 4G model, so I cannot guarantee that this method works with your phone too as it did for me.
thank you
Works in galaxy s too?
Thanks.
Hi...
I don't understand very well what you mean by
NOTE THAT AT LEAST YOU MUST HAVE THE SHIPPED ORIGINAL EFS FOLDER ON YOUR PHONE
Click to expand...
Click to collapse
Do you mean that we should have the efs folder with the sud-folder and files structure as it was when the IMEI was not corrupted???
I.E.
/efs (dir)
nv_data.bin (file)
.imei (hidden file)
.nv_data.bak (hidden file)
.nv_data.bak.md5 (hidden file)
nv_data.bin.md5 (file)
nv_state (file)
/.android (hidden folder)
/imei (folder)
bt.txt (file)
mps_code.dat (file)
nvmac.info (file)
Another issue i'm facing is the fact that I can't do a chown radio:radio because i get the error that user/group radio does not exist...
And would this work for SGS I?
Like others I am confused.
I flashed a ROM night before last.
I ended up with a phone that wouldn't work and the fake IMEI number.
By some chance I was able to get my phone working again with HC-kTool by restoring a efs.tar file -- I have a number of efsxxxx.tar.gz files in a folder called EFS_BACKUP on my sdcard (I don't how it got there but there are various dates of these files).
Now my phone works with data on the ATT network but my IMEI number is still the fake one.
SOOOO -- if I DON"T have an original backup of my EFS folder (or at least one I'm sure of) HOW do I restore my origianl IMEI ???
Thanks for this!

Efs backup -- important !!!!

For those of you that don't think you need to read this - you are wrong! I have flashed 100's of ROM's with no issue until the end of last week.
MODERATORS PLEASE STICKY THIS IN A PLACE WHERE EVERYDAY USERS THAT FLASH ROMS WILL SEE IT
I uneventfully flashed a ROM (not important which one because I don't think it has anything to do with particular ROM) and all went well. I went to bed with a working phone and the somehow a reboot happened and awoke with a phone with no signal. The error was saying that there was no SIM card and / or No Network Available.
I finally used HC-kTool app on the Market (used latest version) to Restore an efs.tar file and my phone started working but I had a generic / fake IMEI number -- 004999010640000
If you have backed up your /EFS folder on the root of your phone then all is well. The easiest way is to use Hellcat's HC-kTool to back up your EFS and save a copy on your sdcard and your PC and that way you will not have to go through my misery.
However if you have not BACKED UP your EFS files then you will have issues like I did
Ok so here is what I can tell based on my experience:
Look for any files or folders on your sdcard that have EFS in the name. You might get lucky and look in the /EFS folder on your phone. If the nv_data.bin file has been corrupted the .nv_data.bin.bak might still be OK. If that is the case you may be able to follow this guide: http://forum.gsmhosting.com/vbb/f606/samsung-android-repair-efs-imei-repair-without-box-1348192/
What won't work is any sort of simple copying nv_data.bin from the sdcard to the /EFS folder using Root Explorer - I spent almost an entire weekend trying this.
If your /EFS folder .bak file has been corrupted then in my case I found a folder on my sdcard named EFS_BACKUP that I assume that Clockworkmod has created during some of my ROM flashes (somebody correct me if I'm wrong because otherwise I have no idea how it got there).
In the EFS_BACKUP folder I have a number of files form different dates (I assume of flashes) labelled efs_xxdate.tar.gz
btw you can use these or any .gz file when using HC_kTool tool simply by renaming the file (long press with Root Explorer) to just a .tar file (delete the .gz). HC_kTool uses a file named efs.tar on the root of the sdcard to restore.
In my case I had to extract one of these files by long pressing in Root Explorer and choicing extract. I then went to the extracted folder on the sdcard (using Root Explorer) and found a folder named efs_xxdate and within that a folder named EFS
... again don't get mislead -- simply copying and pasting that file or any other to the root /EFS folder will not work!!
I noticed that there were multiple files in the extracted/efs_xxdate/efs folder but the dates were different. The nv_data.bin and the nv_dat.bin.md5 files were dated the same as the date of the folder BUT the .nv_data.bak file was dated Dec31, 2010
Here's how I restored that file:
1) I extracted the .tar.gz file as above
2) Went to sdcard\extracted\efsxxdate\efs folder and copied the older dated .nv_data.bak to the root of the sdcard using Root Explorer (long press, copy, then paste)
3) Then renamed the .nv_data.bak file to nv_data.bin on the root of the sdcard
3) Then followed these instructions from line 14 on in this post .. http://forum.gsmhosting.com/vbb/f606/samsung-android-repair-efs-imei-repair-without-box-1348192/
14 = at command prompt [ C:\adbtools\ ], type adb shell
15 = type su
16 = type cp /sdcard/nv_data.bin
17 = type rm -rf /efs/nv_data.bin.md5
18 = type exit & exit
19 = REBOOT YOUR PHONE
I'm not sure why this works but EVERY combination of copying and pasting nv_data.bin , .bak, or entire EFS folders suing Root Explorer does NOT work but this above technique did work for me ! Somehow having the .md5 file recreated is the key ??
I hope this helps someone.
BACKUP YOUR EFS -- Hellcat's HC_kTool seems to work great
Thank the DEVELOPERS
Already been highlighted a few times
http://forum.xda-developers.com/showthread.php?t=1068193&highlight=efs
Can you please clarify....I always keep a weekly copy of clock work mod backed up. Is this not enough? A lille confused about the need for efs backup...
Sent from my SGS2
Thx for this post. Anyway, i got stuck at 17, it says "-rf: not found". What does that mean? Am i unable to mount efs?
Nice post. Not happened to me *yet* but you never know.
Here is the direct link to Hellcats K-tool
Backing mine up now
jcrompton said:
However if you have not BACKED UP your EFS files then you will have issues like I did
Click to expand...
Click to collapse
You had the EFS image file already, all you had to do was rename the file then use ktool and you were done within seconds..
You probably could've done it via pm as I don't think it was a good idea to try any suggestion that was thrown at you in public forum...
btw, this is original development section.. someone move it to general please..
s2d4 said:
You had the EFS image file already, all you had to do was rename the file then use ktool and you were done within seconds..
You probably could've done it via pm as I don't think it was a good idea to try any suggestion that was thrown at you in public forum...
btw, this is original development section.. someone move it to general please..
Click to expand...
Click to collapse
Actually i don't understand how he made it: ktool doesn't use a tar file like posted, but an img file, and you can only find tar.gz files in the backup folder. How do you get an img file out of those?
s2d4 said:
someone move it to general please..
Click to expand...
Click to collapse
Sorted
Used K-Tool since the method mentioned via terminal never worked..
stylez said:
Sorted
Used K-Tool since the method mentioned via terminal never worked..
Click to expand...
Click to collapse
Good for you
But what did you do exactly? How did you obtain the img file for ktool to flash it? I only have the tar backups from the Efs_ backup folder...
s2d4 said:
You had the EFS image file already, all you had to do was rename the file then use ktool and you were done within seconds..
You probably could've done it via pm as I don't think it was a good idea to try any suggestion that was thrown at you in public forum...
btw, this is original development section.. someone move it to general please..
Click to expand...
Click to collapse
I did not have a new efs image file
All the files I had had been corrupted
I spent four days PMing all the big wigs re this. It's not as simple as you think unless you familiarize yourself with EFS backup BEFORE you need it!
Clockwork mod and nandroid backups do not alter the efs folder when a backup is restored! It must be backed up separately
Sent from my GT-I9100 using xda premium
vnvman said:
Good for you
But what did you do exactly? How did you obtain the img file for ktool to flash it? I only have the tar backups from the Efs_ backup folder...
Click to expand...
Click to collapse
I did not have an image file either. Look above at my post where I describe how to do it from step number 1 forward
I didn't use the tool to fix it
I just suggested getting the tool and learning how to use it
Sent from my GT-I9100 using xda premium
jcrompton said:
I didn't use the tool to fix it
Click to expand...
Click to collapse
Just to make the whole thread clear, is your IMEI now the original IMEI or the default U1 IMEI of 0049...?
Hmm..in the end i fixed this by flashing the efs from the official kh3 firmware through odin (clear efs checked). Now my imei changed to a generic one but i don't really care: i have my baseband back and the phone works. I just hope the FBI or something isn't after me now.
vnvman said:
Hmm..in the end i fixed this by flashing the efs from the official kh3 firmware through odin (clear efs checked). Now my imei changed to a generic one but i don't really care: i have my baseband back and the phone works. I just hope the FBI or something isn't after me now.
Click to expand...
Click to collapse
Do you have an EFS_BACKUP folder on your sdcard? And if so do you have any compressed files with older (mine was dated Dec31 2010) .nv_data.bak files?
If you do then that's what I ultimately used to restore my IMEI (not the generic one)
jcrompton said:
Do you have an EFS_BACKUP folder on your sdcard? And if so do you have any compressed files with older (mine was dated Dec31 2010) .nv_data.bak files?
If you do then that's what I ultimately used to restore my IMEI (not the generic one)
Click to expand...
Click to collapse
Thanks, i'll try that right away.
vnvman said:
Actually i don't understand how he made it: ktool doesn't use a tar file like posted, but an img file, and you can only find tar.gz files in the backup folder. How do you get an img file out of those?
Click to expand...
Click to collapse
kTool does both, raw .IMG dump and filebased .tar.gz backup.
Does K-Tool work with CF-Root kernel?
HellcatDroid said:
kTool does both, raw .IMG dump and filebased .tar.gz backup.
Click to expand...
Click to collapse
Wtf, i got answered by Hellcat himself!
Thanks, i didn't notice that option, i would have gone much less nuts if i knew it, stupid me
nfribeiro said:
Does K-Tool work with CF-Root kernel?
Click to expand...
Click to collapse
Yes, should work fine.
Should you find any missbehavings or issues though, please let me know and they shall be fixed
vnvman said:
Wtf, i got answered by Hellcat himself!
Thanks, i didn't notice that option, i would have gone much less nuts if i knew it, stupid me
Click to expand...
Click to collapse
lol xD
Well, but not necessarily stupid, the first few versions indeed only made the raw .IMG dump and the button still only says "backup to /sdcard/efs.img" (yeah, I should really change that text )
But since some 1.2x build it makes the .tar as well and when you hit the restore button it asks if you want to restore the .IMG or the .tar
Haha yeah right, i never hit restore because i didn't have an img dumped to the sd so i thought i had nothing to restore there

[HELP] Retrieving TWRP data [SOLVED]

Hello, I would like to know how I could extract backed up TWRP data on my computer? maybe because the data was large TWRP split it into two files : data.ext4.win000 and data.ext4.win001 (sizes 1.5 and 1.2 GB)
How I got there:
I've been using XenonHD rom for quite a while, and this rom uses koush's superuser app.
I noticed there was a newer version on the market so I installed it; however it appears the one used by the rom developer was modified and therefore had a different package name: I ended up with two superuser apps, one of them asking to update the binaries, which I did.
After that the phone got stuck and rebooted two or three times before being stuck indefinitely at 'updating app' message right after the bootanimation. I tried:
- to wipe dalvik cache but it was still stuck;
- I reflashed the rom + gapps but it was still stuck;
- then I went to the /data/app/ folder (via TWRP) and deleted the superuser app i installed from market, as well as the corresponding data in /data/data, wiped cache and dalvik again: still the same...
-the I decided to make a backup via TWRP : one of the whole system, and one of Data partition only;
- then I realised I couldn't transfer it to my computer in TWRP, so I finally made a factory reset, re-flashed the rom+gapps, and then (it worked) copied my backup to the computer
now; how can I retrieve the data of my apps only, as I guess it is the system data that is messed up?
Of course I tried to restore the Data backup in twrp and it got stuck again the same way....
any help greatly appreciated!
You could try appextractor on the play store
Sent from my Nexus 4 using xda app-developers app
forvrknight said:
You could try appextractor on the play store
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voilà
I could then retrieve my sms mms messages by retrieving the file smsmms.db (and eventually smsmms.db-journal) located in /data/data/com.android.providers.telephony/databases, and putting them on the phone in the same folder
I could also retrieve my phone call logs by retrieving the files contacts2.db (and eventually contacts2.db-journal) located in /data/data/com.android.providers.contacts/databases, and putting them on the phone in the same folder
Hope it helps someone someday
For some reason replacing the data folder of a particular app does not always work, I have to investigate a bit or maybe start fresh with a new rom and try again
asim0 said:
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voilà
I could then retrieve my sms mms messages by retrieving the file smsmms.db (and eventually smsmms.db-journal) located in /data/data/com.android.providers.telephony/databases, and putting them on the phone in the same folder
I could also retrieve my phone call logs by retrieving the files contacts2.db (and eventually contacts2.db-journal) located in /data/data/com.android.providers.contacts/databases, and putting them on the phone in the same folder
Hope it helps someone someday
For some reason replacing the data folder of a particular app does not always work, I have to investigate a bit or maybe start fresh with a new rom and try again
Click to expand...
Click to collapse
It actually helped me, thanks a lot!
Two Questions
asim0 said:
On this file I used AccessData FTK Imager,
Click to expand...
Click to collapse
This is a 4.6 Gigs professional software. If TWRP can read this type of file there must be a smaller tool available for this.
Can you please let me know of any other toll which would do the same?
asim0 said:
All you have to do now is to merge the two data folders and voilà
Click to expand...
Click to collapse
For the 2nd file do we need to follow the same procedure like 'evidence' and stuff?
Thanks, I am desperate to read some information from TWRP backup and cannot wait 6 days while the 4.6 Gigs of ISO will download.
pi_yush said:
This is a 4.6 Gigs professional software. If TWRP can read this type of file there must be a smaller tool available for this.
Can you please let me know of any other toll which would do the same?
For the 2nd file do we need to follow the same procedure like 'evidence' and stuff?
Thanks, I am desperate to read some information from TWRP backup and cannot wait 6 days while the 4.6 Gigs of ISO will download.
Click to expand...
Click to collapse
These files (at least the ones produced by TWRP2 on my phone) are just standard gzipped tar archives. The tar command has supported this format for at least 20 years. You can extract with a command like this:
Code:
tar xvfz data.ext4.win000
tar xvfz data.ext4.win001
number_thirty_two said:
These files (at least the ones produced by TWRP2 on my phone) are just standard gzipped tar archives. The tar command has supported this format for at least 20 years. You can extract with a command like this:
Code:
tar xvfz data.ext4.win000
tar xvfz data.ext4.win001
Click to expand...
Click to collapse
Thanks number_thirty_two, I copyed thes to a folder I named untar in my home folder of CYGWIN, and extracted my system files perfectly
C:\cygwin\home\carl\untar\
system.ext4.win000
system.ext4.win001
tar xvfz system.ext4.win000
tar xvfz system.ext4.win001
Apologies for resurrecting this, but does anyone know how to extract them if they were compressed as .comp files?
asim0 said:
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voil
Click to expand...
Click to collapse

Categories

Resources