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"
Related
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.
Here is an in depth guide on how to create a flashable zip for Recoveries, Kernels, Fonts, System Apps, Bootanimations etc. I will go straight to the point and show everything that needs to be done. Just follow the instructions and you'll be fine.
Pre requisites:
- Basic knowledge on zipping/archiving files
- Basic knowledge on Unix Scripts
- Win rar
- Notepad++
Let's start!
+Bootanimation
- first create two types of folder one for "system" and one for "META-INF."
- then go inside the system folder that you created and create a folder named "media"
- inside "media" save your current boot animation and save it there.
- then let's go to the META-INF folder
- create this folders "com/google/android" so first create "com" then inside "com" create "google" then inside "google" create "android".
- then inside android you need to create a update-binary file and updater-script file (Don't worry I'll attach the specific files at the bottom.)
- then after putting the two files inside the android folder you need to zip the two folders: system and META-INF
- zip those two together not zipping both of them inside a folder. Highlight the 2 Folders right click and add to archive or compress, choose the zip format.
- after that place it in your sdcard and boot to recovery and flash it.
For Updater Script:
run_program("/sbin/mount", "/system");
package_extract_dir("system", "/system");
run_program("/sbin/umount", "/system");
+System Apps of fixes to Certain System Apps:
- first create two types of folder one for "system" and one for "META-INF."
- then go inside the system folder that you created and create a folder named "app"
- inside "app" save your current app or fix for an app located inside the system/app folder of your device and save it there.
- then let's go to the META-INF folder
- create this folders "com/google/android" so first create "com" then inside "com" create "google" then inside "google" create "android".
- then inside android you need to create a update-binary file and updater-script file (Don't worry I'll attach the specific files at the bottom.)
- then after putting the two files inside the android folder you need to zip the two folders: system and META-INF
- zip those two together not zipping both of them inside a folder. Highlight the 2 Folders right click and add to archive or compress, choose the zip format.
- after that place it in your sdcard and boot to recovery and flash it.
For Updater Script:
run_program("/sbin/mount", "/system");
package_extract_dir("system", "/system");
run_program("/sbin/umount", "/system");
+FONTS
- first create two types of folder one for "fonts" and one for "META-INF."
- inside "fonts" save your current fonts and save it there.
- then let's go to the META-INF folder
- create this folders "com/google/android" so first create "com" then inside "com" create "google" then inside "google" create "android".
- then inside android you need to create a update-binary file and updater-script file (Don't worry I'll attach the specific files at the bottom.)
- then after putting the two files inside the android folder you need to zip the two folders: fonts and META-INF
- zip those two together not zipping both of them inside a folder. Highlight the 2 Folders right click and add to archive or compress, choose the zip format.
- after that place it in your sdcard and boot to recovery and flash it.
For Updater Script:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");
+Kernel
- first create a folder for "META-INF along with the "boot.img" (You will not create a folder for boot.img the only folder you'll create is for META-INF."
- then let's go to the META-INF folder
- create this folders "com/google/android" so first create "com" then inside "com" create "google" then inside "google" create "android".
- inside META-INF along side the "com" folder there should be files such as CERT.SF, CERT.RSA and MANIFEST.MF (Dont worry its included in the files that'll I attach.)
- then inside android you need to create a update-binary file and updater-script file (Don't worry I'll attach the specific files at the bottom.)
- then after putting the two files inside the android folder you need to zip the two files: boot.img and META-INF
- zip those two together not zipping both of them inside a folder. Highlight the 2 files right click and add to archive or compress, choose the zip format.
- after that place it in your sdcard and boot to recovery and flash it.
For Updater Script:
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
set_progress(1.000000);
This updater script is for N4 kernels, as you can see "/dev/block/platform/msm_sdcc.1/by-name/boot" this is for this certain device. If you have another device you should know the command line for that.
+Recovery
- first create a folder for "META-INF along with the "recovery.img" (You will not create a folder for recovery.img the only folder you'll create is for
META-INF.)"
- then let's go to the META-INF folder
- create this folders "com/google/android" so first create "com" then inside "com" create "google" then inside "google" create "android".
- now let's go inside META-INF folder
- then inside android you need to create a update-binary file and updater-script file (Don't worry I'll attach the specific files at the bottom.)
- then after putting the two files inside the android folder you need to zip the two files: recovery.img and META-INF
- zip those two together not zipping both of them inside a folder. Highlight the 2 files right click and add to archive or compress, choose the zip format.
- after that place it in your sdcard and boot to recovery and flash it.
For Updater Script:
assert(package_extract_file("recovery.img", "/tmp/recovery.img"), run_program("/sbin/busybox", "dd", "if=/tmp/recovery.img", "of=/dev/block/platform/msm_sdcc.1/by-name/recovery"), delete("/tmp/recovery.img"));
There you go now go create your own flashable zips!!!
Download for flashable zip folders:
Here
Don't forget to RATE THE THREAD and press the THANKS button!!
Link is dead.
The link to download the files "updater-script" and "update-binary" is dead. Please 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!
Hi Guys,
I've never had this problem before but I can't seem to get any zip files I create to flash through TWRP.
I've compressed them with STORE method in 7zip.
I've double checked everything I put in the update-script file.
and I've tried signing them
My directory tree for the zip is as follows:
Code:
-META-INF
CERT.RSA
CERT.SF
MANIFEST.MF
-com
-google
-android
update-binary
updater-script
-system
-priv-app
SystemUI.apk
My updater-script only has a few lines because I'm still trying to just get it successfully run but it is as follows:
Code:
ui_print("Testing if system can be mounted");
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");
with of course an extra empty line at the end.
This is a screenshot of my failed flash:
http://www.mediafire.com/convkey/bba3/r0eidwl8ito77uhfg.jpg
I noticed it says "updater-binary" rather than "update-binary" so I tried changing the name and signing the zip again.
After attempting to flash the unsigned and the signed zip this is the message I get:
http://www.mediafire.com/convkey/ed01/5oh5mqyt6lv8lwffg.jpg
No longer says updater-binary but still getting MD5 error and flash is failing everytime.
I was able to flash the Omni rom I even switched my signed SystemUI.apk with the one in the rom and flashed it fine.
I have downloaded update.zip(s) and flashed them fine. But whenever I edit the update-script my self it doesn't do anything .. I've even tried a simple
Code:
ui_print("message");
and it failed.
Not sure what I am doing wrong never had this problem when i was theming for my Lg Revolution way back when .
Also I'm using Notepad++ and eol conversion is set to unix.
Thanks to anyone with answers.
hackn101 said:
Hi Guys,
I've never had this problem before but I can't seem to get any zip files I create to flash through TWRP.
I've compressed them with STORE method in 7zip.
I've double checked everything I put in the update-script file.
and I've tried signing them
My directory tree for the zip is as follows:
Code:
-META-INF
CERT.RSA
CERT.SF
MANIFEST.MF
-com
-google
-android
update-binary
updater-script
-system
-priv-app
SystemUI.apk
My updater-script only has a few lines because I'm still trying to just get it successfully run but it is as follows:
Code:
ui_print("Testing if system can be mounted");
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");
with of course an extra empty line at the end.
This is a screenshot of my failed flash:
http://www.mediafire.com/convkey/bba3/r0eidwl8ito77uhfg.jpg
I noticed it says "updater-binary" rather than "update-binary" so I tried changing the name and signing the zip again.
After attempting to flash the unsigned and the signed zip this is the message I get:
http://www.mediafire.com/convkey/ed01/5oh5mqyt6lv8lwffg.jpg
No longer says updater-binary but still getting MD5 error and flash is failing everytime.
I was able to flash the Omni rom I even switched my signed SystemUI.apk with the one in the rom and flashed it fine.
I have downloaded update.zip(s) and flashed them fine. But whenever I edit the update-script my self it doesn't do anything .. I've even tried a simple
Code:
ui_print("message");
and it failed.
Not sure what I am doing wrong never had this problem when i was theming for my Lg Revolution way back when .
Also I'm using Notepad++ and eol conversion is set to unix.
Thanks to anyone with answers.
Click to expand...
Click to collapse
It's update-binary. Try this one: https://db.tt/MdWU1rZ8
You can mount /system with this: run_program("/sbin/busybox","mount","/system");
You do not need the signature files in /META-INF
Aerowinder said:
It's update-binary. Try this one: https://db.tt/MdWU1rZ8
You can mount /system with this: run_program("/sbin/busybox","mount","/system");
You do not need the signature files in /META-INF
Click to expand...
Click to collapse
Thanks I renamed it back to update-binary I'm not sure what I did differently but I have one working now.
However I noticed in my post I didn't forget any semi colons, But that will keep the whole file from installing so maybe I had the right setup before and just missed a semi colon.
Thanks again
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.ziphttp://www.megafileupload.com/9ivU/Sytemapp.ziphttp://www.megafileupload.com/9ivU/Sytemapp.zip
framework.ziphttp://www.megafileupload.com/9ivX/framework.zip
WORKING LINKS Sytemapp.ziphttps://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 IT1.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.ziphttp://www.megafileupload.com/9ivU/Sytemapp.ziphttp://www.megafileupload.com/9ivU/Sytemapp.zip
framework.ziphttp://www.megafileupload.com/9ivX/framework.zip
STEPS TO INSTALL IT1.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)