Go Back   Android Forums > Android Phones > HTC EVO 4G > EVO 4G - All Things Root
EVO 4G - All Things Root Rooting, ROMS, Overclocking, etc.

Like Tree11Likes
  • 5 Post By akazabam
  • 3 Post By akazabam
  • 2 Post By akazabam
  • 1 Post By argedion

test: Reply
 
LinkBack Thread Tools
Old April 17th, 2011, 09:57 PM   #1 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default Read/Copy the contents of nandroid backups

I've seen a lot of people ask if it's possible to find out what ROM a nandroid backup is of, or how to get apps out of a backup without restoring it (as is the case if you forget to backup with TB, first). In this thread, I explained how to do this from Windows. What I failed to mention is that this is natively supported in Linux. The method in that thread involves copying img files from a backup to a Windows computer, and using unyaffs with cygwin. Since Android is Linux, you can do this directly from your phone. Yes, it takes a bit longer (just a couple minutes) because you're reading/writing to the sdcard. It still takes much less time than it does to restore a backup, get what you need, then restore back to whatever you had before. So, to make this process easy, I've written a script that can be executed from the terminal directly on the phone. The process is completely automated. Here is how it works:

1) Flash unandroid-signed.zip from recovery. Reboot. (You only have to do this step once)
2) Open the terminal emulator.
3) Run this command:

unandroid

4) You will be given a list of existing Clockwork and/or Amon RA nandroid backups. For example:

Quote:
[1] backup1
[2] backup2
[3] backup3
5) Select the number of the backup you want to extract. For example, just type "1" without quotes to extract backup1.
6) The script will determine if the backup includes a system.img, a data.img, or both. You will be prompted to extract either one or both by pressing "s" for system.img, "d" for data.img, or "sd" for both (all without quotes).
7) That is all the user input it needs. Once that is done, the backup will be extracted to /sdcard/nandroid_tmp/nameofbackup/ with a directory named system.img for the system.img and/or a directory named data.img for the data.img.
8) Use any file browser you like to navigate to those directories. You will find all of the files you would normally find in /system or /data if you were to actually restore that backup.

Note that you only have the option for system.img and/or data.img. This method is not useful for any other image file in a nandroid backup. That being said, system.img and data.img are the only ones you'll need 99% of the time.

Note also that it will take approximately 2-3 minutes per image (data.img and/or system.img) depending on how big it is. It might look like the script is hanging, but it's not. Unless you get errors, just let it run. If you do cancel it, though, just remove the directory that gets created in /sdcard/nandroid_tmp and start over. Basically, this process is the same as restoring a nandroid the backup. The difference is that you're copying the files to a temporary location for ease of access rather than replacing your entire system (a waste of time for extracting a few files here and there).


Potential uses for this script:

1) If you forgot to rename a backup, and have no idea what it is, follow the above procedure for the system.img of that backup. Once it is done, use a file browser to navigate to the directory. In the top level of the system.img directory, you will find a file named build.prop. It is a text file with a list of properties for the ROM that was backed up. Open it, and find ro.build.description. That will tell you what ROM it is. You can also do this from the command line (terminal) by typing:

grep ro.build.description /sdcard/nandroid_tmp/nameofbackup/system.img/build.properties

2) If you forgot to backup an app and no longer have access to the apk (or you simply forgot what all you had installed), follow the above procedure for the data.img of the backup. Do the same as above, but navigate to the created data.img directory. In the app directory, you will find all the apps that were installed in that backup. You can copy the apks out of there and install them, or build a list, depending on what you wanted to do. Note that if you use a2sd, and moved apps to the sdcard, they will not be saved here. If you backed up the ext partition, it will be in a separate file named ext.tar. A tar file is different than the normal img files that are created in a backup. A tar file is basically a collection of files made into a "tarball" so that it can be easily stored, compressed, etc. in one file. If this is the case, and you want your apks, you don't need this script for that. You can untar the file by opening a terminal, and typing these commands:

cd /sdcard
mkdir ext_apps
cd ext_apps
tar xvf /sdcard/path/to/backup/ext.tar

Off that rabbit trail, there are still plenty of uses for extracting the data.img, such as:

3) if you need app data, you will find it in /data/data, normally, so if you follow the above procedure for the data.img, you will find it in data.img/data/. One such example could be if you forgot to backup your bookmarks. Most settings/history type things for the browser are stored in /data/data/com.android.browser/databases/browser.db, which is a sqlite file. It's a database, basically. So, if you extract your data.img from a nandroid backup, you *could* just copy this file out of there and replace your existing one with it. If you go that route, I would highly recommend you backup first. You could easily cause issues if you do this, especially if going between aosp and sense, and vice versa. That being said, it's easy to see what bookmarks you had set in the backed up ROM by typing this (rather lengthy) command from the command line:

sqlite3 /sdcard/nandroid_tmp/nameofbackup/data.img/data/com.android.browser/databases/browser.db "select * from bookmarks where bookmark = '1'"

That will return a list of bookmarks you had in the backed up ROM. This is just one such example. If you search for db files, you'll even find your SMS messages. This means if you forgot to backup your text messages, you don't need to restore a backup just get them. Go through this procedure, and you can get them.



NOTES:

I did my best to test this in a short amount of time. I tested it on CM7 and Mikfroyo 4.4, both of which had a2sd installed. All backups I tested were made with Amon RA. In theory, this should work with any ROM, whether a2sd is installed or not. All you need is the script itself, bash (normally installed with a2sd), and unyaffs, all of which are provided in the flashable zip in the event that you don't already have them. If you have CM7, you should already have unyaffs.

Also, this should work fine with both Clockwork and Amon RA nandroid backups. I don't use CW, so I only tested with RA. I know for a fact that the method used to make the backups is the same, but that doesn't change the fact that I didn't test it. If anyone using CW uses this and gets any errors, or simply isn't given a list of any backups, please let me know, along with the directory your backups are in, and I'll fix it.

One last thing - when I ran this, I got an I/O error, and a message that mkdir failed a couple of times. It only happened a few times, and always ran fine if I just reran the script. I'm tracking the issue down now, but just be warned.


If I forgot anything, I'll update this section. Otherwise, if you run into any errors or if this just doesn't work as advertised, please let me know, and provide the following details:

1) Error messages, if any
2) Current ROM
3) ROM of the backup (if you know)
4) Using bash or sh (if you don't know the answer to this, it's sh). This shouldn't matter, as the script will use bash, but still...
5) The recovery/version used to make the backup



LINK TO THE SCRIPT:

unandroid-signed.zip


Instructions for flashing:

1) Download the above file
2) Copy it to the root (top level) of your sdcard (or where ever you like to put your flashable zips)
3) Reboot into recovery
4) Select the option to flash a zip. You do not need to wipe cache/dalvik
5) Reboot once it's done flashing


UPDATE:

