FORUMS
Remove All Ads from XDA

[GUIDE] How to make a cwm recovery flashable zip

454 posts
Thanks Meter: 833
 
By pankaj88, Senior Member on 20th June 2012, 01:17 PM
Post Reply Email Thread
13th September 2012, 08:49 AM |#21  
Senior Member
Thanks Meter: 32
 
More
i want to push via cwm zip file to other folders in root except system - like the /efs folder - do i need to add lines in the updater file?
and how do i restore file permissions after pushing files to it? can i use busybox or there is a method via the updater or CMW?
 
 
14th September 2012, 05:30 PM |#22  
baldypal's Avatar
Member
Flag Midland
Thanks Meter: 17
 
More
This one worked perfectly!

Sent from my Galaxy Nexus
23rd October 2012, 09:38 AM |#23  
fone_fanatic's Avatar
Senior Member
Flag Central Texas
Thanks Meter: 250
 
Donate to Me
More
Thanks for writing this up. Simplest guide to follow yet I'm still having issues

I'm trying to make a flashable zip of Apex Launcher (so I don't have to manually move it to /system/app every time I update or flash a rom).

I've downloaded the sample.zip, used 7zip to open archive. I've made a folder on my desktop called "app" with apexlauncher.apk in that folder. Copied that "app" folder into the "system" folder from the downloaded zip. Then I just hit the X on 7zip. So now in the sample.zip I have a META-INF folder and system folder ("system/app/apexlauncher.apk").

Now when I flash the zip (which I've renamed to Apex_1.3.2.zip) in CWM v6.0.1.5 it says:

Code:
 -- Installing: /emmc/aokp.ota/after-rom/Apex_1.3.2.zip
Finding update package. . .
Opening update package. . .
Installing update. . .
Enjoy!

Install from sdcard complete.
Now when I reboot, I get a pop up asking which launcher I want to use and apex launcher isn't an option to choose from. So I open up root explorer to navigate to /system/app and "apexlauncher.apk" is not there

What am I doing wrong?

Also this is on my At&t S2 (sgh-i777) running Task650's AOKP if that makes a difference.
The Following User Says Thank You to fone_fanatic For This Useful Post: [ View ] Gift fone_fanatic Ad-Free
23rd October 2012, 09:55 AM |#24  
Quote:
Originally Posted by fone_fanatic

Thanks for writing this up. Simplest guide to follow yet I'm still having issues

I'm trying to make a flashable zip of Apex Launcher (so I don't have to manually move it to /system/app every time I update or flash a rom).

I've downloaded the sample.zip, used 7zip to open archive. I've made a folder on my desktop called "app" with apexlauncher.apk in that folder. Copied that "app" folder into the "system" folder from the downloaded zip. Then I just hit the X on 7zip. So now in the sample.zip I have a META-INF folder and system folder ("system/app/apexlauncher.apk").

