How to make a CWM file - Captivate General

Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad

Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.

studacris said:
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
Click to expand...
Click to collapse
but your update-script has to match what you are flashing via cwm. if you take a rom zip and just pop in a few files in place of the whole rom structures, your flash will fail because your update-script is looking for specific structures.

Oxicottin said:
Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Click to expand...
Click to collapse
One way would be to use: Update Zip creator/modifier (Requires Windows)

yeah it would be bad mojo if you used a wipe rom zips META INFO to make an update zip.....

Thanks a million everyone......

Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar

modest_mandroid said:
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
Click to expand...
Click to collapse
Is there a way from the CWM interface to do the same with a backup you create? I noticed backups are not in the same format, they are usually .img, .tar, and an md5 file?

Related

How to turn an RUU into a flashable ROM

I'm sorry to say I have no idea but I'm now determined to learn how and I think I'll start with a linux partition.
Anyone care to join me?
I think the Avabox that avaluanchemods posted up included the files to pull out the files from the .img, after that wouldn't it be just like modifying another ROM (with a lot more to mod, of course, to gain root, etc.)?
danaff37 said:
I think the Avabox that avaluanchemods posted up included the files to pull out the files from the .img, after that wouldn't it be just like modifying another ROM (with a lot more to mod, of course, to gain root, etc.)?
Click to expand...
Click to collapse
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
regaw_leinad said:
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
Click to expand...
Click to collapse
Hahaha yeah, getting the images from the ruu is a blast!
u guys want the new sprint ruu turned into a flashable update.zip? isn't that what damages 2.06 basically is? if not i'll do it for you.
I think it's really more that they wanna learn how. Anyone down to throw out some pointers?? I'd be interested to learn too
I was actually just looking into pulling the files from the ruu myself.
extract the exe file. unyaffs the system.img. make an update-script in META-INF/com/google/android/. zip the boot.img META-INF/ folder, and system/ folder and sign it. nothing more to it. lol
zenulator said:
u guys want the new sprint ruu turned into a flashable update.zip? isn't that what damages 2.06 basically is? if not i'll do it for you.
Click to expand...
Click to collapse
well, well howdy stranger! zen you were a great dev on the vogue/android...we need you here my man!
fixxxer2008 said:
well, well howdy stranger! zen you were a great dev on the vogue/android...we need you here my man!
Click to expand...
Click to collapse
this communtiy is a little crazy for my taste. but darchstar answered the question.
http://code.google.com/p/zen-droid/downloads/list
this is a link to the files i use. you must have linux installed to use them as well as pearl which should be installed on most distros. you'll prob have to chmod them executable if you download them.
any questions post them and i'll try to help. i'm glad to see people trying to learn.
regaw_leinad said:
nope, this ruu is different
doesn't work like that.
well, once you have the images you can use yaffs, for the system image, but getting the images from the ruu...
Click to expand...
Click to collapse
thats all you need for a rom. is the /system. just place that in a folder along with the boot.img. andddd archive and sign. you have a rom now.
and if you want to know a secret. lol
if you are in windows, all .exe's are archived as zips. change .exe to .rar/zip and then you can unzip and have everything. very simple.
o and you need an update script which you can create, or take someones from a rom and edit it to fit the RUU. and as always give credit where needed
Avalaunchmods said:
thats all you need for a rom. is the /system. just place that in a folder along with the boot.img. andddd archive and sign. you have a rom now.
and if you want to know a secret. lol
if you are in windows, all .exe's are archived as zips. change .exe to .rar/zip and then you can unzip and have everything. very simple.
o and you need an update script which you can create, or take someones from a rom and edit it to fit the RUU. and as always give credit where needed
Click to expand...
Click to collapse
interesting. so in theory this could be done as easily on windows, no linux partitions?
mountaindont said:
interesting. so in theory this could be done as easily on windows, no linux partitions?
Click to expand...
Click to collapse
i hate linux. lol so yes
Not all exe's work like that. Like this one for example....
not even 7zip can get into it.
danaff37 said:
Not all exe's work like that. Like this one for example....
not even 7zip can get into it.
Click to expand...
Click to collapse
uniextract, google it. you are correct some are a certain type that cant be extracted but 99% of RUU's can.
Ok here is a basic run through for extracting the RUU and making an update.zip
1. Run the RUU in windows or through wine. You don't have to run it completely with your phone plugged in. The install shield will extract the files to a tmp folder. Search through your tmp folders until you find it. Inside should be a rom.zip. Unzip it. Inside it should be system.img data.img boot.img etc...
2.
a: Switch to linux. Use unyaffs to extract the system.img. I usually make a directory called system in the same directory as the system image and cd to it. then issue.
unyaffs ../system.img
this will extract it into the system directory that your in. make your changes. add apps/busybox/su etc..
b: You can also use unyaffs for windows from here: http://code.google.com/p/unyaffs/downloads/list it should do the same thing but I've never used it.
3. If you want apps pre-installed to /data then make a data directory with a apps directory in it and put your extra apps there like wireless tether etc... so now you have a directory with
/system
/data
boot.img
4. Use an update script from another rom as a base and modify it to symlink busybox, set the correct permissions, copy data write boot.img, clear cache etc... read through some other update scripts to get the idea of whats going on it's simple text based stuff. The update script is inside the directory
META-INF/com/google/android.
Once done move the META-INF directory to your working directory. so you should now have
/system
/data
/META-INF
boot.img
Zip up the above directorys/files into something like myrom.zip
5. Sign the zip. You'll need java and a testsign.jar and the android sdk. I've never done it without the sdk. Create a directory called sign inside the tools directory of the android sdk. Move testsign.jar and your myrom.zip to the sign directory. Execute the following command while in the sign directory
java -classpath testsign.jar testsign myrom.zip myrom-signed.zip
6. Copy myrom-signed.zip to the root of your sdcard. reboot recovery. nandroid backup. wipe/factory reset. flash update zip.
Good luck.
zenulator said:
Ok here goes a basic run through for extracting the ruu and making an update.zip
1. Run the ruu in windows or through wine. It will be extracted to a tmp folder. Search through the tmp folders until you find it. Inside should be a rom.zip. Unzip it. Inside it should be system.img data.img boot.img etc...
2. Switch to linux. Use unyaffs to extract the system.img. I usually make a directory called system in the same directory as the system image and cd to it. then issue.
unyaffs ../system.img
this will extract it into the system directory that your in. make your changes. add apps/busybox/su etc..
3. if you want apps pre-installed to /data then make a data directory with a apps directory in it and put your extra apps there like wireless tether etc... so now you have a directory with
/system
/data
boot.img
4. use a update script from another rom as a base and modify it to symlink busybox, set the correct permissions, copy data write boot.img, clear cache etc... read through some other update scripts to get the idea of whats going on it's simple text based stuff. the update script is inside the directory META-INF/com/google/android. once done move it to your working directory. so you should now have
/system
/data
/META-INF
boot.img
Zip up the above directorys/files into something like myrom.zip
5 sign the zip. you need java and a testsign.jar and the android sdk. i've never done it without the sdk. create a directory called sign inside the tools directory of the android sdk. move testsign.jar and your myrom.zip to the sign directory. execute the following command while in the sign directory
java -classpath testsign.jar testsign myrom.zip myrom-signed.zip
6. copy myrom-signed.zip to the root of your sdcard. reboot recovery. nandroid backup. wipe/factory reset. flash update zip.
Good luck.
Click to expand...
Click to collapse
uhh...i think ill leave that one too the pros
zenulator said:
Ok here goes a basic run through for extracting the ruu and making an update.zip
Click to expand...
Click to collapse
Interesting. Sounds easy enough, I'll definitely have a go. Thanks for the tutorial.
pseudoremora said:
Interesting. Sounds easy enough, I'll definitely have a go. Thanks for the tutorial.
Click to expand...
Click to collapse
+5, HOLY CRAP guys, I havent checked the forum in a few hours.
Thank you all so much for the insight.
I'll be back in a week!!
nebenezer said:
+5, HOLY CRAP guys, I havent checked the forum in a few hours.
Thank you all so much for the insight.
I'll be back in a week!!
Click to expand...
Click to collapse
There's an easy fix for your problem... Install the XDA Android App. Seriously, my soul belongs to Android now... and XDA has become my home, I HAVE to know what's going on at all times... it's like a drug, lol.