argedion has modified unandroid to support nandroid backups that include an ext backup in the form of a yaffs2 img. So, if you are using a recovery such as Amon Ra Style (which I'm told no longer packs the sd-ext image in a tar file, but in an ext.img file) you can now extract it with unandroid. Here is the new version:

unandroid2-signed

Follow the same steps to flash it. It will replace the existing version of unandroid if you have already flashed it.

Advertisements
akazabam is offline  
Last edited by akazabam; June 28th, 2012 at 02:30 PM.
Reply With Quote
The Following 15 Users Say Thank You to akazabam For This Useful Post:
9to5cynic (April 17th, 2011), andygu3 (July 14th, 2011), argedion (June 28th, 2012), ceabbott2 (April 18th, 2011), davvy1856 (July 12th, 2011), dkl1 (July 9th, 2012), dustwun77 (October 2nd, 2011), eggsack43 (July 17th, 2011), evomattnc (April 17th, 2011), farva (April 17th, 2011), Fenix23 (January 3rd, 2014), Matlock (April 17th, 2011), Mr. Ed (April 17th, 2011), ocnbrze (June 15th, 2011), Xtremedays (April 19th, 2011)
sponsored links
Old April 17th, 2011, 10:52 PM   #2 (permalink)
Senior Member
 
evomattnc's Avatar
 
Join Date: Feb 2011
Location: NC
Posts: 3,245
 
Device(s): EVO 4G Synergized HC style, Asus EEE Pad Transformer optimized Prime 1.5 style
Carrier: Not Provided

Thanks: 94
Thanked 536 Times in 473 Posts
Default

Thanks bud. Downloading now. This will actually help me a lot since my sd card crapped. I lost themed apps I had ripped out of roms. Now instead of endlessly searching the forums and finding them or restoring all my backups and ripping them again I can just use this. Great explanation as usual. I'll let you know how it goes when I get a chance to use it. Also great since I started doing my own themeing recently.
evomattnc is offline  
Reply With Quote
Old April 17th, 2011, 11:05 PM   #3 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

Great . Let me know how it goes, or if you run into any problems. I'd love to hear how this is being used.
akazabam is offline  
Reply With Quote
Old April 17th, 2011, 11:18 PM   #4 (permalink)
Senior Member
 
9to5cynic's Avatar
 
Join Date: Feb 2011
Location: /home/
Posts: 4,858
 
Device(s): Galaxy S3 (Verizon) Evo 4G - retired/rooted
Carrier: Verizon

Thanks: 3,066
Thanked 1,763 Times in 1,189 Posts
Send a message via AIM to 9to5cynic
Default

Great, can't wait to try it out.

I do, however, have a question. How would you go about checking the version from a linux desktop? Would it be just grepping the file build.prop after extracting the system.img like the tut you posted for windows?

I think I'll try that to see if I can get it. (Bookmarking this thread)
9to5cynic is offline  
Reply With Quote
Old April 17th, 2011, 11:25 PM   #5 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

Right, if you're using Linux, follow the steps for Windows, but skip the whole cywin thing. That's only necessary for running a Linux environment in Windows. You'll just need unyaffs, which you may or may not already have in your Linux distribution. Just create a directory to extract the contents to, cd to it, unyaffs the system.img file, then grep ro.build.description build.properties. That will return with the line that says what ROM it is. Basically, you have several options for how to do this. If you already have all your backups on your computer, it's faster to do it that way. If you don't, this script is faster.
akazabam is offline  
Reply With Quote
The Following User Says Thank You to akazabam For This Useful Post:
9to5cynic (April 17th, 2011)
Old April 17th, 2011, 11:27 PM   #6 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

Oh, and one thing I forgot to mention. Make sure you have at least 500 MB of free space on your sdcard before running this. I haven't put in any checks for that yet. I will later.
akazabam is offline  
Reply With Quote
Old April 17th, 2011, 11:39 PM   #7 (permalink)
Senior Member
 
Mr. Ed's Avatar
 
Join Date: Jun 2010
Location: Over Yonder
Posts: 6,675
 
Device(s): S3, Evo LTE,Galaxy Note, Skyrocket, Aria, Nook Color Lg thrill,HTC EVO 4g, HTC Inspire,S7 slim,Acer
Carrier: Not Provided

Thanks: 1,008
Thanked 1,467 Times in 989 Posts
Default

Complete badassery that you did this within work and the move to your new place ....top notch
__________________
I'm back....
Mr. Ed is offline  
Reply With Quote
Old April 17th, 2011, 11:39 PM   #8 (permalink)
Senior Member
 
9to5cynic's Avatar
 
Join Date: Feb 2011
Location: /home/
Posts: 4,858
 
Device(s): Galaxy S3 (Verizon) Evo 4G - retired/rooted
Carrier: Verizon

Thanks: 3,066
Thanked 1,763 Times in 1,189 Posts
Send a message via AIM to 9to5cynic
Default

Quote:
Originally Posted by akazabam View Post
Right, if you're using Linux, follow the steps for Windows, but skip the whole cywin thing. That's only necessary for running a Linux environment in Windows. You'll just need unyaffs, which you may or may not already have in your Linux distribution. Just create a directory to extract the contents to, cd to it, unyaffs the system.img file, then grep ro.build.description build.properties. That will return with the line that says what ROM it is. Basically, you have several options for how to do this. If you already have all your backups on your computer, it's faster to do it that way. If you don't, this script is faster.

Thanks a lot! Works great.
I was wonder though, if you happen to know the syntax for unyaffs? I can't find a help file or anything on it, it seems that it will extract it to your current location right?

Kind of a
Code:
cd /home/user/extractHere
Code:
/bin/unyaffs /home/user/evo/ROM1/system.img
right?

Can't wait to download that script tomorrow, it'd be nice to be able to check the few backups on my sdcard.
9to5cynic is offline  
Reply With Quote
Old April 17th, 2011, 11:43 PM   #9 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

Quote:
Originally Posted by Mr. Ed View Post
Complete badassery that you did this within work and the move to your new place ....top notch
lol, thanks. It's something I've been wanting to do for a while. I actually had some time this weekend to sit down and piece it together. Work is getting a bit crazier lately, so I won't have much time to post during the week.

Quote:
Originally Posted by 9to5cynic View Post
Thanks a lot! Works great.
I was wonder though, if you happen to know the syntax for unyaffs? I can't find a help file or anything on it, it seems that it will extract it to your current location right?

Kind of a
Code:
cd /home/user/extractHere
Code:
/bin/unyaffs /home/user/evo/ROM1/system.img
right?

Can't wait to download that script tomorrow, it'd be nice to be able to check the few backups on my sdcard.
Yep, that's exactly how it works .
akazabam is offline  
Reply With Quote
Old June 15th, 2011, 01:34 PM   #10 (permalink)
New Member
 
Join Date: Oct 2010
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am running decks and get this error:
I am using amon ra
snap20110615_115921.png

Does it have to do with this:
"Mount: not found." in CM7 off sdcard - CyanogenMod Forum

I couldn't get it to work on my pc either, could that be the reason.
iniblue is offline  
Reply With Quote
sponsored links
Old July 12th, 2011, 10:02 AM   #11 (permalink)
New Member
 
Join Date: Sep 2010
Posts: 13
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why won't it work? Installed the zip, made sure Terminal had superuser... I'm new to this and at a loss.

HTC Desire CDMA (Bravoc), CyanogenMod 7 nightly125, ClockwordMod.

thirdfloornorth is offline  
Reply With Quote
Old July 12th, 2011, 10:50 AM   #12 (permalink)
DON'T PANIC!!!!!!!!!
 
ocnbrze's Avatar
 
Join Date: May 2010
Location: los angeles
Gender: Male
Posts: 23,308
 
Device(s): Galaxy Note 3, HTC Evo 4g LTE(no longer have), HTC 3vo(no longer have), HTC EVO (not activated)
Carrier: Sprint

Thanks: 29,804
Thanked 14,302 Times in 9,161 Posts
ocnbrze@gmail.com
Default

Quote:
Originally Posted by thirdfloornorth View Post
Why won't it work? Installed the zip, made sure Terminal had superuser... I'm new to this and at a loss.

HTC Desire CDMA (Bravoc), CyanogenMod 7 nightly125, ClockwordMod.
well i think that this was written for the evo. not sure how different the scripting is between the two phones. i know that akazabam wrote this specifically for the evo.
__________________
“The Guide is definitive. Reality is frequently inaccurate.”.......Hitchhiker's Guide to the Universe
“I seldom end up where I wanted to go, but almost always end up where I need to be.”.......Douglas Adams
ocnbrze is offline  
Reply With Quote
Old July 12th, 2011, 10:41 PM   #13 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

Well, theoretically, it could be used on other phones, especially considering you're using CM7, which what I mainly tested it on (though it was on the Evo 4g, of course). The error you're getting means that it can't find the command you tried to run. If the zip ran without any errors, then likely it is there. From the terminal, type ls -l /system/bin/unandroid. If it says it can't find it, then it didn't flash successfully. I can't say how it will react on any other phone. If it does show up, then it's possible that you just don't have /system/bin/bash in your $PATH. I don't know if other phones use the same paths, exactly. If it does find it, you can just run the command with the whole path, like this:

/system/bin/unandroid

That should work. Assuming you can get it to execute, I still can't say how well it will work on another phone. I would mainly be worried about busybox version differences. It's worth a shot.



Oh, and sorry I haven't been around much...
akazabam is offline  
Reply With Quote
The Following User Says Thank You to akazabam For This Useful Post:
ocnbrze (July 12th, 2011)
Old July 12th, 2011, 11:46 PM   #14 (permalink)
DON'T PANIC!!!!!!!!!
 
ocnbrze's Avatar
 
Join Date: May 2010
Location: los angeles
Gender: Male
Posts: 23,308
 
Device(s): Galaxy Note 3, HTC Evo 4g LTE(no longer have), HTC 3vo(no longer have), HTC EVO (not activated)
Carrier: Sprint

Thanks: 29,804
Thanked 14,302 Times in 9,161 Posts
ocnbrze@gmail.com
Default

akazabam is back in the house. we missed ya. glad your alive and well.
ocnbrze is offline  
Reply With Quote
Old July 13th, 2011, 12:46 AM   #15 (permalink)
Senior Member
 
evomattnc's Avatar
 
Join Date: Feb 2011
Location: NC
Posts: 3,245
 
Device(s): EVO 4G Synergized HC style, Asus EEE Pad Transformer optimized Prime 1.5 style
Carrier: Not Provided

Thanks: 94
Thanked 536 Times in 473 Posts
Default

Quote:
Originally Posted by akazabam View Post
Oh, and sorry I haven't been around much...

Good to see you my friend. How are things with you? Anything new and note worthy?
evomattnc is offline  
Reply With Quote
Old July 13th, 2011, 11:56 AM   #16 (permalink)
Senior Member
 
Xtremedays's Avatar
 
Join Date: Apr 2010
Gender: Male
Posts: 2,514
 
Device(s): 2 SG3(rooted stock), 2 KF Reloaded CM9, HTC One X(unrooted), Nook Tablet(rooted), Nexus 7(unrooted)
Carrier: Sprint

Thanks: 374
Thanked 1,073 Times in 691 Posts
Default

Nice to see you pop in Akazabam. Hope everything is good.
Xtremedays is offline  
Reply With Quote
Old July 14th, 2011, 09:35 PM   #17 (permalink)
New Member
 
Join Date: Sep 2010
Posts: 13
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by akazabam View Post
Well, theoretically, it could be used on other phones, especially considering you're using CM7, which what I mainly tested it on (though it was on the Evo 4g, of course). The error you're getting means that it can't find the command you tried to run. If the zip ran without any errors, then likely it is there. From the terminal, type ls -l /system/bin/unandroid. If it says it can't find it, then it didn't flash successfully. I can't say how it will react on any other phone. If it does show up, then it's possible that you just don't have /system/bin/bash in your $PATH. I don't know if other phones use the same paths, exactly. If it does find it, you can just run the command with the whole path, like this:

/system/bin/unandroid

That should work. Assuming you can get it to execute, I still can't say how well it will work on another phone. I would mainly be worried about busybox version differences. It's worth a shot.



Oh, and sorry I haven't been around much...
It's saying not found :/ sad sad pandas.

Is there any way to compile unandroid to run on a Desire? Or a way to hook it up to my Linux box, run some sort of unandroid from there?

My BIG question though, is: why is it not possible to load a Nandroid backup in an emulator, and look through it that way?
thirdfloornorth is offline  
Last edited by thirdfloornorth; July 14th, 2011 at 09:40 PM.
Reply With Quote
Old July 14th, 2011, 11:34 PM   #18 (permalink)
Senior Member
 
9to5cynic's Avatar
 
Join Date: Feb 2011
Location: /home/
Posts: 4,858
 
Device(s): Galaxy S3 (Verizon) Evo 4G - retired/rooted
Carrier: Verizon

Thanks: 3,066
Thanked 1,763 Times in 1,189 Posts
Send a message via AIM to 9to5cynic
Default

Quote:
Originally Posted by thirdfloornorth View Post
It's saying not found :/ sad sad pandas.

Is there any way to compile unandroid to run on a Desire? Or a way to hook it up to my Linux box, run some sort of unandroid from there?

My BIG question though, is: why is it not possible to load a Nandroid backup in an emulator, and look through it that way?
Yup. It'll run from linux.

I believe the steps are right here, Read/Copy the contents of nandroid backups , and maybe the post below them. (8 and 9 if you'd rather just scroll up.)
EDIT: Also post 5 goes into it. And I think post five is just re-stating what was said above it...)
9to5cynic is offline  
Reply With Quote
Old June 24th, 2012, 01:31 PM   #19 (permalink)
Senior Member
 
Join Date: Jun 2010
Posts: 548
 
Device(s):
Carrier: Not Provided

Thanks: 295
Thanked 32 Times in 26 Posts
Default

OK so I'm not familiar with these programs or this process so I'm going to ask some questions that might seem obvious to others...

I'm trying to perform this process from my linux ubuntu computer.

1. I don't need the "unandroid zip"

So I moved the latest nandroid file to my computer. I opened it up and see 4 files.
boot.img
data.img
system.img
nandroid.md5

Do I need a program to view the contents of these? Which one will have everything I'm looking for?

Bookmarks
apps
app data
contacts that hadn't been synced with google lately.

Thanks
__________________
Device = Evo4G > Samsung G4
ROM = rooted stock for now
Kernel = stock for now
hortstu is offline  
Reply With Quote
Old June 24th, 2012, 01:40 PM   #20 (permalink)
Dr. Feelgood
 
Rxpert83's Avatar
 
Join Date: Aug 2011
Location: MN
Gender: Male
Posts: 17,270
 
Device(s): Nexus 7, Nexus 5
Carrier: Sprint

Thanks: 14,777
Thanked 12,566 Times in 7,249 Posts
Default

This process in this thread is all done from the phone.

You flash the unandroid zip and then Enter the commands listed in the op to extract the contents of the nandroid to your sd card. You will want to do both data for sure and probably system as well.

After that you can look through the nandroid on the computer to find what you need.
Rxpert83 is online now  
Reply With Quote
sponsored links
Old June 24th, 2012, 01:40 PM   #21 (permalink)
DON'T PANIC!!!!!!!!!
 
ocnbrze's Avatar
 
Join Date: May 2010
Location: los angeles
Gender: Male
Posts: 23,308
 
Device(s): Galaxy Note 3, HTC Evo 4g LTE(no longer have), HTC 3vo(no longer have), HTC EVO (not activated)
Carrier: Sprint

Thanks: 29,804
Thanked 14,302 Times in 9,161 Posts
ocnbrze@gmail.com
Default

ok bookmarks i'm not sure about but that will depend on the browser you use. but all of the apps and its data will be in the data.img. akazabam goes into detail about where all of it is in the potential use section.

your contacts should be under the system.img.

edit:correct rxpert the unandroid script is done on the phone, but i believe that you can open up a nandroid backup with a linux machine from what i understand of it.
ocnbrze is offline  
Last edited by ocnbrze; June 24th, 2012 at 01:42 PM.
Reply With Quote
The Following User Says Thank You to ocnbrze For This Useful Post:
Rxpert83 (June 24th, 2012)
Old June 24th, 2012, 02:34 PM   #22 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

The tool used here is called unyaffs. It's used to extract files out of yaffs images. The flashable zip here is just bash (since only some ROMs have it, and otherwise you'd have to use sh), the unyaffs binary, and a script (written in bash) to use unyaffs to extract the files from the images. The script part just makes in easier. Bash and the binary are all you'd need. Most Linux distributions are already going to have these.

1) If you pop open the zip file, you'll find the unandroid script. That script has some hard coded paths in it (bad me), so it won't work out of the box from your computer. That being said, the commands I used will work just fine. Put the img file of your choice in some directory. cd to that directory, then run unyaffs on it. It will extract the files there. That's all the script does.

2) Here's how you do it in Windows, if you care:

Check what version of nandroid b/u

3) Contacts and bookmarks are in database files. I've listed them in some thread(s) somewhere. If you can't find them, I can look for them later.
dustwun77, ocnbrze and argedion like this.
akazabam is offline  
Reply With Quote
The Following 6 Users Say Thank You to akazabam For This Useful Post:
9to5cynic (June 27th, 2012), argedion (June 24th, 2012), dustwun77 (June 24th, 2012), Mikestony (June 24th, 2012), ocnbrze (June 24th, 2012), Rxpert83 (June 24th, 2012)
Old June 24th, 2012, 02:57 PM   #23 (permalink)
~30% Carbon Black ±
 
Mikestony's Avatar
 
Join Date: Sep 2010
Location: N/W Indiana
Gender: Male
Posts: 22,236
 
Device(s): LG G3 (rooted)
Carrier: Verizon

Thanks: 17,802
Thanked 14,595 Times in 9,019 Posts
Default

Quote:
Originally Posted by akazabam View Post
The tool used here is called unyaffs. It's used to extract files out of yaffs images. The flashable zip here is just bash (since only some ROMs have it, and otherwise you'd have to use sh), the unyaffs binary, and a script (written in bash) to use unyaffs to extract the files from the images. The script part just makes in easier. Bash and the binary are all you'd need. Most Linux distributions are already going to have these.

1) If you pop open the zip file, you'll find the unandroid script. That script has some hard coded paths in it (bad me), so it won't work out of the box from your computer. That being said, the commands I used will work just fine. Put the img file of your choice in some directory. cd to that directory, then run unyaffs on it. It will extract the files there. That's all the script does.

2) Here's how you do it in Windows, if you care:

Check what version of nandroid b/u

3) Contacts and bookmarks are in database files. I've listed them in some thread(s) somewhere. If you can't find them, I can look for them later.
Holy freaking moses, batman. All of that went into orbit, over my little head!
But I thanked your post anyway because it will be useful to hortstu.
I'm sure glad this forum has people like you and many others who know this stuff and can share this with others. I really have ALOT to learn!
Mikestony is online now  
Reply With Quote
The Following 2 Users Say Thank You to Mikestony For This Useful Post:
dustwun77 (June 24th, 2012), ocnbrze (June 24th, 2012)
Old June 27th, 2012, 09:17 PM   #24 (permalink)
Senior Member
 
