Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Phones > LG Ally > Ally - All Things Root



Reply
 
LinkBack Thread Tools
Old July 20th, 2011, 07:22 PM   #1 (permalink)
Member
 
AndroidKris's Avatar
 
Join Date: Dec 2010
Posts: 292
 
Device(s): Rooted Galaxy Nexus | Liquid ICS 1.35 Nook Color | ICS cm9 nightly kang
Thanks: 56
Thanked 56 Times in 34 Posts
amberoze@gmail.com
Default [How To] unyaffs for decompiling nandroid (and other) .img files

I'm posting this here because I don't know where else to post it. I've googled all over the interwebz and found not one single "guide" to unyaffs. It's nothing fancy, just bare bones, step by step instructions based on my experience. Please feel free to correct or add to my guide and I will edit this post with the info.

These directions are only for "unyaffs" since I have had no reason to use "yaffs". If anyone has info on "yaffs" post it here and I'll check into it...possibly add it to this guide.

One more thing before I start. These instructions are for linux users, since I did it running Xubuntu 10.10, and I have no clue how to make it work for windows (I haven't touched windows in quite a while). If someone has useful input for windows instructions, post away.

Here goes.
1) go to unyaffs - unyaffs is a program to extract files from a yaffs image - Google Project Hosting
2) click the "download" link at the top
3) download all three "unyaffs", "unyaffs.c", and "unyaffs.h"
4) I put them in my /android-sdk-linux/tools directory, but you can put them wherever you want.
5)now open a terminal and cd to your directory containing the three "unyaffs" files
6) type "gcc -o unyaffs unyaffs.c"
7)once it's done doing it's thing, type "sudo chmod +x /complete/directory/path/to/unyaffs"
Now comes the tricky part
8)In terminal type "cd /complete/drectory/path/to/unyaffs"
9)Minimize your terminal and open your preferred file manager and browse to where your "unyaffs" file is, then copy and paste it in the same directory as your nandroid .img files
(Now "unyaffs" and your .img files are located in the same folder)
10)bring up the terminal again and (since you've already cd'd to the correct directory) type "./unyaffs system.img" (or data.img, or cache.img)


Notes:
1) this will decompile everything within the .img file directly to the same directory that unyaffs and the .img file are located.
2) This will only work on system.img, data.img, and cache.img. It will tell you "broken image file" if you try to use it on a recovery.img, and I have no idea what it will do to a boot.img.
3) You MUST make sure that your .img file and a copy of the unyaffs file are in the EXACT SAME directory.

Thank you for reading. Your feedback is most welcome and greatly appreciated. As I have said above, feel free to post additions, corrections, or alternatives. Hell, you can even let me know if I spelled something incorrectly or wrote a sentence grammatically incorrect.

Have a nice day.

AndroidKris is online now  
Reply With Quote
The Following 3 Users Say Thank You to AndroidKris For This Useful Post:
death2all110 (July 21st, 2011), knight47 (April 13th, 2012), ninadchaudhari (February 5th, 2012)
Sponsors
Old August 4th, 2011, 08:36 PM   #2 (permalink)
ROM Developer
 
savoxis's Avatar
 
Join Date: Aug 2010
Location: Pacific NW
Posts: 790
 
Device(s): HTC Incredible,HTC Evo 4G,LG Ally,Huawei Ascend, HTC Incredible 2, Galaxy Tab, EVO Shift
Thanks: 247
Thanked 684 Times in 260 Posts
Send a message via MSN to savoxis Send a message via Skype™ to savoxis savoxis@gmail.com
Default

Awesome guide, I feel this deserves a bump.

I have been using unyaffs for a few months now and it makes things SO much easier.


Here is another little gem to add:

After you compile unyaffs with gcc you can copy it to your bin directory like so
Code:
sudo cp unyaffs /usr/bin/ && sudo chmod 777 /usr/bin/unyaffs
If for some reason your version of linux doesn't have a usr/bin you can cp it to /bin/ just change the command accordingly


After doing this you can run unyaffs from ANYWHERE in the terminal without typing the whole path, I do this all the time with little scripts I write for signing apks, building, etc I put them in a folder than symlink them to /usr/bin/ makes life much easier
__________________
Come join us on IRC!
The mAndroid Connection
HTC Incredible 2 (2.3.7) TSM Pool Party
There Aint No Such Thing As A Free Lunch
Donate

savoxis is offline  
Reply With Quote
The Following 3 Users Say Thank You to savoxis For This Useful Post:
AndroidKris (August 5th, 2011), knight47 (April 13th, 2012), ShawnMichael (February 6th, 2012)
Old February 5th, 2012, 08:11 PM   #3 (permalink)
Green Dude in Action !
 
ninadchaudhari's Avatar
 
Join Date: Nov 2011
Location: 127.0.0.1
Posts: 1,445
 
Device(s): HTC Desire, Micromax A70, Micromax W900, Sony Ericsson Xperia X10, .
Thanks: 358
Thanked 412 Times in 247 Posts
Send a message via MSN to ninadchaudhari
Default

Guys anyway to recompile it ?
__________________
ya and more thing , you are reading my signature...
signup for free bonus of Minus cloud storage of 11GB from : Minus .
And the most important stuff here :Site Rules
Piracy Hurts ...
ninadchaudhari is offline  
Reply With Quote
Old February 9th, 2012, 06:38 AM   #4 (permalink)
ROM Developer
 
Join Date: Apr 2010
Posts: 477
 
Device(s):
Thanks: 9
Thanked 770 Times in 168 Posts
Default

Here are the ones compiled for your phone. These are used in my recovery and are compiled for arch (armv6-vfp)

https://github.com/getitnowmarketing/htc-emmc-ra-recovery/tree/emmc_nand_merged/pre-build/sbin/armv6-vfp

FYI to make a good working .img with mkyaffs2image the file system needs to NOT be in use.
__________________
PayPal USD Donations
getitnowmarketing is offline  
Reply With Quote
Reply

LG Ally
Current Rating:
Rate this Phone:

 The LG Ally was one of the first Android handsets from the Korean manufacturer to see a US release. The QWERTY slider came to Verizon in the spring of 2010 as a mid-range smartphone geared towards those looking for a solid media and messaging... Read More


Bookmarks


Go Back   Android Forums > Android Phones > LG Ally > Ally - All Things Root User CP
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 03:58 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo