avatar
Welcome guest, please
Did you miss your activation email?

Ingresar con nombre de usuario, contraseña y sesión.

Author Topic: [How To] Make A Flashable Update.zip  

Topic Original "No modification"
Tutorial: How to make an Update.zip

For the purpose of this tutorial, I'm going to show you how to make an update.zip that Replaces and pushes a new bootanimation.zip in. I'm going to assume the majority of you are working in a Windows Environment. So you'll need the .zip I attach to this post to make a new .zip.

Tools You'll Need
-A Brain (If you don't have one, please contact your manufacturer and request one)
-7-zip or an equivalent (WinRar)
-Notepad++ (I use this) *In Ubuntu Geddit works perfectly for this*

The Steps
Okay a flashable .zip consists of several prequisites. It contains an Updater-Script housed in /META-INF/com/google/android/. You will need to extract the flashable .zip I have attached here to a directory to view and edit this file. This updater-script tells the phone (the recovery) how to install whatever it is you're trying to install. We use this to make flashable roms and other updates you apply.

To create a flashable.zip that installs a bootanimation, or a set of fonts, or something similar the only thing you'll need to know how to do is to make the flashable.zip delete what was previously there (what you're replacing) and push the new one on. So go ahead and extract the below to a directory. Once you complete that navigate to and open the updater-script. Inside you will find the following:

Code: [Select]
ui_print("Applying New Bootanimation");
run_program("/sbin/busybox", "mount", "/system");
delete("/system/media/bootanimation.zip");
package_extract_dir("media", "/system/media");
run_program("/sbin/busybox", "umount", "/system");
ui_print("New Bootanimation Installed"); 

Now I'm going to break this script down for you and explain how it works.

The first line "ui_print" simply prints a message on the screen. It is not needed but I do it to let you know what's going on in the script.
The second line run_program is running busybox and mounting /system as writable. This is a must in an updater-script if you're going to be deleting anything or adding anything. The syntax will always be the command in this case run_program followed by the directory of the program, what you want it to run and in this case what you want to be mounted. So here we're running busybox from sbin and we're mounting /system as writable.
The next step is to delete what we're going to replace. So we're running delete("/system/media/bootanimation.zip"); cause we're deleting the old bootanimation.zip.

Now in my flashable .zip below you'll notice there's the META-INF folder and a folder called "media". I use media because thats the name of the folder where the bootanimation is housed. If you were replacing a font you'd name the folder fonts (because thats the name of the folder where the fonts are housed). Regardless if you open that folder you will see I put the bootanimation.zip in there.

Now I'll explain the next line: package_extract_dir("media", "/system/media");
This line is telling the phone to find the folder you created in your flashable .zip. In this case it's a folder called "media". The next part of the line is telling the phone where to extract the contents of that directory. In this case its extracting it to /system/media (because that's where the bootanimation is housed on the Optimus Q). *Your phone and rom may vary*

The next line is telling the phone to Unmount /system. You must do this! The syntax for busybox to unmount is "umount". So in this case we're run_program busybox from sbin, we're telling it to unmoun (umount) /system.

And of course the next line is printing a message letting the user know what the status is.

Some things to keep in mind. While you can open an updater-script with other text editors, the reason we use Notepad++ is because it keeps the UNIX formatting of the script. If a script loses that Linux/UNIX formatting it will not work. Opening it with Notepad or WordPad will kill this encoding and the script will no longer work. If you use Notepad++ you can edit Unix based scripts quite easily just remember to save them by hitting CTRL+S or going to File->Save (NOT SAVE AS). You don't want to save it as a .txt file you want to keep this original formatting. If you get status 7 or status 0 errors when flashing an update you probably lost this very important encoding.

And that's it that's how you make an updater-script.

If you want to make an updater-script that say flashes a new font on, obviously you'll need to name the font files the proper names (as seen in your /system/fonts folder).

The next step will be to create a folder called fonts in the update.zips root directory. Put all your (properly named) fonts in there. Then you'll create the updater-script. The script would be as follows.

