[GUIDE] how to make a flashable package (update.zip)

Search This thread

daktah

Senior Member
Jun 17, 2010
278
111
thanks to this page for teaching me: http://www.robmcghee.com/android/creating-an-android-update-zip-package/
note: although i am copying this from the page, this isnt a straight ctrl+c, ctrl+p from it. ive rewritten it with slightly more english. ok alot more.

before we start, grab ppcgeeks auto signer here, or nothing will flash anyway. its the easiest method since its drag, drop, and click.
also i recommend 7-zip but its not necessarily needed.

first step, make the folder structure.
ive included prebuilt updates to make it a little faster for you. they contain no actual files, just the appropriate folder structure and update script. they must be resigned if you add files and expect to flash them.

if what your looking for isnt included, make a folder and name it "workdir". this will contain your work.
this is just to make it easier to organize all your stuff. if you feel so inclined you can name it whatever you want, it doesnt really matter.
next youll need to make folders inside the workdir according to where your flashing stuff, ie if your flashing wallpapers youd need to make a structure that looks like this: "workdir/system/customize/resource"

next to make the update-script. this tells the system what to do.
first make this folder structure: "workdir/META-INF/com/google/android"
make sure you capitalize "META-INF"
now put a text file into the "android" folder and call it "update-script"
the easiest way to code it would be to copy this into it:
Code:
show_progress 0.1 0
copy_dir PACKAGE:(x) (X):
set_perm_recursive 0 0 0755 0644 (X):(y)
show_progress 0.1 10
replace the (x) with the directory in the root your flashing to in lowercase, ie system or data or sdcard.
replace the (X)'s with the same thing as (x) except in UPPERCASE such as SYSTEM or DATA or SDCARD.
replace the (y) with the next directory in lowercase like media or app or customize.
note: if your adding to the root of (X) folder then leave this blank, no spaces or anything.

if your flashing an app it should look something like this:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
show_progress 0.1 10
after youve done that, save and close the file. now you need to take the extension off of the text file. simply delete the .txt at the end of the file.
if there is no extension showing, make sure you have "hide extensions for known file types" unchecked in tools> folder options> "view" tab.

second to last step! compress the workdir contents into a zip file, not the actual workdir though. it should look like this inside the zip: "update.zip/(folders)" not "update.zip/workdir/(folders)"

finally, sign the zip with the auto signer and put it into the root of the sd card.
boot into recovery and flash it up! with a bit of luck, it should work.

if you have any questions, problems, or concerns just post them. i have instant subscription to this thread and will be notified every 30 min when my evo fetches my mail.
 

Attachments

  • Update-Apps-signed.zip
    2.1 KB · Views: 12,365
  • Update-Notifications-signed.zip
    2.1 KB · Views: 3,161
  • Update-Ringtones-signed.zip
    2.1 KB · Views: 2,848
  • Update-Wallpapers-signed.zip
    2.1 KB · Views: 3,002
Last edited:

nzdcoy

Senior Member
Jul 11, 2010
165
4
Auckland
I keep getting a syntax error. I am trying to flash silent.mp3 so i can select that in my notifications, because for some reason it does not have that option :/

can you let me know where I went wrong?

have tried both
set_perm_recursive 0 0 0755 0644 SYSTEM:media
set_perm_recursive 0 0 0755 0644 SYSTEM:notifications
but to no avail
 

Attachments

  • update_signed.zip
    2.4 KB · Views: 940

daktah

Senior Member
Jun 17, 2010
278
111
what was the whole code in the update-script?
did you use the example i posted?

show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:media
show_progress 0.1 10
 
  • Like
Reactions: joan1280

nzdcoy

Senior Member
Jul 11, 2010
165
4
Auckland
what was the whole code in the update-script?
did you use the example i posted?

show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:media
show_progress 0.1 10

yeah, sorry for not making it clear. Im kinda rote-learning this atm, I did a straight copy of your notifications script into my flashable-zip. when that didnt work I tried it with line3 modified as a stab in the dark.

what does the entire folder structure look like? if I am changing notifications is it /system/media/audio/notification where I put the files?
 
  • Like
Reactions: joan1280

daktah

