Guide to make FLASHABLE ZIP [System/Framework][For newbies like me ;)] - Android Software/Hacking General [Developers Only]

THIS WORKS ON EVERY DEVICE SO FAR,STILL DO AT YOUR OWN RISK​
This guide is for them who has very less or Zero knowledge about how to create a flashable zip for their system apps or frameworks.
Respected Dev's please correct me if I am wrong in explaining something in this tutorial. Thanks in advance
Requirements:
1. Notepad++
2. Recovery partition name of your device (Will explain it below in-case you don't know what it is )
3. Sample Flashable zip (attached at the end of this tutorial)
4. Winrar or any other application to open and save zip file.
Lets start this guys
[Q] How to find out what is the name of Recovery partition of your device ?
Those who have no idea about what it is, don't worry. Just open any custom rom for your device and locate the updater-script.
You will find the updater-script like the following :
Open the custom rom and you'll find a folder named META-INF.
Open it and go to \META-INF\com\google\android\updater-script
Now open the updater-script with Notepad++
In the updater-script find for this line "/dev/block/"
U'll get like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In my case mmcblk0p21 is the Recovery partition name of the respected device.
Note: You will find more than one result in your search for "/dev/block/" Remember your Recovery partition name is the one which includes "/system" at the end
Eg: "/dev/block/mmcblk0p21", "/system" [In my case]
Now you know the Recovery partition name of your device.
Download the flashable zip from the download links provided at the end of this tutorial.
In case you want to flash a system app in your device then download the Systemapp.zip
Open it with winrar.
You'll get two folders 1.META-INF ; 2.system
First open the system folder ,you'll get a folder name app Open it and place your system app.apk that you want to flash.
The address will be like "Sytemapp.zip\system\app\yoursystemapp"
Secondly open Systemapp.zip and now goto "Sytemapp.zip\META-INF\com\google\android \updater-script"
Open the updater-script with Notepad++and edit the lines
search "/dev/block/RecoveryPartitionName" & replace "RecoveryPartitionName" that you figured out above.
Next search delete("/system/app/yoursystemapp.apk") & Rename yoursystemapp.apk with the apk you have put in your /system/app/ folder.
Do the same with delete("/system/app/yoursystemapp.odex") In case you are making an ODEX flashable zip.
Save the updater-script, exit from winrar and save it.
BINGO!! :laugh: You successfully created your own system flashable zip
NOTE: If you wanna flash more than one apps.apk then add
delete("/system/app/yoursystemapp.apk");
delete("/system/app/yoursystemapp.odex");
& rename yoursystemapp.apk & yoursystemapp.odex accordingly.
For example i have see this screenshot
Do the same for framework apps and jar files
DOWNLOADS: ​Sytemapp.zip​http://www.megafileupload.com/9ivU/Sytemapp.ziphttp://www.megafileupload.com/9ivU/Sytemapp.zip
framework.ziphttp://www.megafileupload.com/9ivX/framework.zip
WORKING LINKS ​Sytemapp.zip​https://drive.google.com/file/d/0B7Ko9fdwLEF0UkxEYU42RjFJOEE/view?usp=sharinghttps://drive.google.com/file/d/0B7Ko9fdwLEF0UkxEYU42RjFJOEE/view?usp=sharing
framework.ziphttps://drive.google.com/file/d/0B7Ko9fdwLEF0eWtDLVZlblR0QVU/view?usp=sharing
STEPS TO INSTALL IT​1.AFTER MAKING THE FLASHABLE ZIP PUT IN YOUR EXT SD CARD
2.BOOT YOUR DEVICE INTO CWM RECOVERY
3.SELECT THE OPTION INSTALL ZIP FROM EXT SD CARD
4.CHOOSE Sytemapp.zip/framework.zip WHATEVER YOU WANT TO FLASH
5.WAIT FOR IT TO COMPLETE
6.PULL YOUR BATTERY OUT AND RESTART YOUR PHONE
7.ENJOY THE MOD
THANKS FOR CHOOSING MY TUTORIAL
IF I HELPED YOU BY THIS POST, PRESS :good: THANKS
Feel free to suggest anything that i left to cover in this tutorial. And same for the queries.

Great tutorial. Only one question. In my case i have lg g2 and the system apps are in system/priv-app. It would be the same?
Enviado desde mi LG-D802 mediante Tapatalk

renzo090513 said:
Great tutorial. Only one question. In my case i have lg g2 and the system apps are in system/priv-app. It would be the same?
Enviado desde mi LG-D802 mediante Tapatalk
Click to expand...
Click to collapse
In your case it would be like
ui_print("Flashable zip MOD");
ui_print("By Akky");
ui_print("=MOUNTING=");
mount("ext4", "EMMC", "/dev/block/RecoveryPartitionName", "/system");
ui_print("=FIXING=");
delete("/system/priv-app/yoursystemapp.apk");
delete("/system/priv-app/yoursystemapp.odex");
ui_print("=INSTALLING=");
package_extract_dir("system", "/system");
ui_print("=FIX PERMISSIONS=");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("=UNMOUNTING=");
unmount("/system");
ui_print("=Completed successfully!=");
ui_print(" ENJOY ");

links are not working

How to make stock rom flashable??

great and simple
thanks

is it compatible with marshmallow?

ding dong!
I prefer Zipme.apk instead

akky26 said:
THIS WORKS ON EVERY DEVICE SO FAR,STILL DO AT YOUR OWN RISK​
This guide is for them who has very less or Zero knowledge about how to create a flashable zip for their system apps or frameworks.
Respected Dev's please correct me if I am wrong in explaining something in this tutorial. Thanks in advance
Requirements:
1. Notepad++
2. Recovery partition name of your device (Will explain it below in-case you don't know what it is )
3. Sample Flashable zip (attached at the end of this tutorial)
4. Winrar or any other application to open and save zip file.
Lets start this guys
[Q] How to find out what is the name of Recovery partition of your device ?
Those who have no idea about what it is, don't worry. Just open any custom rom for your device and locate the updater-script.
You will find the updater-script like the following :
Open the custom rom and you'll find a folder named META-INF.
Open it and go to \META-INF\com\google\android\updater-script
Now open the updater-script with Notepad++
In the updater-script find for this line "/dev/block/"
U'll get like this
In my case mmcblk0p21 is the Recovery partition name of the respected device.
Note: You will find more than one result in your search for "/dev/block/" Remember your Recovery partition name is the one which includes "/system" at the end
Eg: "/dev/block/mmcblk0p21", "/system" [In my case]
Now you know the Recovery partition name of your device.
Download the flashable zip from the download links provided at the end of this tutorial.
In case you want to flash a system app in your device then download the Systemapp.zip
Open it with winrar.
You'll get two folders 1.META-INF ; 2.system
First open the system folder ,you'll get a folder name app Open it and place your system app.apk that you want to flash.
The address will be like "Sytemapp.zip\system\app\yoursystemapp"
Secondly open Systemapp.zip and now goto "Sytemapp.zip\META-INF\com\google\android \updater-script"
Open the updater-script with Notepad++and edit the lines
search "/dev/block/RecoveryPartitionName" & replace "RecoveryPartitionName" that you figured out above.
Next search delete("/system/app/yoursystemapp.apk") & Rename yoursystemapp.apk with the apk you have put in your /system/app/ folder.
Do the same with delete("/system/app/yoursystemapp.odex") In case you are making an ODEX flashable zip.
Save the updater-script, exit from winrar and save it.
BINGO!! :laugh: You successfully created your own system flashable zip
NOTE: If you wanna flash more than one apps.apk then add
delete("/system/app/yoursystemapp.apk");
delete("/system/app/yoursystemapp.odex");
& rename yoursystemapp.apk & yoursystemapp.odex accordingly.
For example i have see this screenshot
Do the same for framework apps and jar files
DOWNLOADS: ​Sytemapp.zip​http://www.megafileupload.com/9ivU/Sytemapp.ziphttp://www.megafileupload.com/9ivU/Sytemapp.zip
framework.ziphttp://www.megafileupload.com/9ivX/framework.zip
STEPS TO INSTALL IT​1.AFTER MAKING THE FLASHABLE ZIP PUT IN YOUR EXT SD CARD
2.BOOT YOUR DEVICE INTO CWM RECOVERY
3.SELECT THE OPTION INSTALL ZIP FROM EXT SD CARD
4.CHOOSE Sytemapp.zip/framework.zip WHATEVER YOU WANT TO FLASH
5.WAIT FOR IT TO COMPLETE
6.PULL YOUR BATTERY OUT AND RESTART YOUR PHONE
7.ENJOY THE MOD
THANKS FOR CHOOSING MY TUTORIAL
IF I HELPED YOU BY THIS POST, PRESS :good: THANKS
Feel free to suggest anything that i left to cover in this tutorial. And same for the queries.
Click to expand...
Click to collapse
Hey OP can you re-upload the zips?

Refreshing download links
eqbirvin said:
Hey OP can you re-upload the zips?
Click to expand...
Click to collapse
give me 10mins uploading new download links

Download links updated
Links updated. Thanks you all for showing interest in my guide
Regards
Akky

akky26 said:
give me 10mins uploading new download links
Click to expand...
Click to collapse
Oh my god OP is actually going to deliver! Just kidding, I really appreciate the tutorial and the fast response!

thanks for guide
akky26 said:
Links updated. Thanks you all for showing interest in my guide
Regards
Akky
Click to expand...
Click to collapse
I want to install "PC link manager" app from older lolipop ROM of my phone to current ROM which is marshmallow. So i had extracted the lolipop rom and found files like this.
System->apps->PCLinkManager->PCLinkManager.apk
and there is one more folder,
System->apps->PCLinkManager->arm64->PCLinkManager.odex
Will i need to put PCLinkManager in arm64 folder as is in lolipop ROM? I have seen in your guide that you are using same path for apk and odex.
One more question, i dont have rooted device, i am thinking of flashing this update.zip through ASUS official recovery. Will it work?
If you know any other way to install this app without root please tell

PHP:
ui_print(" Flashable kid mode ");
ui_print("By Akky");
ui_print("=MOUNTING=");
mount("ext4", "EMMC", "/dev/block/mmcblk0p21", "/system);
ui_print("=FIXING=");
delete("/system/app/kids-mode.apk");
delete("/system/app/kids-mode.odex");
ui_print("=INSTALLING=");
package_extract_dir("system", "/system");
ui_print("=FIX PERMISSIONS=");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("=UNMOUNTING=");
unmount("/system");
ui_print("=Completed successfully!=");
ui_print(" ENJOY ");
doesn´t work twrp says process updater ends with error 6

MichaelScOke said:
PHP:
ui_print(" Flashable kid mode ");
ui_print("By Akky");
ui_print("=MOUNTING=");
mount("ext4", "EMMC", "/dev/block/mmcblk0p21", "/system);
ui_print("=FIXING=");
delete("/system/app/kids-mode.apk");
delete("/system/app/kids-mode.odex");
ui_print("=INSTALLING=");
package_extract_dir("system", "/system");
ui_print("=FIX PERMISSIONS=");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
ui_print("=UNMOUNTING=");
unmount("/system");
ui_print("=Completed successfully!=");
ui_print(" ENJOY ");
doesn´t work twrp says process updater ends with error 6
Click to expand...
Click to collapse
Right mount dir? I use System twice:
.../dev/block/platform/msm_sdcc.1/by-name/system", "/system");
I don't delete the odex, only apk...
Check directory in the zip:
/system/app/kids-mode/kids-mode.apk
Permission only to app folder:
set_perm_recursive(0, 0, 0755, 0644, "/system/priv-app/com.curvefish.widgets.apnonoff");
(Change to youre values)

Related

[i9003][FAQ] Read this first!

0. REMEMBER use search option on this forum before ask some question: it's about 90% that this question was posted and already discussed on this forum.
1. My phone gets heated upto 45C during using it and charging. Is this a bug?
2. Can we flash firmware from Samsung Galaxy S (i9000) onto Samsung Galaxy SL (i9003)?
3. What firmware can I flash to my phone? I have XXXX firmware. What is better fw for me to flash?
4. I downloaded the firmware in .rar file, but it asks password. What is password?
5. Can I reflash back my own firmware without any problem?
6. Will I loose warranty on my phone after reflashing?
7. How to flash firmware? My firmware has only 1 file. What should I do?
8. What is factory reset? How to do factory reset?
9. What is rooting of phone? Is it necessary to root the phone? How to root phone?
10. What is "Deodexing"? Is it necessary to deodex the phone? How to deodex my phone?
11. Does i9003 have Gingerbread Android (2.3)?
12. Please help! I removed xxx.apk from my phone and I forget to make backup. Somebody give me it.
13. What is Clockwork Mod (CWM)?
14. How to flash CWM?
15. My GPS locking takes too much time. What should I do?
16. Do the i9003 have custom ROMs? How can I install it?
17. How can I convert rfs to ext4? I applied ext4 conversion, but now I has boot loop. Where can I find ext4 script for XXXX ROM?
1. My phone gets heated upto 45C during using it and charging. Is this a bug?
A: (thanks to supergaijin) think about it this way: your phone is a smartphone, not a computer. a computer can shunt the incoming power from the A/C when the battery is charged, but your phone can't. instead, the phone shuts off the charger connection at 100%. have you read about people who leave their phone plugged into the charger and when they remove it, their battery drops to 93% or whatever? it's cause the phone was not charging after reaching 100% to avoid overcharging
did you know you can run a laptop without the battery installed, as long as the A/C cord is plugged in? can you remove your phone battery and leave the A/C cord plugged in and start the phone? no. why? because all charge in the phone must go through the battery before reaching the rest of the phone's circuits for operation since there is no shunt.
so here's the deal: charging your phone without doing anything causes some heat in the battery. running things on your phone causes heat as your batter drains. so, charging the phone at the same time it's discharging will cause even more heat. take a break, or make the phone run slower for less heat
2. Can we flash firmware from Samsung Galaxy S (i9000) onto Samsung Galaxy SL (i9003)?
A: No. If you do this you will get full bricked phone. and only service center can repair it.
3. What firmware can I flash to my phone? I have XXXX firmware. What is better fw for me to flash?
A: You can flash any firmwares created for i9003. The list of them you can see in kkrraazzyy's post or on samfirmware.com.
Now the most users decided that firmware XXKB3 is most stable and bug-less firmware. For this firmware a lot of developers create their modifications and themes. But some users from America said, that after flashing with XXKB3 they lose ability to connect through 3G. When they returned back to their fw this ability didn't appear.
Also we have releases of gingerbread firmware XXKPH/XXKPM/JPKP5/JPKP5. They have some bugs, but it's usable enough and many users switched to use GB ROMs
Before flashing any FW it's highly recomended to make backup of your /efs partition. Because there is saved your IMEI number and if you remove it you will loose ability to make calls. To make backup you have to root your device
A2: There are different firmwares for different regions. They have different setting different locale support. The region of firmware encoded in its name (first 2 letters). here you can see what this letters mean.
4. I downloaded the firmware in .rar file, but it asks password. What is password?
A: read everything from post you downloaded this file! If it's kkrrassyy's post or samfirmware.com the password is "samfirmware.com"
5. Can I reflash back my own firmware without any problem?
A: Yes you can, but with some limitations: if your firmware contain only 1 file and before you flashed your phone with firmware contained 3 files, there is possibility that you can have some problems with network connection (like loosing APN settings or 3G internet), because your firmware doesn't contain modem file with all settings for GSM modem that are used in your region.
6. Will I loose warranty on my phone after reflashing?
A: Yes. But some of the forum users said that their service centers helped them without any problems. Also you can always flash back your firmware (if it's in the lists of point 2 of this FAQ) and said that you don't do anything with your phone, but it became broken. If in service center won't make detailed research of your phone, it can be successful for you.
7. How to flash firmware? My firmware has only 1 file. What should I do?
A: process of flashing is very good described in kkrraazzyy' post [I9003] [HOWTO] flash Samsung I9003 Galaxy SL Firmware. But read this post to the end before flash. if you have only 1 .tar file in your firmware you shouldn't use .pit file and flash you phone only with 1 pda file.
Never check "Phone EFS clear" option in Odin application! You will loose your IMEI number and can't make calls!
8. What is factory reset? How to do factory reset?
A: Factory reset means that you will clean all user settings and installed applications. And your phone becomes with empty ROM. But remember that factory reset doesn't clean the internal or external sd cards. There are several ways to make full (factory) reset:
1. Go to settings->Privacy->Factory data reset.
2. power off your phone. go to recovery console (press Volume UP and Home, then don't releasing this buttons press to power button till the phone vibrate, then release power button, then release other buttons). And select "wipe data/factory reset"
3. enter as a phone *2767*3855# Attention! In this case full reset starts after entering "#" and it cleans internal sdcard
9. What is rooting of phone? Is it necessary to root the phone? How to root phone?
A: Some operations in your phone usually hidden from usual user. It's for don't give to you destroy your phone or remove some special programs without what the phone became only expansive bookreader with small screen. When you became root of your phone this means that you became administrator of your phone and can do anything you want. You can remove/change/add any data to the system partitions, remove/change your IMEI number and so on. Some applications need the root access to make backup of full system (like Titunium Backup), setup firewall settings (like DroidWall) and so on. Also if you want to append some mods to your phone or for deodexing you need the root. Is it necessary to root you phone: make up your mind by yourself. How to root the phone is described in rahiljnmc's post [GT-i9003] [HOWTO] Root Samsung Galaxy SL or you can use CWM to root your phone without PC [I9003][CWM] Root Update.zip 2.2.1
10. What is "Deodexing"? Is it necessary to deodex the phone? How to deodex my phone?
A: To make applications faster their resources are compiled to special format during application start. Then this binary data is put into the cache (and it saves the time in next start). But we also can save the time of the first start and space in cache if we get application, compile all its resources, remove resources from application and put .odex file near the .apk
IE .odex file is compiled resources of .apk. And they save the time of start and space. But we can't modify compiled resources. That's why for customization we need deodexed applications.
OK. Now answer to your question:
Deodexing -- process to decompile compiled resources from .odex file and put these resources into .apk file
Positives: we can easy change application look (by changing images of it) or behavior(by changing .xml files)
Minuses: first start of application will be longer, also it will take some space into cache.
Usually stock firmwares are released odexed. If you want to attach new mod, or change the look-and-feel of your phone with different theme, you need deodex your phone.
How to deodex the phone you can find here or here. Also if you flash your phone with XXKB3 firmware you can use this post with already deodexed firmware files.
Remember to deodex your firmware you need to root your phone before!
11. Does i9003 have Gingerbread Android (2.3)?
A: Yes. The official ROM for the Europe is XXKPH. It's based on Gingerbread Android (2.3.4). Here is feedback
Before flash the firmware just read the thread. There are described some problems and sollutions.
12. Please help! I removed xxx.apk from my phone and I forget to make backup. Somebody give me it.
A: Don't worry you already have it at your PC.
1. unpack PDA.......tar file. here you can see system.rfs file.
2.1 For Windows: open it with MagicISO
2.2 For Linux: mount it as loop device ( mount -o loop system.rfs /mnt ) Remember you have to be root to mount files.
REMEMBER: if you are using deodexed firmware you need deodexed applications
13. What is Clockwork Mod (CWM)?
A: Clockwork Mod is a modification of recovery console that gives you some extra ability:
1. You can make full backup of your phone. and restore it even if your phone is soft bricked (but you can go into recovery console).
2. You can apply unsigned update.zip files that created by other developers to easy apply some mods or themes. Also you can even don't rename that file to "update.zip", just place it in some directory of your external sd card and use "install zip from sd card" option.
3. you can create access to your external sd card from PC even if your phone is in the recovery menu
14. How to flash CWM?
A: look at this thread and look at CWM created for your firmware. REMEMBER: CWM created for other firmware can soft brick your phone.
If you find it flash it with Odin like it's a PDA file. If not, you can send to Skin1980 your normalboot.img and he can create CWM for your firmware if he will have time for this. How to take this file described in his post
Also there is an universal CWM from Gingerbread ROMs by amit.bagaria. You can apply it to any GB based ROMs
15. My GPS locking takes too much time. What should I do?
A: At the first you have to understand that if it's a lot of clouds in the sky or the view of sky is limited (IE you have bad signals from GPS satellites) the locking will take a lot of time with any devices.
But it's common problem of firmwares was released before February. Try to flash to XXKB3 or other firmwares released after XXKB3.
Also you can read this thread and follow the instructions. I'm staying on XXKB3 and using GPS Aids from the market, and it enough for me to take locking for 10 seconds.
16. Do the i9003 have custom ROMs? How can I install it?
A: Yes. Look at the next post for the details.
17. How can I convert rfs to ext4? I applied ext4 conversion, but now I has boot loop. Where can I find ext4 script for XXXX ROM?
A: At the first you have to know that it's not real conversion. You can't convert rfs to ext4 without data loosing. Because it's just formatting partition to ext4. This means, that you have to make full backup before applying ext4 script, then apply it, then DO NOT REBOOT and restore your backup. Also because this is just formatting you can use this script for any ROMs. The only requirement is supporting ext4 by the kernel. script for formatting is here
Also you can read FAQ for i9000. there some questions are described very good.
Some tweaks
1. Two finger Google map rotation Do not need for Gingerbread firmwares.
2. What stock application I can remove safely? How can I do it?
A: Before remove anything I recommend to make backup of it at your sdcard. In this case you can easy restore this application using adb shell
In this thread you can read what applications you can easy remove. to do this you can go to /system/app directory and remove the corresponded files. You can do it with adb shell or root explorer. But for novices there are some powerful tools that gives to you this ability (you can find them in the market):
SGS tools: go to "Cleanup System App". It can make backup of removed applications
Titanum Backup
nitrality: go to "Applications" and uncheck unneeded aplications
Also you can remove sounds from /system/media/audio (but don't touch /system/media/audio/ui) if you use your own sounds for alarms, notifications and calls
3. For taking more faster application start you can convert your system partitions to ext4 filesystem.
To do this you have to follow this instructions. Also remember after converting to ext4 and before restoring backup DO NOT RESTART YOUR PHONE, else you will have soft bricked phone and should to reflash your firmware
4. Graphics Performance BOOOST Fix can boost the speed of applications in OpenGL games
Also you can take some info from the following threads:
1. about Custom ROMs - MODs
2. about Themes
For developers
I wanted to make FAQ how to make themes: SCIENTYREAL was the first. OK here his post
HOW-TO Create update.zip
Remember:
1. All update.zip files should have special structure of directories inside the ZIP archive:
META-INF — directory contains signature of your package and updater-script that executes when you apply this archive from the recovery console
script should be placed in the path update.zip/META-INF/com/google/android/updater-script
The sript needs binary file from its work. The binary is placed in the path update.zip/META-INF/com/google/android/update-binary
I attached it to this post
all other directories contain content should be applied.
If you will create package for CWM you don't need to sign your update.zip. You can read this topic how to sign your update.zip by test signature. And this post with detailed instruction how to create update.zip for custom recovery
2. About syntax of updater-script you can read here, here and here
Here is description of commands (thanks to sk0t from 4pda.ru)
package_extract_dir
Syntax: package_extract_dir("<src-dir>", "<dst-dir>");
Extracts files from <src-dir> into <dst-dir>. All files from <dst-dir> that exist into <src-dir> will be rewritten
Example: package_extract_dir("system", "/system"); Copy files from update.zip/system into /system
package_extract_file
Syntax: package_extract_file("<src-file>", "<dst-file>");
Copies file <src-file> to <dst-file>. If file <dst-file> exists it will be rewritten.
Example: package_extract_file("test.sh", "/tmp/test.sh"); Copies test.sh from update.zip into /tmp/test.sh
format
Syntax: format("MTD", "<root>");
Formats partition <root>.
Example: format("MTD", "system"); Formats /system . NOTE: it will remove everything from partition /system!
delete
Syntax: delete("<file1>"[, "file2", ..."fileN"]);
Rempves file(s)
Example: delete("/system/app/Calculator.apk"); Removes Calculator.apk from /system/app.
delete_recursive
Syntax: delete_recursive("<dir1>"[, "dir2", ..."dirN"]);
Removes directory(-ies) recursivelly
Example: delete_recursive("/data/dalvik-cache"); Removes directory /data/dalvik-cache with everything inside.
run_program
Syntax: run_program("<filetorun>"[, "<opt1>", "<opt2>", "<opt3>"]);
Starts program (script) <filetorun> [with parameters].
Example: run_program("/tmp/install_busybox.sh"); Starts script /tmp/install_busybox.sh.
set_perm
Syntax: set_perm(<uid>, <gid>, <mode>, "<pathtofile>"[, ... "pathtofileN"]);
Sets owner, group and permissions for file or directory (like chmod, chown and chgrp in unix)
Example: set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh"); Sets owner, group and permissions for file /system/etc/init.goldfish.sh
set_perm_recursive
Syntax: set_perm_recursive(<uid>, <gid>, <dir-mode>, <file-mode>, "<path>"[, ... "<pathN>"]);
The same as set_perm, but works recursively. <dir-mode> - permissions for directories, <file-mode> - permissions for files.
Example: set_perm_recursive(0, 0, 0755, 0644, "/system/app"); Sets permissions for content of /system/app, for directories - 0755, for files - 0644.
show_progress
Syntax: show_progress(<fraction>, <duration>);
Moves progressbar to <fraction> parts each <duration> seconds. <duration> can be 0 for moving progressbar by command set_progress, but not by time.
Example: show_progress(0.100000, 1); Increses progress on 0.1 part every 1 second
set_progress
Syntax: set_progress(<fraction>);
Sets position of progress bar to <fraction>.
Example: set_progress(0.500000);
symlink
Syntax: symlink("<link-target>", "<link-path1"[, "<link-path2>", "<link-path3>"]);
Creates symlink (like ‘ln -s’).
Example: symlink("/data/app_s", "/system/app"); Creates symlink /data/app_s for directory /system/app
mount
Syntax: mount("<kind>", "<what>", "<path>");
Mounts <what> in the path <path>. <what> should be name of partition if <kind> is "MTD", or block device if <kind> is "vfat"
Example: mount("MTD", "userdata", "/data");
unmount
Syntax: unmount("<path>");
Unmount <path>.
Example: unmount("/data");
ui_print
Syntax: ui_print("<message>");
Prints on screen message <message>
Example: ui_print("Formatting SYSTEM...");
Example of the script file
Code:
show_progress(0.100000, 0);
ui_print("Mounting SYSTEM...");
mount("MTD", "system", "/system");
show_progress(0.100000, 0);
ui_print("Extracting files...");
package_extract_dir("system", "/system");
show_progress(0.400000, 0);
ui_print("Setting permissions...");
set_perm(0, 0, 0644, "/system/framework/framework-res.apk");
show_progress(0.200000, 0);
ui_print("Unmounting SYSTEM...");
unmount("/system");
show_progress(0.100000, 0);
Remember to mount system partition when you are changing something there. Because CWM doesn't mount it
3. OK. Now we are ready to create our own update.zip script:
For example you created modification of theme. The modification contains: /system/framework/framework-res.apk, /system/framework/framework.jar, /system/framework/twframework-res.apk and /system/app/Phone.apk
3.1. create the directory where you will reproduce the structure of update.zip. For example c:\update Create the following directories inside that directory:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3.2. Update script content is described below as example
3.3. Archive the content of that directory as ZIP archive (inside archive shouldn't be update directory!)
That's all! Unsigned update.zip is created
good job. I thing to write aboutClockworkMod Recovery
brilliant woork falex
thumbs up!!!!!
all the noobs cntinuously ask theese sily questions...
i think u should also write about custom roms cyanogen mod and give link for the themes...
good work. I thing you should about CWM
podanimesh said:
brilliant woork falex
thumbs up!!!!!
all the noobs cntinuously ask theese sily questions...
i think u should also write about custom roms cyanogen mod and give link for the themes...
Click to expand...
Click to collapse
I have questions in my PM, also I have answered and read the answers of the same questions, that's why I decide to write this FAQ.
Nice work falex
Awesome, falex007! Brilliant work!
Enviado desde mi GT-I9003 usando Tapatalk
umarian said:
good work. I thing you should about CWM
Click to expand...
Click to collapse
OK. I'll write it now
hey falex can u add something extra on ur thread title llike all questions on I9003 like this because every one is unnecessarily making new threads and making this I9003 section bulky i hope u understand..
podanimesh said:
hey falex can u add something extra on ur thread title llike all questions on I9003 like this because every one is unnecessarily making new threads and making this I9003 section bulky i hope u understand..
Click to expand...
Click to collapse
I can add everything to my post. Just I don't understand what I should add Or may be you don't enter correct link to your post
Also a little bit later I want to add some FAQ about creating themes, creating update.zip updates for CWM
Good God, Someone please sticky this man's thread!! , THIS. I repeat. THIS is what people with ignorance need to read, Sorry as that might sound harsh. But it saves 50 useless threads from being made.
Also a bigass thumbs up from me. And a 5* Rating.
Please make it sticky thread. Its an awsome thread...for this already i have pressed thanx button for u.
Thanks! I think the number of "new threads" will now decrease!
Excellent work and very valuable info, but wait a sec..
falex007 said:
10. When will i9003 have stable GB?
A: i9003 will have stable stock GB firmware when Samsung decide that their firmwares don't have the bugs. For some info we will have this firmware at the September of 2011.
Click to expand...
Click to collapse
did u just say september, what happened to mid july?!
android_and_me said:
Excellent work and very valuable info, but wait a sec..
did u just say september, what happened to mid july?!
Click to expand...
Click to collapse
It's already 19 as of now, I think "Mid July" didn't happen
android_and_me said:
Excellent work and very valuable info, but wait a sec..
did u just say september, what happened to mid july?!
Click to expand...
Click to collapse
I know 3 messages about GB release for i9003:
1. Samsung Mobile India said at May about release in middle of July.
2. Samfirmware.com after posting XXKP7 ment that stable GB for i9003 will be at September.
3. Samsung Mobile Russia said several days before that work is going and they expect the release of GB at neareast weeks, but they can't say the date.
That's why I posted the worst expectation.
Sent from my GT-I9003
hey falex change threas name from faq to post ur questions here...today someone has made a new thread for asking questions.
these stupid people are just useless.so please change the thread title to post all ur questions here. it would be great
podanimesh said:
hey falex change threas name from faq to post ur questions here...today someone has made a new thread for asking questions.
these stupid people are just useless.so please change the thread title to post all ur questions here. it would be great
Click to expand...
Click to collapse
I've changed it. But I think not many people from this forum read the stickies.
For example at the top of all subsections inside "Samsung Galaxy S I9000" section we can see the sticky "[NEW!] SGS Forum Etiquette [i9000] [i9003] [i9000B] [i9000T] [i9000M] [M240S] [02B] +". How many people read and follow instruction in this topic?

[GUIDE] How to make a cwm recovery flashable zip

REQUIREMENTS:
- any file that you want to replace or add to your phone;
- an existing cwm flashable zip file to use as a base - I've attached one below;
- 7-zip;
- Notepad++.
STEPS:
DIRECTORY STRUCTURE:
(1) Download and place the sample.zip anywhere on your desktop;
(2) Right-click on it and choose: "7-Zip / Open archive" [*DO NOT extract; just *Open archive*];
Now you should see two folders: one called "system" and one called "META-INF".
I - FILES AND FOLDERS:
Let's start with the "system" one, so double-click on it:
In there, will go all files that what you want to add or replace to the system. So let's say for example that you want to replace the bootanimation and bootsound. To do so, we have to create sub-directories in the /system/ folder by following this easy method:
- On your desktop, right-click on an empty spot and select "New / Folder" then edit the name to "etc" (no " ") using no CAPS or space at the end;
- repeat the process to make another folder called "media";
- drag those two new empty folders into the /system/ folder of the 7-zip opened archive [just click yes on the popup dialogs];
- now simply drop the two files in their respective place: the sanim.zip file should go in '/system/media' folder and the PowerOn.wav into '/system/etc' folder.
.. If you have more files to add, just follow the logic above; I'm sure you get the idea by now..
/system/app - all the system apps (SystemUI.apk etc)
/system/framework/ -framework-res.apk, twframework-res.apk, android.policy.jar
/system/etc - vold.fstab, PowerOn.wav(bootsound)
/system/media - sanim.zip (bootanimation) (only for custom ROMs)
/system/lib - libraries (*.so)
II - UDATER-SCRIPT
The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged.
That's it !!
Congratulations you've done your first CWM patch !!!
NOTE: Always backup your existing system file that you are going to replace by the patch(zip).
Good Guide!!
There are many more here. Check them
EDIT: Added your Post there. As CWM Flashable Zip Guide.
Hope you are Fine with it.
Thnx so much pankaj.........
Great guide man awesome, thanks!
I've got some questions which I believe you can answer:
1. I come from another device's forum [SAMSUNG Galaxy S II I9100] so I'm not sure, will this method work with any device, or at least with mine?
2. What I'm trying to do is to take the nandroid backup I made for the ROM my device is currently running (whole ROM, along with all the MODs, themes & changes I have on it) and convert it into a CWM flashable .zip file, so:
A. Is this even possible with this method?
B. If it is, just to verify that I got it all right up until now: I decompress the 'system.ext4.tar' file from the nandroid' backup folder and then I push the decompressed system folder into the 'sample.zip' file that I've downloaded from this thread, right?
3. I know for a fact (correct me, if I'm wrong) that a nandroid backup doesn't include a backup of the modem (at least not in my device), so how do I add my currently installed modem to the .zip file?
4. What about the recovery and bootloader, how do I add them?
5. What about "cache.ext4.tar" & "data.ext4.tar", are they necessary in any way?
Itzik68 said:
Great guide man awesome, thanks!
I've got some questions which I believe you can answer:
1. I come from another device's forum [SAMSUNG Galaxy S II I9100] so I'm not sure, will this method work with any device, or at least with mine?
2. What I'm trying to do is to take the nandroid backup I made for the ROM my device is currently running (whole ROM, along with all the MODs, themes & changes I have on it) and convert it into a CWM flashable .zip file, so:
A. Is this even possible with this method?
B. If it is, just to verify that I got it all right up until now: I decompress the 'system.ext4.tar' file from the nandroid' backup folder and then I push the decompressed system folder into the 'sample.zip' file that I've downloaded from this thread, right?
3. I know for a fact (correct me, if I'm wrong) that a nandroid backup doesn't include a backup of the modem (at least not in my device), so how do I add my currently installed modem to the .zip file?
4. What about the recovery and bootloader, how do I add them?
5. What about "cache.ext4.tar" & "data.ext4.tar", are they necessary in any way?
Click to expand...
Click to collapse
(1) This method will work with any device as long as the device has custom recovery (CWM).
(2) a. yes, it is possible
b. decompress system.ext4.tar and push all the files/folders in the system folder to the system folder in the sample.zip
You must add the line in BOLD/italic to the META-INF/com/google/android/updater-script file
Code:
run_program("/sbin/busybox", "mount", "/system");
[B][I]delete_recursive("/system");[/I][/B]
package_extract_dir("system", "/system");
This line has to be added only when you want to replace all the system files/folders
otherwise no need to add.
drag updater-script from sample.zip (open via 7zip, do not extract) to the desktop, make modifications, save & then push it back to the same locations in sample.zip
(3) To include modem.bin :
first drag modem.bin & this file to sample.zip
now the directory structure of sample.zip is as follows
FOLDERS - system, META-INF
FILES - modem.bin, flash_image
add following lines to the META-INF/com/google/android/updater-script file
Code:
package_extract_file("flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
ui_print("Installing modem...");
assert(package_extract_file("modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/flash_image");
(4) Don't know about bootloader, but for recovery, similar step as above:
drag recovery.img to sample.zip
add these lines to updater-script
Code:
package_extract_file("recovery.img", "/tmp/recovery.img");
run_program("/sbin/busybox", "dd", "if=/dev/zero", "of=/dev/block/mmcblk0p8");
run_program("/sbin/busybox", "dd", "if=/tmp/recovery.img", "of=/dev/block/mmcblk0p8");
run_program("/sbin/busybox", "sync");
run_program("/sbin/busybox", "rm", "-f", "/tmp/recovery.img");
(5) No these files are not needed.
Thanks man, you're awesome!!!
I still have several questions though:
pankaj88 said:
b. decompress system.ext4.tar and push all the files/folders in the system folder to the system folder in the sample.zip
You must add the line in BOLD/italic to the META-INF/com/google/android/updater-script file
Code:
run_program("/sbin/busybox", "mount", "/system");
[B][I]delete_recursive("/system");[/I][/B]
package_extract_dir("system", "/system");
This line has to be added only when you want to replace all the system files/folders
otherwise no need to add.
drag updater-script from sample.zip (open via 7zip, do not extract) to the desktop, make modifications, save & then push it back to the same locations in sample.zip
Click to expand...
Click to collapse
OK, puling / pushing files / folders from / to the .zip / .tar files is no problem, but I don't really get the part with this: "updater-script" file...
1. Let's say I've pulled it:
A. What is this file?
B. How can I open and edit it?
C. You say to add those code lines, but I'm guessing there are already several other code lines in it, where do I add those line? Above something else? Below it? Where?
2. Except for this: "updater-script" file, there are also:
META-INF\CERT.RSA
META-INF\CERT.SF
META-INF\MANIFEST.MF
META-INF\com\google\android\update-binary
A. What about those, what are they?
B. Don't they need to be changed as well?
I have more questions about the other parts of your answer, but for now let's live it at that.
I'm really sorry I'm bugging you, but I really like to understand what I'm doing before doing it...
Itzik68 said:
Thanks man, you're awesome!!!
I still have several questions though:OK, puling / pushing files / folders from / to the .zip / .tar files is no problem, but I don't really get the part with this: "updater-script" file...
1. Let's say I've pulled it:
A. What is this file?
B. How can I open and edit it?
C. You say to add those code lines, but I'm guessing there are already several other code lines in it, where do I add those line? Above something else? Below it? Where?
2. Except for this: "updater-script" file, there are also:
META-INF\CERT.RSA
META-INF\CERT.SF
META-INF\MANIFEST.MF
META-INF\com\google\android\update-binary
A. What about those, what are they?
B. Don't they need to be changed as well?
I have more questions about the other parts of your answer, but for now let's live it at that.
I'm really sorry I'm bugging you, but I really like to understand what I'm doing before doing it...
Click to expand...
Click to collapse
(1) It is updater-script file.
CWM flashes the zip file according to the steps mentioned in this file.
lets say
updater-script contains following lines:
Code:
ui_print("| Writing System |");
run_program("/sbin/busybox", "mount", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
Explanation of all the lines:
first line just print "Writing System"
next, mounts system partition so that files can be copied to it
deletes system folder
extract the system folder in the sample.zip to the device system partition
I hope now you have understand what updater-script is all about
You can use notepad++ to edit this file
(2) All the other files should be left as they are. No need to edit those files.
But their presence is necessary in the sample.zip
(these files serve as signature of the zip file)
Download this updater-script file to study more code.
OK, so now my "updater-script" file is looking like that:
Code:
ui_print("SAMPLE CWM FLASHABLE PACKAGE");
run_program("/sbin/busybox", "mount", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "umount", "/system");
package_extract_file("flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
ui_print("Installing modem...");
assert(package_extract_file("modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/flash_image");
Is that right so far?
Itzik68 said:
OK, so now my "updater-script" file is looking like that:
Code:
ui_print("SAMPLE CWM FLASHABLE PACKAGE");
run_program("/sbin/busybox", "mount", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
run_program("/sbin/busybox", "umount", "/system");
package_extract_file("flash_image", "/tmp/flash_image");
set_perm(0, 0, 0777, "/tmp/flash_image");
ui_print("Installing modem...");
assert(package_extract_file("modem.bin", "/tmp/modem.bin"),
run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
delete("/tmp/modem.bin"));
delete("/tmp/flash_image");
Is that right so far?
Click to expand...
Click to collapse
you should study the updater-script file, the link for which I provided in the last reply.
Code:
run_program("/sbin/busybox", "umount", "/system");
this line should come at the last when all the copying & flashing has been done.
It unmount the system partition.
Also you need to set permissions & create symbolic links.
I suggest you to study the updater script file first.
If you found any problem, post here.
pankaj88 said:
you should study the updater-script file, the link for which I provided in the last reply.
Code:
run_program("/sbin/busybox", "umount", "/system");
this line should come at the last when all the copying & flashing has been done.
It unmount the system partition.
Also you need to set permissions & create symbolic links.
I suggest you to study the updater script file first.
If you found any problem, post here.
Click to expand...
Click to collapse
what are symbolic links for? i have studied the updater script you posted.. and did some on my custom rom, both have many symbolic links, what it is for? is it necessary? or just for custom roms?
draiyan said:
what are symbolic links for? i have studied the updater script you posted.. and did some on my custom rom, both have many symbolic links, what it is for? is it necessary? or just for custom roms?
Click to expand...
Click to collapse
for understanding what symbolic links are:
http://en.m.wikipedia.org/wiki/Symbolic_link
it is necessary to have symbolic links for every ROM that you are going to flash via CWM.
Sent from my GT-I9103 using xda app-developers app
pankaj88 said:
- On your desktop, right-click on an empty spot and select "New / Folder" then edit the name to "etc" (no " ") using no CAPS or space at the end;
- repeat the process to make another folder called "media";
- drag those two new empty folders into the /system/ folder of the 7-zip opened archive [just click yes on the popup dialogs];
- now simply drop the two files in their respective place: the sanim.zip file should go in '/system/media' folder and the PowerOn.wav into '/system/etc' folder.
.. If you have more files to add, just follow the logic above; I'm sure you get the idea by now..
/system/app - all the system apps (SystemUI.apk etc)
II - UDATER-SCRIPT
The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged.
Click to expand...
Click to collapse
So i followed these steps with Phone.apk. Made an "app" folder inside the already existing "system" folder. moved my modified "Phone.apk" inside that folder. put on SD card, reboot recovery, choose to install from zip, choose correct zip, and get...
Error: in /sample.zip
(Status 0)
Installation aborted
Any idea. those are my exact steps, i left nothing out.
baldypal said:
So i followed these steps with Phone.apk. Made an "app" folder inside the already existing "system" folder. moved my modified "Phone.apk" inside that folder. put on SD card, reboot recovery, choose to install from zip, choose correct zip, and get...
Error: in /sample.zip
(Status 0)
Installation aborted
Any idea. those are my exact steps, i left nothing out.
Click to expand...
Click to collapse
Try do Mount/System and then flash it. Still if u get some prob, please attach ur cwm zip. Will try to help u buddy.
baldypal said:
So i followed these steps with Phone.apk. Made an "app" folder inside the already existing "system" folder. moved my modified "Phone.apk" inside that folder. put on SD card, reboot recovery, choose to install from zip, choose correct zip, and get...
Error: in /sample.zip
(Status 0)
Installation aborted
Any idea. those are my exact steps, i left nothing out.
Click to expand...
Click to collapse
Do not extract the zip file.
Use "7zip" to open it & make a new folder named as "app" inside the system directory.
Also mount /system in CWM recovery.
Has anyone succeeded in making an update.zip for our device that can be flashed through stock recovery? If yes how to make one?
OK the "mount /system in CWM recovery" is did not do. I did not extract the files. I did use 7zip.
Sent from my Galaxy Nexus
Had the chance to try this last night. Mount /system in CWM didn't allow it either. Same error.
Sent from my Galaxy Nexus using xda app-developers app
I will upload a cwm zip with modified updater script soon.
Sent from my GT-I9103 using xda app-developers app
OP updated with modified "sample.zip".
Thanks !!
somehow i got "installatin aborted"

[zip] Empty Flashable Zip Template

Some people aren't sure how to create a flash-able zip. So here is a template zip file.
If you want to edit the updater-script (what shows up in recovery when you choose the .zip to flash. It it's in META-INF\com\google\android\updater-script, edit with notepad++, and edit in between the parentheses ui_print("Put Your Text Here");
add your .apk/.jar files to the appropriate directory within the zip.
for example, SystemUI.apk would go into system/app
android.policy.jar would go into system/framework
and so-on
http://d-h.st/dJm
andybones said:
Some people aren't sure how to create a flash-able zip. So here is a template zip file.
add your APK files to the appropriate directory within the zip.
for example, SystemUI.apk would go into system/app
framework-res.apk would go into system/framework
and so-on
http://d-h.st/dJm
Click to expand...
Click to collapse
Awesome... I was just about to ask someone for this, so I could easily flash my inverted apps after flashing a new ROM
HAHA...I bet you thought there was gonna be something awesome here, but it's just a regular old signature
GalaxyMOD spilled ink on my MulitiWindows
Most zips I've seen have CERT.RSA, CERT.SF, and MANIFEST.MF in the META-INF folder. Are those not generally needed? Also, do you recommend removing the "NULL" files before flashing?
This is so cool
I have always wanted to be able to create my own mods and not depend on others and I think this is a great first step.
Hopefully someone can give me some guidance.
Every time I re-flash my GS3 I have the annoying (in my opinion) ringtones/alarms/notifications and annoying drip sounds throughout the ui. To remedy this I have folders that contains the sounds from the Galaxy Nexus and I move them into System/media/audio and merge them with the current files and that provides me with all of my currents tones as well as the Nexus tones that I added.
I then took the sounds (unlock/lock/touch sounds) from my Nexus 7 and I put them into System/media/audio/ui. This replaces the ones that are already there. I then have to change the permissions to rw/r/r and then restart and everything works fine.
Can I use your template and then just add in folders to have System/media/audio and then in the media folder have my current folders that I usually merge (alarms/ringtones/notifications) filled with the tones and be able to flash the zip in recovery and have all of my tones there?
Then can I add in the ui folder and add my .ogg's so that the lock/unlock/touch sounds should be the ones from the Nexus? - How will I remedy the permission change issue? Also what if I wanted to disable the camera shutter sound and others - would that be possible.
I know I am asking a lot of (possibly noobish) questions but I am new to this and really want to learn it and use it to its potential. Thanks!
Mastaking said:
I have always wanted to be able to create my own mods and not depend on others and I think this is a great first step.
Hopefully someone can give me some guidance.
Every time I re-flash my GS3 I have the annoying (in my opinion) ringtones/alarms/notifications and annoying drip sounds throughout the ui. To remedy this I have folders that contains the sounds from the Galaxy Nexus and I move them into System/media/audio and merge them with the current files and that provides me with all of my currents tones as well as the Nexus tones that I added.
I then took the sounds (unlock/lock/touch sounds) from my Nexus 7 and I put them into System/media/audio/ui. This replaces the ones that are already there. I then have to change the permissions to rw/r/r and then restart and everything works fine.
Can I use your template and then just add in folders to have System/media/audio and then in the media folder have my current folders that I usually merge (alarms/ringtones/notifications) filled with the tones and be able to flash the zip in recovery and have all of my tones there?
Then can I add in the ui folder and add my .ogg's so that the lock/unlock/touch sounds should be the ones from the Nexus? - How will I remedy the permission change issue? Also what if I wanted to disable the camera shutter sound and others - would that be possible.
I know I am asking a lot of (possibly noobish) questions but I am new to this and really want to learn it and use it to its potential. Thanks!
Click to expand...
Click to collapse
yea you can put those files in their respective folders in the .zip template and flash away
i don't think you need to touch permissions when u flash in recovery .zip
HeadlessPonch said:
Most zips I've seen have CERT.RSA, CERT.SF, and MANIFEST.MF in the META-INF folder. Are those not generally needed? Also, do you recommend removing the "NULL" files before flashing?
Click to expand...
Click to collapse
not too sure what the other files are, perhaps needed for aroma? not too sure.
but yea go ahead and delete null
andybones said:
yea you can put those files in their respective folders in the .zip template and flash away
i don't think you need to touch permissions when u flash in recovery .zip
Click to expand...
Click to collapse
What about disabling things. Is there any way to have a flashable zip change 'shutter.ogg' to 'shutter.ogg.disabled' in a certain directory OR are flashable zips only good for inserting new items (or overwriting current ones)?
You could try making a silent shutter.ogg so that your update zip would replace the current with a silent file.
<Don't ask me how I sent this>
Thanks
HeadlessPonch said:
You could try making a silent shutter.ogg so that your update zip would replace the current with a silent file.
<Don't ask me how I sent this>
Click to expand...
Click to collapse
This is actually what I was thinking about trying. I never actually created the .ogg's and instead just took them off of other devices so I am going to do some research on that now.
Appreciate the response.
Here's a silent Shutter.ogg file:
https://dl.dropbox.com/u/53483750/Shutter.ogg
I just renamed a silent PowerOn.ogg file that I dl'd a while back. You can do the same for pretty much anything you want to silence.
HeadlessPonch said:
Here's a silent Shutter.ogg file:
https://dl.dropbox.com/u/53483750/Shutter.ogg
I just renamed a silent PowerOn.ogg file that I dl'd a while back. You can do the same for pretty much anything you want to silence.
Click to expand...
Click to collapse
Much appreciated.
Sent from my SCH-I535 using xda app-developers app
Hey Andybones
Thank you so much for the template. I have a couple of questions.
1. Can I use this template to make zips for any phone? (or will it require things to be altered?)
2. I would benefit if I was able to use a zip to delete apk's or other files. I found that someone said:
To remove files you'll want:
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
delete("/system/app/blah.apk");
unmount("/system");
Your mount command will probably be different, so check the CM update-script for the equivalent one.
When exploring through the zip template inside META-INF > com > google > android > updater-script I see:
ui_print("Universal Updater Script - by Andybones");
unmount("/system");
show_progress(0.1, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
show_progress(0.500000, 80);
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
show_progress(0.2, 10);
show_progress(0.1, 0);
ui_print("Done!");
show_progress(0.1, 0);
ui_print("Enjoy!!");
show_progress(0.1, 0);
unmount("/data");
unmount("/cache");
unmount("/system");
Can I just add the line delete("/system/app/blah.apk"); somewhere in between the mounts and the unmounts? (I would do this in Notepad ++)
Edit: Solved.
Mastaking said:
Thank you so much for the template. I have a couple of questions.
1. Can I use this template to make zips for any phone? (or will it require things to be altered?)
2. I would benefit if I was able to use a zip to delete apk's or other files. I found that someone said:
To remove files you'll want:
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
delete("/system/app/blah.apk");
unmount("/system");
Your mount command will probably be different, so check the CM update-script for the equivalent one.
When exploring through the zip template inside META-INF > com > google > android > updater-script I see:
ui_print("Universal Updater Script - by Andybones");
unmount("/system");
show_progress(0.1, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
show_progress(0.500000, 80);
package_extract_dir("data", "/data");
package_extract_dir("system", "/system");
show_progress(0.2, 10);
show_progress(0.1, 0);
ui_print("Done!");
show_progress(0.1, 0);
ui_print("Enjoy!!");
show_progress(0.1, 0);
unmount("/data");
unmount("/cache");
unmount("/system");
Can I just add the line delete("/system/app/blah.apk"); somewhere in between the mounts and the unmounts? (I would do this in Notepad ++)
Click to expand...
Click to collapse
Still curious about this, can anyone help?
Mastaking said:
Still curious about this, can anyone help?
Click to expand...
Click to collapse
Try it and let us know
If I've helped you in some way, hit the "Thanks" button
can I place a custom boot animation in here and flash it...? if so, where would I put it?
Thanks
bajasur said:
can I place a custom boot animation in here and flash it...? if so, where would I put it?
Thanks
Click to expand...
Click to collapse
Yes... Inside the system folder... Create another folder and name it media
Then place the boot animation in there
That would be the most common place... Always double check with your rom dev but that's where they all have been on the s3 ROMs I've tried
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
o0BlacknesS0o said:
Yes... Inside the system folder... Create another folder and name it media
Then place the boot animation in there
That would be the most common place... Always double check with your rom dev but that's where they all have been on the s3 ROMs I've tried
Click to expand...
Click to collapse
Thank you!
Sent from my SCH-I605 using xda premium
Yeah, sorry guy.
I SUCK at updater scripts. kinda why all my mods don't include Aroma scripting, lol.
But I'm working on it, I love aroma and it deserves to be used
Awesome!
I could see using this a lot when modding APKs.

[Q] Update.zip script wrong error! help!!

Hi!
I have a problem with my update.zip. Now my zip file has a jar file, xml file, and an apk file. in meta-inf folder : com/android/google/ updater-binary and updater-script. I copied the updater-binary from other rom for my device. Now, I wanna put my jar file to system/framework, put the xml file to system/etc/premissions and put the apk file to data/app. I wrote script but it only puts jar file to system/framework, not all files.
I flashed it in all recoveries, no abort. so how to fix ?
here is my updater-script file :
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_file("com.playstation.playstationcertified.xml", "system/etc/premissions");
package_extract_file("com.playstation.playstationcertified.jar", "/system/framework");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("psmobile.apk", "data/app");
ui_print("message");
ui_print("message");
yashade2001 said:
Hi!
I have a problem with my update.zip. Now my zip file has a jar file, xml file, and an apk file. in meta-inf folder : com/android/google/ updater-binary and updater-script. I copied the updater-binary from other rom for my device. Now, I wanna put my jar file to system/framework, put the xml file to system/etc/premissions and put the apk file to data/app. I wrote script but it only puts jar file to system/framework, not all files.
I flashed it in all recoveries, no abort. so how to fix ?
here is my updater-script file :
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_file("com.playstation.playstationcertified.xml", "system/etc/premissions");
package_extract_file("com.playstation.playstationcertified.jar", "/system/framework");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("psmobile.apk", "data/app");
ui_print("message");
ui_print("message");
Click to expand...
Click to collapse
You should add your recovery mount points too!!! or you want to just download a CWM flashable zip files from one of the forum
Techix18 said:
You should add your recovery mount points too!!! or you want to just download a CWM flashable zip files from one of the forum
Click to expand...
Click to collapse
What and how?
Galaxy Nexus cihazımdan Tapatalk 4 ile gönderildi
yashade2001 said:
What and how?
Galaxy Nexus cihazımdan Tapatalk 4 ile gönderildi
Click to expand...
Click to collapse
First download a custom rom for your device then open the updater script.The updater script will show a line called format('ext4'...... Dev block/.......) which is actually for your device recovery mount points and write the line in your own updater script with the reference of the other updater script.
Click Thanks if i helped!
Techix18 said:
First download a custom rom for your device then open the updater script.The updater script will show a line called format('ext4'...... Dev block/.......) which is actually for your device recovery mount points and write the line in your own updater script with the reference of the other updater script.
Click Thanks if i helped!
Click to expand...
Click to collapse
Ok i do that everytime. But i wanna make UNIVERSAL update. Zips.
Sent from my Galaxy Nexus using Tapatalk 4.
yashade2001 said:
Ok i do that everytime. But i wanna make UNIVERSAL update. Zips.
Sent from my Galaxy Nexus using Tapatalk 4.
Click to expand...
Click to collapse
If you want to make update zips,i suggest you to go download the flashable zip in XDA forums becuase those flashable zips support anything
Click Thanks if i helped!

[PROBLEM] Unable to flash self-made zip file

Device details:
YU Yuphoria YU5010
Software: CyanogenMod 12.1 (Nightly)
Root Access: Yes (By Default)
Bootloader: Unlocked
Recovery: TWRP v2.8.7.0
I made a simple flashable zip which I want to use for installing a different camera app in my device's /system partition. The app works. I've tried it by installing it the traditional way (apk). However I'm not able to flash the zip file. Whenever I try to flash it I get an error
E:Error executing updater binary in zip '/sdcard/cam.zip'
I researched on Google for that error and found many solutions from people facing the same problem. However all those solutions were only for this issue when faced while flashing a new custom ROM, not any other zip. So they were futile for me. Obviously I haven't been wiping anything before flashing my zip file.
My updater-script code:
ui_print("*********************************");
ui_print(" ");
ui_print("********** MIUI Camera **********");
ui_print("*** By Tanmay Vij ***";
ui_print("**********************************");
ui_print("Mounting System...");
run_program(
"/sbin/busybox",
"mount",
"/system"
);
ui_print("Installing Camera...");
package_extract_dir(
"system",
"/system"
);
ui_print("Fixing Permissions...");
set_perm(0, 0, 0644, "/system/app/Redmi1s_MIUICamera.apk");
ui_print("Unmounting System...");
run_program(
"/sbin/busybox",
"umount",
"/system"
);
ui_print("MIUI Camera successfully installed!");
I wonder whether this is gonna happen with me only in TWRP or in other recoveries as well (can't test in CWM as it is not supported for my device). Please correct if any errors in the script..
P.S. I took the update-binary from some random flashable zip as I've heard that it's the same for any zip file..
tvij123 said:
Device details:
YU Yuphoria YU5010
Software: CyanogenMod 12.1 (Nightly)
Root Access: Yes (By Default)
Bootloader: Unlocked
Recovery: TWRP v2.8.7.0
I made a simple flashable zip which I want to use for installing a different camera app in my device's /system partition. The app works. I've tried it by installing it the traditional way (apk). However I'm not able to flash the zip file. Whenever I try to flash it I get an error
E:Error executing updater binary in zip '/sdcard/cam.zip'
I researched on Google for that error and found many solutions from people facing the same problem. However all those solutions were only for this issue when faced while flashing a new custom ROM, not any other zip. So they were futile for me. Obviously I haven't been wiping anything before flashing my zip file.
My updater-script code:
ui_print("*********************************");
ui_print(" ");
ui_print("********** MIUI Camera **********");
ui_print("*** By Tanmay Vij ***";
ui_print("**********************************");
ui_print("Mounting System...");
run_program(
"/sbin/busybox",
"mount",
"/system"
);
ui_print("Installing Camera...");
package_extract_dir(
"system",
"/system" <--- This is the error....!!!
);
ui_print("Fixing Permissions...");
set_perm(0, 0, 0644, "/system/app/Redmi1s_MIUICamera.apk");
ui_print("Unmounting System...");
run_program(
"/sbin/busybox",
"umount",
"/system"
);
ui_print("MIUI Camera successfully installed!");
I wonder whether this is gonna happen with me only in TWRP or in other recoveries as well (can't test in CWM as it is not supported for my device). Please correct if any errors in the script..
P.S. I took the update-binary from some random flashable zip as I've heard that it's the same for any zip file..
Click to expand...
Click to collapse
Try zip me app..
Just make a flashable zip of camera in system...
Unpack it..
Delete the apk file inside..
Paste miui camera apk...
Pack it and flash it that's all..
And extract dir should be /system/app ...
ARAVIND_PAVAN said:
Try zip me app..
Just make a flashable zip of camera in system...
Unpack it..
Delete the apk file inside..
Paste miui camera apk...
Pack it and flash it that's all..
And extract dir should be /system/app ...
Click to expand...
Click to collapse
I've tried Zip Me app.. It works fine.. But this time I wanted to do it from scratch..

Categories

Resources