Code: [Select]
run_program("/sbin/busybox", "mount", "/system");
delete("/system/fonts/Clockopia.ttf");
delete("/system/fonts/DroidSans.ttf");
delete("/system/fonts/DroidSansArabic.ttf");
delete("/system/fonts/DroidSans-Bold.ttf");
delete("/system/fonts/DroidSansFallback.ttf");
delete("/system/fonts/DroidSansHebrew.ttf");
delete("/system/fonts/DroidSansMono.ttf");
delete("/system/fonts/DroidSansThai.ttf");
delete("/system/fonts/DroidSerif-Bold.ttf");
delete("/system/fonts/DroidSerif-BoldItalic.ttf");
delete("/system/fonts/DroidSerif-Italic.ttf");
delete("/system/fonts/DroidSerif-Regular.ttf");
package_extract_dir("fonts", "/system/fonts");
run_program("/sbin/busybox", "umount", "/system");

If we were just going to change say the clockopia font and the droidsans font we'd make the same fonts folder but only put those two replacements in... we'd then run this script:

Code: [Select]
run_program("/sbin/busybox", "mount", "/system");
delete("/system/fonts/Clockopia.ttf");
delete("/system/fonts/DroidSans.ttf");
package_extract_dir("fonts", "/system/fonts");

And that's it. Now, while Updater-Scripts can vary from device to device based on a few things. The above is pretty universale which is why I showed that syntax... enjoy.

The attached .zip is a flashable .zip of the Red Bootanimation.zip from AreaRomQ (for the Optimus Q)

Offline jcole20

  • Co-Admin
  • Posts: 534
  • User Rating: +117/-0
  • I LOVE TO ARGUE
Information topic
  • Date: 30/05/12
  • Time: 12:22 pm
  • Number of visits: 21436
  • Number of Replies: 6
  • Topic Approved: Yes
  • Topic Sticky: Yes
  • Topic Locked: No
  • Poll: No

Re: [How To] Make A Flashable Update.zip

« Reply #1 » Published on:September 30, 2012, 03:10:54 am

Offline prepaidguy9081

  • Thank You
  • Given: 102    Received: 46
  • Posts: 721
  • User Rating: +56/-1
  • Ducksauce
    • King David @ Promodj.com
  • Postaholic
  • *
a brain, thats hillarious. thankyou for this, ive been stumbling for a cupple hours, imma try n make us a boot animation/with sound randomination, used in tandom with rom toolbox boot animation set. should be up soon under samsung galaxy precedent and custum boot animation. that is if i have a brain
  • Custom
  • Samsung Note II/Precedent
  • Clock Work Mod
  • CM7-Precedent
  • Rooted-Rom
If you have any questions please feel free to pm me. I'll help anyone willing to learn.

Donations: never expected, always accepted: aa51@androidarea51.com on paypal [please help keep this sight alive]
phones: samsung precedent, LG Q, HTC Rezound, Samsung Note II, Moto Atrix HD, HTC Evo, Samsung Epic | knowlegable about htc evo and htc inspire and a variaty of samsung






Re: [How To] Make A Flashable Update.zip

« Reply #2 » Published on:September 30, 2012, 02:07:51 pm

Offline wolfbitten83

  • Thank You
  • Given: 51    Received: 7
  • Posts: 214
  • User Rating: +9/-0
  • make it so!
  • Sr. Member
  • *
thank you jcole this is a big help!!!! 8)
  • LG Custom
  • optimus q
  • Clock Work Mod
  • AreaRomQ v2.1

not working for me

« Reply #3 » Published on:October 29, 2012, 01:28:23 am

Offline prepaidguy9081

  • Thank You
  • Given: 102    Received: 46
  • Posts: 721
  • User Rating: +56/-1
  • Ducksauce
    • King David @ Promodj.com
  • Postaholic
  • *
I will continue to try.
i added some ui(""); talking and everything showed once, most times i got a problem with the zip, im trying to add spinning alien head to this and add some ui, the one time it worked it didnt actualy install the boot ani
-update after some more tinkering-
it runs in cwm, i am using notepadd++

all ui scripting shows and cwm says install is successfull ofcourse thats the ui LOL

but it runs

but when i reboot same old boot img, would love to get this working to add another option to install of AA51 spining head
« Last Edit: October 29, 2012, 01:52:40 am by prepaidguy9081 »
  • Custom
  • Samsung Note II/Precedent
  • Clock Work Mod
  • CM7-Precedent
  • Rooted-Rom
