How do I manually extract the backups I made using TWRP? - General Questions and Answers

Hello,
In the ROM'ing journey, I backed up everything using TWRP on a OnePlus6.
I have all the files shown below here, but I am not sure how do you view them on the PC, as in what tool do I use? Using a archive tool doesn't work, from what I can see there are multiple part files and the archive tool doesn't seem to detect it.
I basically just want my DCIM, and Audio recordings out of it as of now.

rename data.ext4.win files to tar (or tar.gz) and open with 7-zip. these files aren't multiple part files. open each file on its own.
pictures are in data/media/0/DCIM/Camera and therefore not included in TWRP backup.

Oh, I see. Never thought they wouldn't be included by default, I thought backing up backs up absolutely everything

there's a warning on phone screen
also in documention
https://twrp.me/faq/backupexclusions.html

Related

Activesync restore

Today I lost all the data on my phone.. no problem I thought, I shall do a restore using my backup activesync makes every time i plug my phone in, so all is fine and dandy. When it gets about half way through the restoration, activesync crashes (always at the same point). It is during processing a file called fldr1001dd8.
This means I cannot fully restore my device - very annoying!!
Can anyone help with this... can I make it so it skips errors instead of crashing? Any help at all appreciated!! Device is a Blue Angel, using ActiveSync 4.1
You want to download a free utility called STGViewer - this utility allows you to examine the contents of the backup file activesync creates so you can identify which data you want restored. If there is a corrupt file then you can decide not to restore that particular one but retrieve everything else.
Thankyou so much, I will try that!!
OK I have found it, but I cant work out how to delete a file from the archive with it. All it seems able to do is 'copy' files out of the archive :-(
Any tips?
You cannot delete individual files from the .stg file but the program does allow you to restore selected folders and files. So you can restore Program Files folder all at once - if that works then restore My Documents folder and so on.
You may find that by restoring individually there may not be any corrupt files. But if there are, then you just select everything else except the corrupted file - you can use drag and highlight to speed things up. A little bit tedious but at least you can get all your files back from a bad .stg file.
BTW, the file you mentioned is in Pegasus Databases which are system files
Have you used the program yourself Ian? If so could you please help me with the restore folder button.. when I select a folder, then the restore folder option on the menu, nothing happens. This is very frustrating!
Also, when I extract the files from the pegasus database and put them on the phone, the pegasus folder shows in the phone's file manager (obviously, because I just put it there). How do I restore them to the (presumably hidden) folder, where they are meant to be?
I appreciate all help on this matter, all I need back are my contacts, appointments and message data etc, the rest I can start afresh with.
No I have not used this to restore an entire phone, only to retrieve individual files. It does sound like you will need to start afresh and just use STGViewer to recover personal files from My Documents etc. Most installed programs in Program Files will work fine if restored via STGViewer- there is often no need to actually use an installation program as many programs work as standalone folders.
If you have synced with your PC previously, all your contacts, notes and messages will be in Microsoft Outlook so you can use Activesync to restore these back onto your phone. (assuming you had opted to sync these items)
I would suggest in future that you use Xbackup in the Programs folder to regularly save your contacts/notes data into permanent Storage. I also from time to time make a copy of my .stg file so that I do not need to start anew if my current .stg file is corrupted. Good luck!

expand a nandroid img file

for those who do not know how to do this yet, follow directions given here.
Just took this info from the web. None of this except for the guide is written by me.
I am not responsible for anything please do not contact me if a green sludge starts attacking your neighborhood eating one person at a time.
************************************************************
************************************************************
************************************************************
http://code.google.com/p/unyaffs/downloads/list
made for linux, but if you know a bit of c, you can probably change it to work with windows, maybe I will do that if I have some time this week.
********OR********
http://jiggawatt.org/badc0de/android/unyaffs-x86-win.zip
or http://www.4shared.com/get/fgryPnPx/unyaffs-windows.html
for windows..... instructions below apply for both
if not included in the zips above, cygwin1.dll and unyaffs.exe are included as an attachment of this reply.
open up a command line, in windows vista/7 just press start and then type cmd press enter and change the directory to the folder with the unyaffs and the img in it. in xp press start>run>cmd... then the same
the usage is: unyaffs /path/to/img
example:
(if unyaffs.exe and system.img are both in c:\temp)
"c:\temp> unyaffs /temp/system.img"
note: the '/' is the way linux determines the pathname of a file and since it is built using cygwin(a file allowing for windows) it is preferrable that the path to the actual file is in unix POSIX format ie: / instead of \ between folders and files.
*********WARNING************
this will extract to directory that unyaffs binary is in.
That's so weird -- I was gonna post the same thing tonight. Thx for writing this up. It's odd that more people don't talk or ask about this tool!
I remember reading this stuff back when I got my G1, and tonight I was trolling the themes and apps section cause I couldnt sleep. (which I rarely look at)
I was baffled that this wasnt common knowledge. I figured if there was no threads about it that people just knew how and didnt have any problems with it. My mistake lol...
enjoy.
can you please explain what is it? what it does? thanks
ericizzy1 said:
can you please explain what is it? what it does? thanks
Click to expand...
Click to collapse
Umm, it expands nandroid img files not sure how else to explain it. Clockworkmod backups are in the img file format. This process allows you to extract those files to get stuff out of them
Sent from my SPH-D700 using XDA App
When you create a backup in Clockwork recovery, it leaves you with a folder like this:
2010-11-18.08.52.49
As you can prob figure out, I made that backup on 11/18 at 8:52am
Inside that folder are .img files, such as: data.img and system.img
Those files basically contain your data (like apps you've installed from market) and system (..system apps that might've come with the phone).
In the orig post, he's explaining how to extract the files from these large .img files.
To give an example, I had a couple of corrupted clockwork backups, and wanted to ONLY pull out some database files (like text messages and call logs) which were not corrupted. Even tho the backup was messed up, I could still extract the files I needed by using the method above, then copied them manually to my phone.
decalex said:
When you create a backup in Clockwork recovery, it leaves you with a folder like this:
2010-11-18.08.52.49
As you can prob figure out, I made that backup on 11/18 at 8:52am
Inside that folder are .img files, such as: data.img and system.img
Those files basically contain your data (like apps you've installed from market) and system (..system apps that might've come with the phone).
In the orig post, he's explaining how to extract the files from these large .img files.
To give an example, I had a couple of corrupted clockwork backups, and wanted to ONLY pull out some database files (like text messages and call logs) which were not corrupted. Even tho the backup was messed up, I could still extract the files I needed by using the method above, then copied them manually to my phone.
Click to expand...
Click to collapse
thx
Sent from my SPH-D700 using XDA App
smeyerhuky said:
Umm, it expands nandroid img files not sure how else to explain it. Clockworkmod backups are in the img file format. This process allows you to extract those files to get stuff out of them
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Right, like if you wanted a file or a few files from clockworkmod img backup, then this process would give you an extended file system, other than what you would normally use to extract the img files. Just trying to understand this so, please correct me if im wrong.... I've been trying to get more knowledge of this, so im still learning.
I prolly sound like a complete idiot, lol...
Sweet! Thanks for this man. I'd been looking for how to do this for some time and kept ending up learning about emulation or some other tangential topic. This is the basic functionality I was looking for. Thanks for posting!
Np. I'm working on writing some stuff on top of the source code that should allow you to browse and pull just one our more file
Its been a but since I looked theory source code so it might take a while... Maybe in between semesters?
Sent from my SPH-D700 using XDA App
Dode you saved my as** thx big thx
Great, now how can I re-compress back to .img after I've made the changes that I want?
EDIT: Nevermind. I just made a zip of the new system folder and flashed it in CWM.
This worked great for me.
Thanks,
Bud
Man, I do not know how to thank you. I was able to recover some important stuff off of my cwm recovery backup. THANKS!!

[GUIDE] How to extract Clockworkmod Images

As it seems to be a fairly common question, here is a guide on how to extract your clockworkmod recovery images.
This can come handy if you only want to extract certain apps, or files.
Put your Clockworkmod images in a folder on your computer.
Download this and put it in there, too.
Extract it in there.
Open a cmd-prompt in this folder.
Use this command to extract your data:
Code:
unyaffs.exe img_name_to_extract.img
Wait. the tool will display "end of image" when it is done.
Done. The data should be in the same directory as the tool is.
If you want to restore your contacts:
Extract the data.img
Your contacts will be in:
Code:
\data\com.android.providers.contacts\databases
I have not written the program used in this guide, just found it on my harddrive.
thanks much. so helpful
helped me to pull out contacts
I first had to download and install cgwin1.dll from here http://www.dll-files.com/dllindex/dll-files.shtml?cygwin1 and place it in the windows directory to get this to work. But after proceeding I get a "broken image file" when trying this on recovery.img and same thing with boot.img.
I am simply trying to recover some data from this nandroid backup specifically pictures in the sdcard/DCIM directory but I have no idea where it is. Is it located somewhere in the data.ext4.rar or system.ext4.rar files? If so I have looked through those and could not find a DCIM directory of any kind. Would anyone be kind enough to direct me?
Thanks
JDubbed said:
I first had to download and install cgwin1.dll from here http://www.dll-files.com/dllindex/dll-files.shtml?cygwin1 and place it in the windows directory to get this to work. But after proceeding I get a "broken image file" when trying this on recovery.img and same thing with boot.img.
I am simply trying to recover some data from this nandroid backup specifically pictures in the sdcard/DCIM directory but I have no idea where it is. Is it located somewhere in the data.ext4.rar or system.ext4.rar files? If so I have looked through those and could not find a DCIM directory of any kind. Would anyone be kind enough to direct me?
Thanks
Click to expand...
Click to collapse
You won't be able to do that. The recovery does not backup the sdcard.
Thank you very much ,it help me much
Cheers buddy! Needed this to extract my data backup

[Q] How can I extract SMSs from my Zune backup?

I have lots of Zune backups on my PC and I want to "extract" only my SMSs.. I opened the backup folder and into this I found the "RestorePoint" folder. Into this folder there is a file called "ActiveID.dat" and another folder which contains the folder "Data", which contains the "real" backup: there are lots of "Data.x.dat" and "Data.x.data.hash" files but I don't know how can I do to extract something from these.. How can I do? Does anyone have an idea?
Currently not possible
It seems that so far nobody has cracked the file format of those backups to extract things like SMS from them. See e.g. this earlier thread:
http://forum.xda-developers.com/showthread.php?t=1614624

[Q] joining TWRP backup files

I recently did a backup using TWRP (v.2.8.1.0) and now have multiple files (data.ext4.win000, data.ext4.win001, data.ext4.win002 etc).
Can anyone please help by proving information on how to easily merge these files together in Windows 7?
Ultimately I would like to be able to view these using 7-zip.
Thanks!
toggly said:
I recently did a backup using TWRP (v.2.8.1.0) and now have multiple files (data.ext4.win000, data.ext4.win001, data.ext4.win002 etc).
Can anyone please help by proving information on how to easily merge these files together in Windows 7?
Ultimately I would like to be able to view these using 7-zip.
Thanks!
Click to expand...
Click to collapse
That's normal. You don't want to merge them. They're all in a folder that is the backup
Sent from my Nexus 9 using XDA Free mobile app
Those files are separate archives, open then like any other tar.gz
GR0S said:
Those files are separate archives, open then like any other tar.gz
Click to expand...
Click to collapse
I get an invalid archive error when I try to open the data backups though I don't on any of the other backup files (cache.ext4.win, system.ext4.win etc).
I'm pretty sure they need to be concatenated together though I am not sure if this is easily to accomplish in Windows 7. Here is an other post with a similar problem that was solved using the Ubuntu.
On ubuntu I've just appended .tar to file name and it works.
You should try merging files with total commander and renaming to .tar
GR0S said:
On ubuntu I've just appended .tar to file name and it works.
You should try merging files with total commander and renaming to .tar
Click to expand...
Click to collapse
Gave that a shot but it didn't work
Should work just copying and pasting them into the same folder. TWRP treats the backup for a partition to be separate and complete from another. I've mixed and matched restoring partitions from different backups and it's worked. You'll have to use your judgment as to whether the restored partitions will play nice with each other.
EDIT - A workaround is to restore the partitions that you want and then back them up into a new archive.

Categories

Resources