Senior Member
Jun 17, 2010
278
111
i believe it is
Code:
workdir.zip/
_system/
__media/
___audio/(files).mp3
_META-INF/
__com/
___google/
____android/update-script
if you still cant get it going i can assemble it for you
 
Last edited:

PMDColeslaw

Senior Member
Dec 3, 2008
1,409
92
Memphis
Just wanting to be sure here because Ive read the first post a few times and still can't tell. On the root of the update.zip I am supposed to create the folder structure that I want it to flash too. (ie. media/audio/ringtones) and then place the actual file that im flashing in that directory. (ie media/audio/ringtones/newring.mp3) At this point then the whole .zip dir would look like:

update.zip
__media/
_____audio/
_______ringtones/
__________newring.mp3
__META-INF/
_____com/
_______google/
___________android/
_______________update-script
_____CERT.RSA
_____CERT.SF
_____MANIFEST.MF

Then just sign the .zip and flash it... Is this correct?
 
Last edited:

jpwhre

Senior Member
Aug 3, 2008
556
77
Tucson
Wow sounds real complex just to add an mp3 for a ringtone. I know if you create a file on sdcard

media/
audio
alarm
notifacation

And then put the file you want for what you want into the folder you want it for it will show in dropdown menu so you can select it.

Been trying to get googles auto app builder program to force download the sdk for devices so i can start there first. Want an app that forces mms to the sprint max of 5mb send limit and not stocks 2mb or handsents 1.2 limit. Will doing this according to thread give me an app that does this? What would i need to change? (guess you could make it faster than trying to teach me but still wonder)
 
Last edited:

daktah

Senior Member
Jun 17, 2010
278
111
Wow sounds real complex just to add an mp3 for a ringtone. I know if you create a file on sdcard

media/
audio
alarm
notifacation

And then put the file you want for what you want into the folder you want it for it will show in dropdown menu so you can select it.
thats true but installing saves space on the sd card and makes it load instantly instead of waiting for the sd card to be prepared
Been trying to get googles auto app builder program to force download the sdk for devices so i can start there first. Want an app that forces mms to the sprint max of 5mb send limit and not stocks 2mb or handsents 1.2 limit. Will doing this according to thread give me an app that does this? What would i need to change? (guess you could make it faster than trying to teach me but still wonder)
what? :confused: im lost lol
 

jpwhre

Senior Member
Aug 3, 2008
556
77
Tucson
On wm arcsoft had a setting in the app that lets you change settings and change size limit to 500kb. You can also make these changes in regeditor. Android doesn't have a registory nor does there seam to be an app to install that will allow these changes. Wondering if your tutorial thread would allow the building of an app and what would i need to change to do this. Googles app builder program doesn't come preinstalled with any sdks and on a slow connection i can't get it to download.
 

daktah

Senior Member
Jun 17, 2010
278
111
if your saying building an app as in coding and assembling one then no as this is just a guide to make an installable zip to flash with ra or clockwork. youd need to use the sdk tools and such for that. but this guide should allow you to install pretty much anything into the nand from ringtones to apks and the like.
 
Last edited:
so, i'm by no means an expert at this... but i was trying to make an update.zip for wallpapers. i've attached what i did, if you could take a peak at it and give me a pointer, that would be awesome!

path to my wallpapers...

using launcherpro
data/app/com.fede.launcher-1.apk/res/drawable-hdpi
data/app/com.fede.launcehr-1/apk/res/drawable-mdpi
 

Attachments

  • Update.zip
    5.5 MB · Views: 438

nuformzdesign

Senior Member
Apr 1, 2010
161
20
granted, I'm trying to flash a theme, but it seems like the process and folder/file structure would be the same.

I've followed the steps one by one, but after flashing the .zip in recovery and rebooting, everything looks the exact same as it did before! I figured I would start with framewor-res, and see if I could get that to work before I started working on all the other images, but even after modifying all images, straightening out the .9.png's, and compiling everything correctly in Eclipse, I get nothing.

I have no effing clue what's going on, any ideas?
 

blakestiffler