If you have any questions please feel free to pm me. I'll help anyone willing to learn.

Donations: never expected, always accepted: aa51@androidarea51.com on paypal [please help keep this sight alive]
phones: samsung precedent, LG Q, HTC Rezound, Samsung Note II, Moto Atrix HD, HTC Evo, Samsung Epic | knowlegable about htc evo and htc inspire and a variaty of samsung






Re: [How To] Make A Flashable Update.zip

« Reply #4 » Published on:April 09, 2013, 05:35:14 pm

Offline mondeo man

  • Thank You
  • Given: 0    Received: 0
  • Posts: 2
  • User Rating: +0/-0
  • Jr. Member
  • *
Hi Jcole
my problem, I took bad advice and changed the bootanimation zip in my note 2 clone, I've done it about 20 times over a short period, but this time I made the file bigger, and now I have the blank screen problem with the phone being alive but blank, I've been trying to make an update zip file using your file but I seem to be getting it wrong, I'm going into recovery after installing the file onto my SD card, and starting the install but within a few seconds UPGRADE ABORTED, The bootanimation file is in System\Media so I thought it would be easy, but it seems more difficult than that, I'm willing to make a nice contribution to your site or whatever if you could help me out with this problem.
thanks in advance.
  • Stock
  • haipai G N7102
  • Stock
  • No Rom

Re: [How To] Make A Flashable Update.zip

« Reply #5 » Published on:April 09, 2013, 05:58:35 pm

Offline thereal_bigjake

  • Thank You
  • Given: 49    Received: 77
  • Posts: 379
  • User Rating: +91/-3
  • Hero Member
  • *
Hi Jcole
my problem, I took bad advice and changed the bootanimation zip in my note 2 clone, I've done it about 20 times over a short period, but this time I made the file bigger, and now I have the blank screen problem with the phone being alive but blank, I've been trying to make an update zip file using your file but I seem to be getting it wrong, I'm going into recovery after installing the file onto my SD card, and starting the install but within a few seconds UPGRADE ABORTED, The bootanimation file is in System\Media so I thought it would be easy, but it seems more difficult than that, I'm willing to make a nice contribution to your site or whatever if you could help me out with this problem.
thanks in advance.

Sounds like it may be the update-binary or the updater script. Grab the update binary from your rom zip and try that. And maybe pastebin your updater-script so we can check it out for ya.

Sent from my Nexus 7 using Tapatalk HD
  • LG Custom
  • LG l55c (Optimus Q) Recovery: TWRP 2.4.4.0
  • Stock
  • AreaRomQ v2.1
  • n/a






Re: [How To] Make A Flashable Update.zip

« Reply #6 » Published on:April 11, 2013, 10:50:28 am

Offline mondeo man

  • Thank You
  • Given: 0    Received: 0
  • Posts: 2
  • User Rating: +0/-0
  • Jr. Member
  • *
Hi Jcole
the problem is The current bootanimation zip file is to large and it makes the screen blank on bootup, all I need to do is to get rid of the bootanimation file, because I can add a different one from inside System when the phone is working correctly, I want to put onto my SD card a update zip that will remove the file, my recovery is called Android system recovery (3e) and I need to go System/media/ etc can you tell me how to make or write a update zip for this please.
Thanks mate
Mansel.
« Last Edit: April 12, 2013, 04:44:17 am by mondeo man »
  • Stock
  • haipai G N7102
  • Stock
  • No Rom




Related Topics

  Subject / Started by Replies Last post
1 Replies
1068 Views
Last post July 01, 2012, 10:31:28 am
by DroidHost
10 Replies
2229 Views
Last post October 03, 2013, 06:10:44 pm
by waldo420
7 Replies
1852 Views
Last post October 22, 2012, 07:57:46 am
by Bustacap
0 Replies
638 Views
Last post October 08, 2012, 09:15:08 am
by prepaidguy9081
9 Replies
1846 Views
Last post December 09, 2012, 07:23:48 pm
by prepaidguy9081
7 Replies
671 Views
Last post March 30, 2014, 07:38:30 pm
by daddy366

Back to top