apply sdcard:updata.zip help

well im trying to install darktemors a2sd on my fone and im in system recovery <3e> when i try to select the option apply sdcard:update.zip it says
finding update package...
openinng update package..
E:Cant't open /sdacrd/update.zip
(NO Such file or directory)
installtion aborted.
im fresh so i have no idea what to do please help
Use a file explorer like Astro or ES File Explorer, to go look on the sdcard folder and see if update.zip is there. You may need to go into the settings on the file explorer app and specify that it show the file extension (i.e. The .zip part). Make sure the file isn't named update.zip.zip.
Also did the install instructions say the file would be named update.zip? Sometimes the install file is named something else. I.e. darktremor.zip. Which in that case you have to choose the option to 'choose zip to install'. And find the specific zip file name, which may also be in a subfolder on the sdcard. I.e. /sdcard/download/darktremor.zip.
________________________________
http://ron-droid.blogspot.com
rigman said:
Use a file explorer like Astro or ES File Explorer, to go look on the sdcard folder and see if update.zip is there. You may need to go into the settings on the file explorer app and specify that it show the file extension (i.e. The .zip part). Make sure the file isn't named update.zip.zip.
Also did the install instructions say the file would be named update.zip? Sometimes the install file is named something else. I.e. darktremor.zip. Which in that case you have to choose the option to 'choose zip to install'. And find the specific zip file name, which may also be in a subfolder on the sdcard. I.e. /sdcard/download/darktremor.zip.
________________________________
http://ron-droid.blogspot.com
Click to expand...
Click to collapse
lol thanks it was called zip zip

