Post Reply

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

OP daktah

22nd July 2010, 11:40 PM   |  #1  
daktah's Avatar
OP Senior Member
Flag Las Vegas, Nevada
Thanks Meter: 99
 
228 posts
Join Date:Joined: Jun 2010
More
thanks to this page for teaching me: http://www.robmcghee.com/android/cre...e-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.
Last edited by daktah; 23rd July 2010 at 12:01 AM.
The Following 88 Users Say Thank You to daktah For This Useful Post: [ View ]
23rd July 2010, 03:14 PM   |  #2  
rori~'s Avatar
Senior Member
Flag Vienna
Thanks Meter: 705
 
3,942 posts
Join Date:Joined: Aug 2009
Donate to Me
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?
The Following User Says Thank You to rori~ For This Useful Post: [ View ]
23rd July 2010, 06:05 PM   |  #3  
Foxwolfe's Avatar
Member
Flag Seattle
Thanks Meter: 4
 
59 posts
Join Date:Joined: Nov 2009
More
What directories do boot animations go into?

Awesome thread and thanks btw.
The Following User Says Thank You to Foxwolfe For This Useful Post: [ View ]
23rd July 2010, 06:38 PM   |  #4  
rori~'s Avatar
Senior Member
Flag Vienna
Thanks Meter: 705
 
3,942 posts
Join Date:Joined: Aug 2009
Donate to Me
Quote:
Originally Posted by Foxwolfe

What directories do boot animations go into?

/data/local/
23rd July 2010, 09:31 PM   |  #5  
daktah's Avatar
OP Senior Member
Flag Las Vegas, Nevada
Thanks Meter: 99
 
228 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by rori~

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

Quote:
Originally Posted by Foxwolfe

Awesome thread and thanks btw.

thanks
The Following User Says Thank You to daktah For This Useful Post: [ View ]
5th August 2010, 12:48 PM   |  #6  
Senior Member
Flag Auckland
Thanks Meter: 1
 
165 posts
Join Date:Joined: Jul 2010
More
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
Attached Files
File Type: zip update_signed.zip - [Click for QR Code] (2.4 KB, 446 views)
5th August 2010, 06:23 PM   |  #7  
daktah's Avatar
OP Senior Member
Flag Las Vegas, Nevada
Thanks Meter: 99
 
228 posts
Join Date:Joined: Jun 2010
More
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
5th August 2010, 11:24 PM   |  #8  
Senior Member
Flag Auckland
Thanks Meter: 1
 
165 posts
Join Date:Joined: Jul 2010
More
Quote:
Originally Posted by daktah

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?
6th August 2010, 06:18 AM   |  #9  
daktah's Avatar
OP Senior Member
Flag Las Vegas, Nevada
Thanks Meter: 99
 
228 posts
Join Date:Joined: Jun 2010
More
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 by daktah; 6th August 2010 at 06:28 AM.
6th August 2010, 08:07 PM   |  #10  
PMDColeslaw's Avatar
Senior Member
Flag Memphis
Thanks Meter: 87
 
1,362 posts
Join Date:Joined: Dec 2008
Donate to Me
More
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 by PMDColeslaw; 6th August 2010 at 08:10 PM.

Post Reply Subscribe to Thread

Tags
flashable, guide, make, package, update
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Android Software Development by ThreadRank