[Q] Create a Flashable Zip Out Of a Nandroid Backup of /System - Galaxy Ace S5830i Q&A, Help & Troubleshooting

Hi, I've gathered some resources for creating my Touchwiz 4.0 rom but I need to know how to make a flashable zip from a nandroid backup of /system.
How would I do this?
Another question while I'm here.. I get this error when using kitchen: Imgur Link , any suggestions?

DamnTarget said:
Hi, I've gathered some resources for creating my Touchwiz 4.0 rom but I need to know how to make a flashable zip from a nandroid backup of /system.
How would I do this?
Another question while I'm here.. I get this error when using kitchen: Imgur Link , any suggestions?
Click to expand...
Click to collapse
You don't need nandroid backup
Just need /system partition
Connect your device to PC
Go to platform-tools folders where you have installed adb.
Make a folder system in this folder.
Open Command Prompt in that folder and type
Code:
adb pull /system system
It will take some time.
When it's completed. What you have to do is replace the system folder in any ROMs flashable zip and modify it's updater-script to suit your needs

Thanks for taking the time to answer my question!

Related

[How-To] Extracting/Accessing Recovery/Nandroid backup (.img) files

Actually this info is already present on other device forums but is unavailable @X10 forum. So I thought I will put it up here,
* If the MODS feel this thread is redundant please delete it *
Nandroid backups files (.img) created via Recovery are yaffs file system images. A tool called Unyaffs can be used to extract the files within these images (data.img / cache.img / system.img).
linux users can d/l the source code from: http://code.google.com/p/unyaffs/downloads/list
and compile using:
Code:
gcc -o unyaffs unyaffs.c
for windows users:
you can download the attached rar file and extract it...
usage:
1) copy the compiled unyaffs file/exe (along with cygwin1.dll) to a new directory
2) copy the nandroid backup image (data.img / cache.img / system.img) into that directory
3) go to terminal/command prompt, change directory to where those files are and execute:
e.g. for system.img
Code:
unyaffs system.img
the contents of the .img file will be extracted in that directory
there is also an app in the market YaffsExpert with which you can extract the .img files using phone
Inspired from:
guide at EVO 4G forums http://forum.xda-developers.com/showthread.php?t=890508
Extracting files from a nandroid backup using unyaffs http://bit.ly/gTLFkc
How to extract the files of Nandroid backup on Windows @ androidforums.com http://bit.ly/fT7udF
xlnt
+1 nice post! very useful info for any Android owner, anyone ever backed up with nandroid or xRecovery and felt like they forgot something from one of their earlier backups...? This is what you need
Pretty nice and useful. I actually was tinkering around with these files the other day as I contemplated running either Z's Froyo Beta 4 OR J's GB
Thank you. It is very useful.
Great topic! Thanks
now i don't have to google for this thanx...
How To Repack Files?
Will this check for the md5?
velnens123 said:
How To Repack Files?
Click to expand...
Click to collapse
i didnt follow...
do u want to place/add/remove files to make ur own yaffs img?
mohdameer said:
Will this check for the md5?
Click to expand...
Click to collapse
this will just extract the contents of nandroid/recovery backups...
u can use md5summer or similar progs to check md5 sums..
i searched a tool like this... thank for this HOW TO!
DooMLoRD said:
this will just extract the contents of nandroid/recovery backups...
u can use md5summer or similar progs to check md5 sums..
Click to expand...
Click to collapse
thanks. the reason i asked was that, everytime i try any rom from z, i get md5 error while restoring old backup. after extensive search in this forum and loosing my sms messages, i found a way. using adb shell, then using "busybox md5sum" i was able to generate the correct md5 hashes or whatever its called then restore the xrecovery backups. if i use the md5sum directly from the adb shell then xrecovery gives me mismatch.
may be z can look into this. i beleive the md5 mismatches are caused due to different md5sum command in adb shell and in busybox.
mohdameer said:
thanks. the reason i asked was that, everytime i try any rom from z, i get md5 error while restoring old backup. after extensive search in this forum and loosing my sms messages, i found a way. using adb shell, then using "busybox md5sum" i was able to generate the correct md5 hashes or whatever its called then restore the xrecovery backups. if i use the md5sum directly from the adb shell then xrecovery gives me mismatch.
may be z can look into this. i beleive the md5 mismatches are caused due to different md5sum command in adb shell and in busybox.
Click to expand...
Click to collapse
no need... the problem is with blanks /spaces " " in ur file name/ folder name... check that... if u have renamed the backups (folder name) and have space in it u will get md5 error... spaces in folder names are not supported...
no didnt change a single thing. even the filename which is the default timestamp.
Which version of recovery is that? Sounds maybe messed up. Using latest version helps.. just a thought
mohdameer said:
no didnt change a single thing. even the filename which is the default timestamp.
Click to expand...
Click to collapse
dude thanks a lot.it was useful
MrHassell said:
Which version of recovery is that? Sounds maybe messed up. Using latest version helps.. just a thought
Click to expand...
Click to collapse
i am using the latest one.
mohdameer said:
i am using the latest one.
Click to expand...
Click to collapse
xRecovery v0.3 Recovery
or
FreeXperia Recovery
DooMLoRD said:
xRecovery v0.3 Recovery
or
FreeXperia Recovery
Click to expand...
Click to collapse
xRecovery v0.3 Recovery
i didnt knew there was a different freexperia one.
i downloaded from z xrecovery thread , the unified one.
sorry if i am hijacking this thread in wrong direction. i found the solution as i mentioned earlier.
DooMLoRD said:
Actually this info is already present on other device forums but is unavailable @X10 forum. So I thought I will put it up here,
* If the MODS feel this thread is redundant please delete it *
Nandroid backups files (.img) created via Recovery are yaffs file system images. A tool called Unyaffs can be used to extract the files within these images (data.img / cache.img / system.img).
linux users can d/l the source code from: http://code.google.com/p/unyaffs/downloads/list
and compile using:
Code:
gcc -o unyaffs unyaffs.c
for windows users:
you can download the attached rar file and extract it...
usage:
1) copy the compiled unyaffs file/exe (along with cygwin1.dll) to a new directory
2) copy the nandroid backup image (data.img / cache.img / system.img) into that directory
3) go to terminal/command prompt, change directory to where those files are and execute:
e.g. for system.img
Code:
unyaffs system.img
the contents of the .img file will be extracted in that directory
there is also an app in the market YaffsExpert with which you can extract the .img files using phone
Inspired from:
guide at EVO 4G forums http://forum.xda-developers.com/showthread.php?t=890508
Extracting files from a nandroid backup using unyaffs http://bit.ly/gTLFkc
How to extract the files of Nandroid backup on Windows @ androidforums.com http://bit.ly/fT7udF
Click to expand...
Click to collapse
Thank you very much!