Root explorer folder overwrite bug?

In Root Explorer, if I try to paste a folder in a situation where it should overwrite the target folder, it is instead placed inside it. For example:
1) create /sdcard/test/
2) copy the new folder
3) paste into /sdcard/
The result should be that one test folder overwrites the other, with no structure change. However, you end up instead with /sdcard/test/test/
If I instead delete "test" before step 3, the pasted test ends up where it should (inside /sdcard/, rather than inside /sdcard/test/). The moral seems to be if you know you are going to overwrite a folder, you must manually delete it first (which makes backup restoration with multiple indentured over-writes problematic).
Try for yourself and see. Am I missing something? Is this a known issue?

[Q] newb problem How to rezip a rom

I have googled this alot and have not found any helpful results. I have unziped a rom I like to remove some .apks and add some of the ones I always find myself re-installing. I also have been playing with the build.prop, and the framework. I'm not trying to steal anyones work I just want to have a fresh version of this rom when I go back to it (which I do about once a week). my intent would be to flash, enter my wifi and google passwords, and start using it. I know I can just do a backup and reinstall that, but this has been helpful with my trying to understand how to build a rom and what makes it work. My question being what are the steps to rezip this rom into a flashable update. I have tried dsixda kitchen with no luck, just reziping it, and some other dumb methods. What am I missing here? plz help thank you.
also don't think it matters but this is for a o.g. evo
we got same problem, i edited a working rom for galaxy y (adding and removing some apk) then i was like huh??? what to do next, tried zipping it but doesnt work. hope.someone will reply here.
Sent from my Nokia 3310 running ICS
The problem is the signature verification of the ROM. We sign the ROMS when we create them.
No idea what custom recovery you might use but there should be an option to disable it before you try flashing.
I hope this helps.
No I have cwm and I disabled signature verification, it still starts fine says updating than immediately says its failed
Sent from my PC36100 using XDA App
I also just have it in the folders it unzips in then inside a folder and I just zip that folder is that not right I don't know lol hope someone can help
Sent from my PC36100 using XDA App
That's what's wrong. You can't zip an entire ROM as a folder then zip that folder. Doesn't work that way.
Open a ROM. See how its packed. You'll have a system folder, data, sdcard perhaps. But that's how you package it.
This isn't as easy as you think. You can't just hack stuff up and expect it to work if you don't do it properly.
MattCrystal said:
That's what's wrong. You can't zip an entire ROM as a folder then zip that folder. Doesn't work that way.
Open a ROM. See how its packed. You'll have a system folder, data, sdcard perhaps. But that's how you package it.
This isn't as easy as you think. You can't just hack stuff up and expect it to work if you don't do it properly.
Click to expand...
Click to collapse
No I'm leaving the folders inside the ROM intact. everything is in a folder with all the folders ( data folder, META-INF folder, system folder ect..., and the boot image inside that single folder and then I am ziping all those items in the folder into a zip. I just can't get it to flash it starts then after a second of installation it says aborted.
sknight13602 said:
No I'm leaving the folders inside the ROM intact. everything is in a folder with all the folders ( data folder, META-INF folder, system folder ect..., and the boot image inside that single folder and then I am ziping all those items in the folder into a zip. I just can't get it to flash it starts then after a second of installation it says aborted.
Click to expand...
Click to collapse
Zip up the ROM you want. Take that ROM to the kitchen then build it again. Try that. Sign it and everything. If you want a walk through PM me and ill give you my gtalk address.
sknight13602 said:
No I'm leaving the folders inside the ROM intact. everything is in a folder with all the folders ( data folder, META-INF folder, system folder ect..., and the boot image inside that single folder and then I am ziping all those items in the folder into a zip. I just can't get it to flash it starts then after a second of installation it says aborted.
Click to expand...
Click to collapse
After reading this more I'm still understanding that the data and meta, system folders are in a folder, then that folder is zipped.
This is incorrect way to package it. The data, meta, system etc needs to be zipped all together as one. Not in a folder that is zipped. Make sense? Hope this explains more.
I'll try that I guess Mabry them all being in a folder is the prob I hope thanks man
Sent from my PC36100 using XDA App
Yup. Let me know if you need anymore help and if that works for you.
MattCrystal said:
After reading this more I'm still understanding that the data and meta, system folders are in a folder, then that folder is zipped.
This is incorrect way to package it. The data, meta, system etc needs to be zipped all together as one. Not in a folder that is zipped. Make sense? Hope this explains more.
Click to expand...
Click to collapse
lol so I find this funny but after some research I found that their were some commands in my update script I was leaving in that needed to be removed because I was removing the apk from the rom but it was looking for them and causing errors so after all my headaches it was something simple that'll teach me not to mess with something that aint broke
just tryed to flash it and now after it almost finished flashing I got
"update sdcard/romname/blah blah. failed"(status 6)
does that mean anything to you besides that I messed something up?
I playing with a sense 3.5 rom on a gb 2.3.5 base. Is their an easier rom to play with thats is more user freindly for a newb? mabey takeing the original ruu and tweaking that? I just want to start somewhere and develop my skills.
sknight13602 said:
just tryed to flash it and now after it almost finished flashing I got
"update sdcard/romname/blah blah. failed"(status 6)
does that mean anything to you besides that I messed something up?
I playing with a sense 3.5 rom on a gb 2.3.5 base. Is their an easier rom to play with thats is more user freindly for a newb? mabey takeing the original ruu and tweaking that? I just want to start somewhere and develop my skills.
Click to expand...
Click to collapse
k I got it now thnx for your help MattCrystal
Your welcome. Every phone works a little differently but get used to having problems and fixing them. Part of the struggle. And to me the fun. I love troubleshooting.
i think just open the zip (not unzip it)..
when dialog box open,,you can choose the apk or the others you want to delete..
if you want add somthing to zip,,just open the folder location you want add that,,and than drag n drop the file(s)..
thats it..
than close the dialog box..
winrar will ask you to save the change or not,,choose,,save..
its work for me..
P.S.
use the rom by yourself..
as your personal rom..
if you want to publish it,,ask the permit from the devs..

