1. Download This
2. Extract all the files to a new folder
3. Copy the system.img from a nandroid backup you want to extract!
4. Open a command prompt and cd to the folder containing thenandroid and to extracted files. If you are using Windows 7 you can press and hold shift key and click on right button! a menu will open click "open command prompt here"
5. Type unyaffs system.img
6. wait for sometime and wow u can see extracted system.img!
What about boot.img form nandroid
What about boot.img from nandroid
Thanks in advance!
use this one
http://forum.xda-developers.com/archive/index.php/t-443994.html
cheers
fonehackezhs said:
1. Download This
2. Extract all the files to a new folder
3. Copy the system.img from a nandroid backup you want to extract!
4. Open a command prompt and cd to the folder containing thenandroid and to extracted files. If you are using Windows 7 you can press and hold shift key and click on right button! a menu will open click "open command prompt here"
5. Type unyaffs system.img
6. wait for sometime and wow u can see extracted system.img!
Click to expand...
Click to collapse
how to repack it back? or we need to use android kitchen?
just 'mkyaffs'
here you can find a bit more complicated solution : http://code.google.com/p/yaffs2utils/
or you can simply use: http://www.androidzoom.com/android_applications/tools/yaffs-explorer_uqpd.html
andwise said:
just 'mkyaffs'
here you can find a bit more complicated solution : http://code.google.com/p/yaffs2utils/
or you can simply use: http://www.androidzoom.com/android_applications/tools/yaffs-explorer_uqpd.html
Click to expand...
Click to collapse
on windows 7 or our own phone?
fonehackezhs said:
1. Download This
2. Extract all the files to a new folder
3. Copy the system.img from a nandroid backup you want to extract!
4. Open a command prompt and cd to the folder containing thenandroid and to extracted files. If you are using Windows 7 you can press and hold shift key and click on right button! a menu will open click "open command prompt here"
5. Type unyaffs system.img
6. wait for sometime and wow u can see extracted system.img!
Click to expand...
Click to collapse
I tried this... but got an error:
c:\tools>unyaffs system.img
3 [main] unyaffs 7132 exception::handle: Exception: STATUS_ACCESS_VIOLATION
591 [main] unyaffs 7132 open_stackdumpfile: Dumping stack trace to unyaffs.exe.stackdump
c:\tools>
what should I do ?
AndroGio said:
I tried this... but got an error:
c:\tools>unyaffs system.img
3 [main] unyaffs 7132 exception::handle: Exception: STATUS_ACCESS_VIOLATION
591 [main] unyaffs 7132 open_stackdumpfile: Dumping stack trace to unyaffs.exe.stackdump
c:\tools>
what should I do ?
Click to expand...
Click to collapse
I received the same error.
i had the same problem. this attached unyaffs actually works. (at least for me)
how do you get the system.img though?
c:\android>unyaffs.exe system.img
6 [main] unyaffs 4292 _cygtls::handle_exceptions: Exception: STATUS_ACCESS
_VIOLATION
484 [main] unyaffs 4292 open_stackdumpfile: Dumping stack trace to unyaffs.e
xe.stackdump
490292 [main] unyaffs 4292 _cygtls::handle_exceptions: Exception: STATUS_ACCESS
_VIOLATION
512903 [main] unyaffs 4292 _cygtls::handle_exceptions: Error while dumping stat
e (probably corrupted stack)
still not worked.
Same problem here.
Thanks worked for my brother
..
DONT FORGET TO HIT THANKS.......
sorry to bump up an old thread but i have not found a newer one.
how to extract boot.img and system.img from my android? i can use the boot.img of my firmware update file but i have no system.img file yet. how can i get it? imgtool gives me an 'exec format error' and yaffs explorer is a POS, i get the same with root explorer and don't have to mess around in system settings to enable root access first.
help please! i would prefer to use linux btw.
Related
Hey XDA
This might be a dumb question, but i dont know where else to ask
I would like to try and make my own ROM for my magic, but i have no idea about where to start, so i was wondering if someone knew of a guide, or some other form of "getting startet" thingy?
And what about apps, how do you make them?
Does it require a Linux machine, or can it be done in windows?
Per
I'm interested in this as well , guys nobody wants to share with us your knowledge??
I too would like to know.
bump
I would like to know also. A quick guide or write-up would be supper nice.
Not to burst anyone's bubble but I seriously doubt a quick write-up would explain the steps on to creating your own ROM or how to write apps. If you really want to learn, I would suggest you take some programing classes at your local community college.
cptandroid said:
Not to burst anyone's bubble but I seriously doubt a quick write-up would explain the steps on to creating your own ROM or how to write apps. If you really want to learn, I would suggest you take some programing classes at your local community college.
Click to expand...
Click to collapse
A quick write up doesn't explain it, but equally going to college isn't applicable to rom cooking either.
All the information you need is on the Internet, have a look in this link where the basics are explained, and use google to fill in the blanks ...
http://www.johandekoning.nl/index.php/2009/06/07/building-android-15-build-environment/
The documentation in ASOP recommends Ubuntu for your dev machine (http://source.android.com/download) so familiarity with Linux is essential, also knowing how to use git will save you some time.
Also use the resources in the Dream section in this site. It's been around much longer than the Magic and most dev topics are already covered in a lot more detail than in Sapphire rom development. Above all I think you need a lot of time on your hands and understanding wifes/girlfriends etc as a lot of reading is necessary!
You basically need a Linux distro to be able to do the most modding. Here are the port tools:
http://www.4shared.com/file/122118622/fd190fe1/PortTools.html
Here's a nice quide that you can use as reference:
1. Download the original Nandroid backup of the Rogers-Wiped from Skittleguy (http://forum.xda-developers.com/showpost.php?p=4029461&postcount=4).
2. Unzip Rogers-Wiped.zip and move boot.img to a directory called "Org".
3. Download nk02ion_r4_LITE-signed.zip and upzip it to a directory called "nk02".
4. Move boot.img out of the nk02ion_r4_LITE-signed directory into a directory called "temp".
5. Open your Terminal window and navigate to your "temp" directory.
6. Unpack the boot image inside the "temp" directory :
Execute : $unpack-H.pl boot.img
This should give you 2 new files : boot.img-kernel and boot-img-ramdisk.gz
7. Remove boot.img and boot.img-kernel from the "temp" directory by doing :
Execute : $rm boot.img
Execute : $rm boot.img-kernel
You should now have only one file called boot.img-ramdisk.gz in your temp directory.
8. Navigate to the "org" directory.
9. Unpack the boot image inside the "org" folder :
Execute : $unpack-H.pl boot.img
This should give you 2 new files : boot.img-kernel and boot-img-ramdisk.gz
10. Move the boot.img-kernel file from the "org" directory to the "temp" directory.
Execute : $mv boot.img-kernel ../temp/
11. Remove the "org" directory
12. Navigate to the "temp" direcory
You should now have 2 files inside the "temp" directory, boot.img-kernel and boot.img-ramdisk.gz
13. Create a directory called boot.img-ramdisk inside the "temp" directory :
Execute : $mkdir boot.img-ramdisk
14. Move inside the newly created boot.img-ramdisk directory :
Execute : $cd boot.img-ramdisk
14. Unzip the boot.img-ramdisk.gz file :
Execute : $gunzip -c ../boot.img-ramdisk.gz | cpio -i
15. Check that the ramdisk is unpacked :
Execute : $ls -l
You should now see a bunch of files
16. Remove the boot.img-ramdisk.gz file inside the boot.img-ramdisk directory :
Execute : $rm boot.img-ramdisk.gz
17. Navigate to the temp folder and also delete the boot.img-ramdisk.gz file :
Execute : $rm boot.img-ramdisk.gz
You should now have 1 file called boot.img-kernel and 1 directory called boot.img-ramdisk inside the "temp" folder
18. Repack the kernel and ramdisk to a boot.img file :
Execute : $repack-H.pl boot.img-kernel boot.img-ramdisk boot.img
You should now have a new boot.img inside the "temp" directory.
19. Move the boot.img file to the nk02 directory :
Execute : $mv boot.img ../nk02/
20. Remove the "temp" folder.
21. Navigate to the nk02 folder and check that you have 1 boot.img file and 2 directories (META-INF and system)
22. Zip the boot.img and the 2 directories into an nk02.zip file
Execute : $zip -r nk02.zip *
23. Sign the nk02.zip file :
Execute : $java -jar signapk.jar testkey.x509.pem testkey.pk8 nk02.zip update.zip
24. Push update.zip to your SDcard :
Execute : adb push update.zip /sdcard/update.zip
25. Boot the device in fastboot mode.
27. $fastboot boot recovery-RAv1.0H.img
28. Select "Wipe data/factory reset"
29. Select "Apply sdcard:update.zip"
30. Select "Reboot system now"
31. Enjoy nk02ion_r4_LITE on your HTC branded Magic.
Click to expand...
Click to collapse
The above guide shows you how to modify the boot.img and how to sign the updates. That's a good start...
ok this is a dumb question i imagine but how to i sign a zip file? i have already made my rom but it wont work because it says its not signed
thejesster said:
ok this is a dumb question i imagine but how to i sign a zip file? i have already made my rom but it wont work because it says its not signed
Click to expand...
Click to collapse
Here is the thread where signing is explained.
I am no expert, but I managed to use this to modify other ROM's (Adding wallpaper, ringtones and removing apps etc.)
Signing made easy thread
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
There is a Perl script which can unpack boot and recovery (CG35 & CG47) in this thread: http://forum.xda-developers.com/showthread.php?t=443994
Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
CG64.smg & CG65.smg: partition tables that you can open using fdisk/sfdisk
CG33.smg is a CDROM ISO file!
iirc one or two of them are the splash image (not 100% sure now)
Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.
rachit2588 said:
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.
Click to expand...
Click to collapse
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows
^very good idea
danimagrin said:
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows
Click to expand...
Click to collapse
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??
rachit2588 said:
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??
Click to expand...
Click to collapse
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.
danimagrin said:
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.
Click to expand...
Click to collapse
with mkyaffs2image its jus showing me a cmd windows for some less thn 1 sec and its jus goes away...please upload the version you are using...also let me know if it needs any prerequisite software to be installed.
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
oh , ok.. its working..thanks
danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
ok last doubt...after creating system.img can it be restored via custom recovery..??
how to add md5 check sums for that so that custom recovery can identify as proper nandorid..!!??
rachit2588 said:
oh , ok.. its working..thanks
Click to expand...
Click to collapse
You welcome!
Sure you can use it with nandroid, you must download md5sum.exe, place it together with mkyaffs2image, after you used mkyaffs2image then type "md5sum system.img" and it will generate checksum. Create a file called "nandroid.md5" and paste what md5sum returned. You can open a nandroid.md5 file of another backup and you'll understand better how it's done..
excellent..i got it
@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..
rachit2588 said:
@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..
Click to expand...
Click to collapse
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...
danimagrin said:
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...
Click to expand...
Click to collapse
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker
rachit2588 said:
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker
Click to expand...
Click to collapse
I'll test it as soon as I get home and then I tell you!
Ok, so I know many users are looking forward to create a custom rom. Where are you gonna get the system files from? Sure you can get it from a CWM backup. You can also extract the system files and the respective kernel from PDA.tar. Sure everyone knows it's in there but very few exactly know how to extract them. The system files are in the file "system.img".
So the 1st step is to open the PDA.tar using 7-zip and extract the system.img to a particular folder.
Download sgs2toext4.jar from attachment. It's a .jar file created by dphrozen to convert .img files to .ext4.img. Place that file anywhere in C:\ and then open the Command Prompt. In the command prompt, set the directory to the folder where sgs2toext4.jar is placed. Then type this command :-
Code:
java -jar sgs2toext4.jar
A window will open which is gonna ask you to drop the .img file in it. Simply drag the system.img to the window and the process of converting it to system.ext4.img will start. After the process is complete, you'll find system.ext4.img file in the same folder where your system.img file was placed.
Now, download Linux Reader. Install and then open it. At top left, go to Drives -> Mount Image. A window will open up. Browse to system.ext4.img and select it.
That's it! Now you can view all the system files. Export all of them to a particular folder. After exporting, you'll see an extension .efs.ntfs at the end of each file. Just delete that extension and you're good to go!
Is there a way to mount or extract the files within the stock system.img (and other img files)?
i was trying to do this a few days ago and i found that somehow the system.img from the firmware was protected, i tried lots of programs but none worked, all marked an error. so i dont know what to do next.
Well, I ended up flashing the system.img file and then rebooting immediately into TRWP and taking a backup. From that I was able to copy it down and extract the contents. Kind of roundabout but it worked. If someone has a more direct method I'd like to know how it can be done.
Download ImgExtractor 1.3.4 by And_PDA (Program page here). To use, open a command prompt in the directory where ImgExtractor.exe and system.img are, and enter:
Code:
ImgExtractor.exe system.img System -i
where system.img is the file you're extracting and System is the folder it will extract all of the files to (it will create one if it doesn't already exist). The "-i" is optional, but it shows the individual files as they are extracted (verbose output), and is more fun to look at than an idle window.
See the readme or double click on ImgExtractor.exe for more usage info.
EDIT: Download is now linked to my DropBox and added with readme below.
Summersett said:
Download ImgExtractor 1.3.4 by And_PDA (Program page here). To use, open a command prompt in the directory where ImgExtractor.exe and system.img are, and enter:
Code:
ImgExtractor.exe system.img System -i
where system.img is the file you're extracting and System is the folder it will extract all of the files to (it will create one if it doesn't already exist). The "-i" is optional, but it shows the individual files as they are extracted (verbose output), and is more fun to look at than an idle window.
See the readme or double click on ImgExtractor.exe for more usage info.
EDIT: Download is now linked to my DropBox and added with readme below.
Click to expand...
Click to collapse
]
that worked perfectly, i'll attach that file because the russian page 404'd it, so i had to find it somewhere else.
its attached if anyone want it. thanks!
I can't extract S7 system.img using ImgExtractor 1.3.7.
When i try to extract S7 system.img using ImgExtractor 1.3.7 it freezes.
I waited 10~15 minutes but nothing happened.
How can i extract S7 system.img?
PC Specification
Acer Aspire V5-132
Windows 10 Home 64-bit Build 10586.318 (Release Preview Ring)
Intel Celeron 1019Y
Intel HD Graphics 3rd Gen Driver 10.18.10.4425
DirectX 11
RAM 6GB
HGST HDD 500GB
Use SVAImgUnpack: https://www.androidfilehost.com/?fid=24459283995309116 for convert system.img to system.ext4.img
Then use ext2explore for extract the ext4.img
garf02 said:
Use SVAImgUnpack: https://www.androidfilehost.com/?fid=24459283995309116 for convert system.img to system.ext4.img
Then use ext2explore for extract the ext4.img
Click to expand...
Click to collapse
how to used this, i got error
phonglhie said:
how to used this, i got error
Click to expand...
Click to collapse
YOu get that error because you shouldn't execute directly SVA:
open a command prompt in that folder(shift+right click and click open command window here) and in command prompt type:
SVAImgUnpack "path to the system.img" "path to the tar" for example: "SVAImgUnpack C:\Users\YourUsername\Desktop\SVAImgUnpack\system. img C:\Users\YourUsername\Desktop\SVAImgUnpack\SystemimgS7.tar"...when it has finished extract the tar