[Q] How to make an x-recovery zip off my rom

I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
You can create a nandroid backup instead using Backup and Restore in xRecovery
Titanium Backup for single files.
You can also grab the files that you need to push as an update via Titanium backup. It creates an update.zip with a few files inside that you can extract to another phone if you like...
Nandroid backups are made with xRecovery for the Xperia models. It will give you three files and a checksum file, these can be added to a zip file if you like and restored using xRecovery.
I've found a good article on XDA located here on the subject. It's not specific to the X10 or Xperia models but you might find it worth reading
benz0076 said:
I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
Click to expand...
Click to collapse
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
GreatBigDog said:
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
Click to expand...
Click to collapse
Thanks i am going to try this and will let you know if it works..
Sent from my X10i using XDA App
Zip for xrecovery
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
CAYCE_VII said:
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
Click to expand...
Click to collapse
Follow this thread... http://forum.xda-developers.com/showthread.php?t=714288

Making CWM flashable files

I would like learning to make flashable files for executing various tasks.
For example:
- to move some files from for example sdcard to system directory and rewrite existing one
- to execute already made .zip file
And all that in one file...
Can you point me some good resources for this, and everything needed to know...
Thanks
TwinHeadedEagle said:
I would like learning to make flashable files for executing various tasks.
For example:
- to move some files from for example sdcard to system directory and rewrite existing one
- to execute already made .zip file
And all that in one file...
Can you point me some good resources for this, and everything needed to know...
Thanks
Click to expand...
Click to collapse
Here you go:
- [GUIDE] how to make a flashable package (update.zip)
- [GUIDE] How to make a cwm recovery flashable zip
And there should be even more resources. Use a Google search.

Custom ROM for new device

Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda
Dantenas said:
Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda
Click to expand...
Click to collapse
Since you are a beginner to ROM development, I would recommend the use of dsixda's Android kitchen, which you probably have downloaded already. If not use this link
http://forum.xda-developers.com/showthread.php?t=633246
Follow these steps to obtain the file structure and Meta-Inf folder for your custom rom.
1. Open the folder where you have placed the kitchen.
2. You will find a folder called original_update.
3. Open that folder and copy your boot.img and system.img files into it. ( In your case it is boot-sign.img and system-sign.img. Rename those files into boot.img and system.img and place them in the folder )
4. Now open the kitchen. ( Refer the above link to know how to do it )
5. You will find " 1. Set up working folder from ROM " option under Main Menu.
6. Type 1 and you will be directed to another menu. Click Enter.
7. Select your boot.img and system.img from the menu.
8. Now follow the instructions that appear on the screen.
9. When you successfully complete the steps, you will have the required Working folder, with boot.img, system folder and Meta-Inf folder, which will contain the updater-script (It will be automatically generated)
All the best. :good:
Hit Thanks if this helped you... PM me if you need further help or search the forum for detailed instructions.
Thanks, this helped me, but I still can't create ROM.
I encountered a problem with kitchen:
Code:
Available ROMs:
(1) system.img and boot.img
Enter selection number (default=1, cancel=0, r=refresh):
Found original_update/system.img
Found original_update/boot.img
The new working folder will be named WORKING_061614_070841
Change the name (y/n)? (default: n):
Creating working folder WORKING_061614_070841 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
NON-YAFFS/NON-TAR FILE FORMAT DETECTED IN ROM
Mounting system.img to loopback device and then extracting files ...
Error: Unable to mount system.img
Error: No /system/framework folder found!
Press Enter to continue
This creates my missing update-script and boot.img, but system folder is empty.
Would it be a good idea to extract all system files from device and attempt to create ROM with them, and this update-script, or is there something I could do with system.img to make it extract?
Try this
Don't worry. There's always an alternative. Try this simple method.
1. Boot into CWM (Clockwork Mod) Recovery. (I'm pretty sure you know how to do it, if not, you can feel free to search the forum)
2. Choose Backup and Restore.
3. Make a backup in your external sdcard.
4. Now boot normally, open your external sdcard. You will find a folder called clockworkmod. Copy that folder to your PC.
5. Inside that folder, you will find the backup.
6. Now, copy boot.img and system.ext4.tar.a to your original_update folder of the kitchen.
7. Warning! Do not copy system.ext4.tar, only copy system.ext4.tar.a
8. Once you have copied these two files, rename system.ext4.tar.a into system.ext4.tar
9. Now, open android kitchen and follow the exact same steps as you did before.
10. When you choose the available rom, you will find the screen as below.
Code:
Available Roms:
(1) system.ext4.tar and boot.img
11. Choose it and follow the instructions. You will have your required working folder.
Try this and let me know if you still face any issues. :good:
I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?
Dantenas said:
I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?
Click to expand...
Click to collapse
I'm sorry my friend, even if you create your own ROM, you require either one of them to flash the ROM to your device. Seeing you so keen on developing the rom, try to use any yaffs tool to create your system.img from extracted system folder. You may refer this thread.
http://forum.xda-developers.com/showthread.php?t=1645412

from Online Nandroid (CWM) to flash-able zip for Odin, need Meta-inf folder

After a failed online nandroid backup recovery I just shake my head.... not again. Don't want to flash stock rom, root, custom recovery flash path again!
So, I really like to create a flashable rom from my old backup. I just lack the meta-inf.
All these make flashable threads say get the meta-inf folder from any rom. I don't think that it is THAT easy.
(I tried a Meta-inf from a custom rom
http://forum.xda-developers.com/galaxy-s5/development/rom-noble-rom-t3403867/page19#post69117710
, but during zipping I get an error that it could not create something....)
Where can I get a working meta-inf file for Samsung S5 G901F, that I do not need to alter or just works?
Thanks you very much.

Categories

Resources