9to5cynic's Avatar
 
Join Date: Feb 2011
Location: /home/
Posts: 4,858
 
Device(s): Galaxy S3 (Verizon) Evo 4G - retired/rooted
Carrier: Verizon

Thanks: 3,066
Thanked 1,763 Times in 1,189 Posts
Send a message via AIM to 9to5cynic
Default

Quote:
Originally Posted by hortstu View Post
OK so I'm not familiar with these programs or this process so I'm going to ask some questions that might seem obvious to others...

I'm trying to perform this process from my linux ubuntu computer.

1. I don't need the "unandroid zip"

So I moved the latest nandroid file to my computer. I opened it up and see 4 files.
boot.img
data.img
system.img
nandroid.md5

Do I need a program to view the contents of these? Which one will have everything I'm looking for?

Bookmarks
apps
app data
contacts that hadn't been synced with google lately.

Thanks
Check out my post here: Read/Copy the contents of nandroid backups

Akaza confirmed that is how to do it w/o the script.

I just did the the other day (okay, like a month ago) when I was looking for a specific file, and it works great. If you are like me and are only after a couple of things, I find it best to extract it to /tmp, but I'm always using /tmp so maybe it's just me.

AND it's great to see akaza poking his head around here again!
9to5cynic is offline  
Reply With Quote
The Following 4 Users Say Thank You to 9to5cynic For This Useful Post:
argedion (June 28th, 2012), dustwun77 (June 27th, 2012), Mikestony (June 27th, 2012), ocnbrze (June 28th, 2012)
Old June 28th, 2012, 02:34 PM   #25 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2010
Location: Near Los Angeles
Posts: 4,418
 
Device(s): Samsung Galaxy Nexus
Carrier: Not Provided

Thanks: 101
Thanked 1,387 Times in 1,051 Posts
Default

argedion was kind enough to inform me that certain recoveries (such as Amon RA Style) are no longer putting the contents of the sd-ext partition in a tar file as a part of a nandroid backup, but are now packaging them in a yaffs2 img file, just like data and system. Not only that, but argedion has also modified unandroid to allow all three images to be extracted (data, system, and ext). He has packaged it in a flashable zip which you can grab in the original thread above.
ocnbrze and argedion like this.
akazabam is offline  
Reply With Quote
The Following 3 Users Say Thank You to akazabam For This Useful Post:
argedion (June 28th, 2012), dustwun77 (June 28th, 2012), ocnbrze (June 28th, 2012)
Old June 28th, 2012, 03:02 PM   #26 (permalink)
The TechnoFrog
 
argedion's Avatar
 
Join Date: Jun 2011
Location: The Severed Garden
Posts: 5,827
 
Device(s): Nexus 7 (2012)
Carrier: Not Provided

Thanks: 6,011
Thanked 5,575 Times in 2,572 Posts
Default

Right now for those who have twrp this will not work for you. twrp is using another format and I am not sure if it is a yaffs system or another system. by looks of it its another system. This will work for newer Amon RA Style Nandroids Thanks goes to akazabam the original author of the unandroid script for his guidance and help in putting this version together. I wrote some script but it was he who showed me how to get the zipped signed and all. Again thank you akazabam.
__________________
All My Links In one Convenient Place
Asking simple questions can keep us from doing dumb things.
argedion is online now  
Reply With Quote
The Following 2 Users Say Thank You to argedion For This Useful Post:
dustwun77 (June 28th, 2012), ocnbrze (June 28th, 2012)
Old July 8th, 2012, 09:21 PM   #27 (permalink)
The TechnoFrog
 
argedion's Avatar
 
Join Date: Jun 2011
Location: The Severed Garden
Posts: 5,827
 
Device(s): Nexus 7 (2012)
Carrier: Not Provided

Thanks: 6,011
Thanked 5,575 Times in 2,572 Posts
Default

As the hour draws near for my LTE EVO I'm very glad I got to work with akazabam on this. If you need to do some updating to this just give him a pm and he'll be more than glad to look at your proposal. He is a true gentleman and a scholar. Thank you again bro for allowing me to make a mode to your awesome app.May this not be the end of an era but the beginning of a once modest program that is ready for more.
ocnbrze likes this.
argedion is online now  
Reply With Quote
The Following 2 Users Say Thank You to argedion For This Useful Post:
9to5cynic (July 9th, 2012), ocnbrze (July 9th, 2012)
Reply


Go Back   Android Forums > Android Phones > HTC EVO 4G > EVO 4G - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:12 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.