Senior Member
Jan 26, 2010
235
4
im on a mac, any suggestions for what i can use to sign the zip? i have apk manager and thempro and they can both sign apps but i dont know if its okay to use them to sign a flashable zip
 

Kiro04

Member
Mar 20, 2010
19
1
San Cristóbal
Redmi K20 Pro
Hi man!
I'm not do a Update.zip yet with your tutorial, but i have a question:
some Update.zip have a file named updated-binary together with update-script, how i do that file? because when i try to flash via OpenRecovery say's that coul'd not find that file: update-binary...

Sory for my english, i'm from Argentina, and i try not to use Google Translate...

Regards!!!

PS: Great work with this tutorial!!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 97
    thanks to this page for teaching me: http://www.robmcghee.com/android/creating-an-android-update-zip-package/
    note: although i am copying this from the page, this isnt a straight ctrl+c, ctrl+p from it. ive rewritten it with slightly more english. ok alot more.

    before we start, grab ppcgeeks auto signer here, or nothing will flash anyway. its the easiest method since its drag, drop, and click.
    also i recommend 7-zip but its not necessarily needed.

    first step, make the folder structure.
    ive included prebuilt updates to make it a little faster for you. they contain no actual files, just the appropriate folder structure and update script. they must be resigned if you add files and expect to flash them.

    if what your looking for isnt included, make a folder and name it "workdir". this will contain your work.
    this is just to make it easier to organize all your stuff. if you feel so inclined you can name it whatever you want, it doesnt really matter.
    next youll need to make folders inside the workdir according to where your flashing stuff, ie if your flashing wallpapers youd need to make a structure that looks like this: "workdir/system/customize/resource"

    next to make the update-script. this tells the system what to do.
    first make this folder structure: "workdir/META-INF/com/google/android"
    make sure you capitalize "META-INF"
    now put a text file into the "android" folder and call it "update-script"
    the easiest way to code it would be to copy this into it:
    Code:
    show_progress 0.1 0
    copy_dir PACKAGE:(x) (X):
    set_perm_recursive 0 0 0755 0644 (X):(y)
    show_progress 0.1 10
    replace the (x) with the directory in the root your flashing to in lowercase, ie system or data or sdcard.
    replace the (X)'s with the same thing as (x) except in UPPERCASE such as SYSTEM or DATA or SDCARD.
    replace the (y) with the next directory in lowercase like media or app or customize.
    note: if your adding to the root of (X) folder then leave this blank, no spaces or anything.

    if your flashing an app it should look something like this:
    Code:
    show_progress 0.1 0
    copy_dir PACKAGE:system SYSTEM:
    set_perm_recursive 0 0 0755 0644 SYSTEM:app
    show_progress 0.1 10
    after youve done that, save and close the file. now you need to take the extension off of the text file. simply delete the .txt at the end of the file.
    if there is no extension showing, make sure you have "hide extensions for known file types" unchecked in tools> folder options> "view" tab.

    second to last step! compress the workdir contents into a zip file, not the actual workdir though. it should look like this inside the zip: "update.zip/(folders)" not "update.zip/workdir/(folders)"

    finally, sign the zip with the auto signer and put it into the root of the sd card.
    boot into recovery and flash it up! with a bit of luck, it should work.

    if you have any questions, problems, or concerns just post them. i have instant subscription to this thread and will be notified every 30 min when my evo fetches my mail.
    2
    Thanx for this thread!

    Ok, my app should be installed in /system/app/
    but is it possible to include in the same (app)update-script: delete /data/app/xxx.apk?
    2
    What directories do boot animations go into?

    Awesome thread and thanks btw.
    2
    Ok, my app should be installed in /system/app/
    but is it possible to include in the same (app)update-script: delete /data/app/xxx.apk?

    honestly, i couldnt tell you for sure but i dont see why you couldnt

    Awesome thread and thanks btw.

    thanks :)
    2
    I keep getting a syntax error. I am trying to flash silent.mp3 so i can select that in my notifications, because for some reason it does not have that option :/

    can you let me know where I went wrong?

    have tried both
    set_perm_recursive 0 0 0755 0644 SYSTEM:media
    set_perm_recursive 0 0 0755 0644 SYSTEM:notifications
    but to no avail