[Q] Need help preparing a flashable zip file

Hi,
i currently had some issues with my GPS, and i found this thread with an attached gps.conf file which fixed them.
However, i want to create a flashable zip file for TWRP to ease and automate the installation of the custom file.
I used the cacert-installation zip from http://android.opensomething.org/ as a starting point for my creation. This zip was created by some people i know and they automate the installation of the CaCert.org root certs on android.
However, i set up my own commands in the update-binary (which is essentially a shell script in this zip) and copied the gps.conf as the payload of the zip. But now i have the problem that the flashing fails, and i don't know why.
I would be very happy if someone could look at the zip and my commands in there, and maybe has an idea, why the installation fails.
Thank you very much.
Use a root file explorer and copy that file to etc folder and check permissions,(rw-r-r) though generally this isn't an issue..
Sent from my A0001 using XDA Premium 4 mobile app
The zip file is in the same folder where my other flashable zip files are. It has also the same permissions. I double-checked the directory on my desktop where i created the zip file from, and its contents had exactly the same permissions that the contents of the cacert zip file have.
The syntax of the update-binary file should be correct.
Is there some sort of verbose mode i can activate in TWRP? Some errors like "Extracting zip... ERROR could not open update-binary FAILED" could be very helpful for me.
simonszu said:
The zip file is in the same folder where my other flashable zip files are. It has also the same permissions. I double-checked the directory on my desktop where i created the zip file from, and its contents had exactly the same permissions that the contents of the cacert zip file have.
The syntax of the update-binary file should be correct.
Is there some sort of verbose mode i can activate in TWRP? Some errors like "Extracting zip... ERROR could not open update-binary FAILED" could be very helpful for me.
Click to expand...
Click to collapse
The .zip you provided above is empty.. No files other than meta and system.. I'll build one and upload it..
Sent from my A0001 using XDA Premium 4 mobile app
Here you go..
Thank you very much. How did you create the zip? Just for the records, and for me to learn. I have my android phone for 10 days (was used to iOS before) and i like such actions very much.

Categories

Resources