Now when I flash the zip (which I've renamed to Apex_1.3.2.zip) in CWM v6.0.1.5 it says:

Code:
 -- Installing: /emmc/aokp.ota/after-rom/Apex_1.3.2.zip
Finding update package. . .
Opening update package. . .
Installing update. . .
Enjoy!

Install from sdcard complete.
Now when I reboot, I get a pop up asking which launcher I want to use and apex launcher isn't an option to choose from. So I open up root explorer to navigate to /system/app and "apexlauncher.apk" is not there

What am I doing wrong?

Also this is on my At&t S2 (sgh-i777) running Task650's AOKP if that makes a difference.

I think additional app stores in Data/app. have you check there also..??
The Following User Says Thank You to D™ For This Useful Post: [ View ] Gift D™ Ad-Free
23rd October 2012, 10:51 AM |#25  
selva.simple's Avatar
Senior Member
Flag Chennai
Thanks Meter: 1,142
 
More
Quote:
Originally Posted by fone_fanatic

I've downloaded the sample.zip, used 7zip to open archive. I've made a folder on my desktop called "app" with apexlauncher.apk in that folder. Copied that "app" folder into the "system" folder from the downloaded zip. Then I just hit the X on 7zip. So now in the sample.zip I have a META-INF folder and system folder ("system/app/apexlauncher.apk").
What am I doing wrong?

May be a mount issue. Open the updater-script using Notepad++ and replace the lines with the below

Code:
run_program("/sbin/busybox", "mount", "/system"); 
package_extract_dir("system", "/system"); 
run_program("/sbin/busybox", "umount", "/system");
ui_print("Enjoy!");
23rd October 2012, 11:13 AM |#26  
fone_fanatic's Avatar
Senior Member
Flag Central Texas
Thanks Meter: 250
 
Donate to Me
More
Quote:
Originally Posted by kataria.vikesh

I think additional app stores in Data/app. have you check there also..??

Looks like Data/app contains apk's for the apps downloaded from the market. I want Apex to be a system app. Usually what I do after I update my rom (which wipes the /system/app folder) I open up root explorer, copy apexlauncher.apk to /system/app, set the proper permissions and reboot.

I want to create a .zip that will do that for me (add apexlauncher.apk into /system/app).
23rd October 2012, 12:11 PM |#27  
jayjojayson's Avatar
Senior Member
Flag Berlin
Thanks Meter: 142
 
Donate to Me
More
Quote:
Originally Posted by fone_fanatic

Looks like Data/app contains apk's for the apps downloaded from the market. I want Apex to be a system app. Usually what I do after I update my rom (which wipes the /system/app folder) I open up root explorer, copy apexlauncher.apk to /system/app, set the proper permissions and reboot.

I want to create a .zip that will do that for me (add apexlauncher.apk into /system/app).

here i had written a small script that will do that for you...
open the zip-folder, don't extract the zip-folder, only open and put your apexlauncher.apk to system/app!
now you can flash the zip with cwm-recovery.. but note, the application-name must be the same for the called app and the written name in the update-script! you can also look at the update-script in META-INF folder to learn what is going on..

apex-to-system.zip
updater-script
Attached Files
File Type: zip apex.zip - [Click for QR Code] (139.0 KB, 333 views)
File Type: zip updater-script.zip - [Click for QR Code] (512 Bytes, 311 views)
The Following 5 Users Say Thank You to jayjojayson For This Useful Post: [ View ] Gift jayjojayson Ad-Free
24th October 2012, 01:03 AM |#28  
fone_fanatic's Avatar
Senior Member
Flag Central Texas
Thanks Meter: 250
 
Donate to Me
More
Thumbs up
Quote:
Originally Posted by jayjojayson

here i had written a small script that will do that for you...
open the zip-folder, don't extract the zip-folder, only open and put your apexlauncher.apk to system/app!
now you can flash the zip with cwm-recovery.. but note, the application-name must be the same for the called app and the written name in the update-script! you can also look at the update-script in META-INF folder to learn what is going on..

apex-to-system.zip
updater-script

Thank you for that!

In the first post it says don't mess with the updater-script, but I take it that is what I was doing wrong!

I looked at the updater-script for the CWM flashable zip of Cerberus and in the cerberus one they have :

Code:
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
set_progress(0.625000);
The file name isn't there. Does that mean it'll move anything from the /system folder in the zip to whatever directory it is? Like move /app/apexlauncher.apk to /system/app/apexlauncher.apk?

If so can I throw more than one apk in the zip if need be and not have to modify the script every time?

Also for the Cerberus one, in the META-INF folder there are 3 files "CERT.RSA" "CERT.SF" and MANIFEST.MF" I Don't need those in my zip do I?


---update---
IT WORKED!! THANK YOU!

Also I just noticed that you have the same script as the one found in the cerberus zip package_extract_dir("system", "/system"); but after that you have package_extract_file("system/app/apexlauncher.apk", "/system/app/apexlauncher.apk");. The updater-script in the cerberus zip doesn't have the actual file name, just the package_extract_dir line and it works fine.
24th October 2012, 10:23 AM |#29  
jayjojayson's Avatar
Senior Member
Flag Berlin
Thanks Meter: 142
 
Donate to Me
More
nice that i could help you...

Quote:
Originally Posted by fone_fanatic

Thank you for that!
In the first post it says don't mess with the updater-script, but I take it that is what I was doing wrong!
I looked at the updater-script for the CWM flashable zip of Cerberus and in the cerberus one they have :

Code:
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
set_progress(0.625000);
The file name isn't there. Does that mean it'll move anything from the /system folder in the zip to whatever directory it is? Like move /app/apexlauncher.apk to /system/app/apexlauncher.apk?

yes that's right package_extract_dir("system", "/system"); means you will moving all files in /system of the zip folder to /system on your device!
package_extract_file("system/app/apexlauncher.apk", "/system/app/apexlauncher.apk"); will do that only for the called file!
also you can delete the file in /system if you want! delete_recursive("/system"); will delete the complete content in system folder on your device and
delete_recursive("/system/app/apexlauncher.apk"); will only delete the apexlauncher in system folder..

Quote:
Originally Posted by fone_fanatic

If so can I throw more than one apk in the zip if need be and not have to modify the script every time?

yes you can do this...

Quote:
Originally Posted by fone_fanatic

Also for the Cerberus one, in the META-INF folder there are 3 files "CERT.RSA" "CERT.SF" and MANIFEST.MF" I Don't need those in my zip do I?

I think so, don't know what these files will do, but for your example with the launcher you don't need them in your zip file...

Quote:
Originally Posted by fone_fanatic

---update---
IT WORKED!! THANK YOU!

nice..
The Following 2 Users Say Thank You to jayjojayson For This Useful Post: [ View ] Gift jayjojayson Ad-Free
15th November 2012, 07:43 PM |#30  
Senior Member
Thanks Meter: 181
 
More
@pankaj88

Thanks all the effort you exerted here to teach some useful thing.
We would appreciate if you could write down the some basic scripts for;
-adding a new file
-deleting a file
-replacing a file
-setting permission (pwrmission numbers and how they are used, etc)

I also would like to contribute. I believe this will help everyone and you can also make easier explanations thanks to the method i am going to explain.

1. First go to http://forum.xda-developers.com/show....php?t=1772338 and download Droid Manager.
The program has lots of features. However, one of them is totally about preparing CWM flashable zip. (You should write your own update script.)

2. Download sample.zip in the OP.

3. Run Droid manager. Click Custom Roms Tool. (You can use the program for lots of things, including modification the Rom exisiting in your phone, among others)

4. Now it will ask you project name and working directory (you are good to decide as you like). The other one is Base Rom. If you are a dev like pankaj88, then you can start from scratch (no need to select any base rom). If you are learning, then click base rom and choose sample.zip.

5. Now you are good to go. You have file browser, you have update script tab, etc, etc. When you are finished click "Publish Now".

That's all.

You all need to do is to add necessary files, and write scripts related to those files.

Regards.
17th November 2012, 11:09 AM |#31  
Member
Flag Den Haag
Thanks Meter: 54
 
More
Thanks
Hey Buddy Thanks a lot for this post , I tried to build my own flashable.zip , and now it worked true your apex.zip . I used this one on my Samsung Galaxy S3 . the first sample.zip did not work for me . i also succesfully did an mod in the updater -cript . The change i made was first an simple one , I changed the :

ui_print("| Writing System |");
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
show_progress(0.200000, 10);

in ui_print("| Writing System |");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
show_progress(0.200000, 10);

I actuallychanged every data word in system word , so my app was installed in the folder i want . Then i made this change :

ui_print("|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~|");

And made some foolish text for myself .

No i am gonna try installing multiple apps .

Wish me luck
The Following User Says Thank You to DaveDH For This Useful Post: [ View ] Gift DaveDH Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes