Creating AOSP update.zip from Android build environment

2,374 views
Skip to first unread message

Howard M. Harte

unread,
Nov 23, 2009, 9:57:26 PM11/23/09
to android-platform
Is it possible to create an update.zip from the Android build
environment? Say for example, I want to make an update.zip to update
my ADP1 from one build of Master branch to another? I saw some batch
files on XDA that look like they will work, but I'd like to be able to
do it all from my Linux box, and don't want to use fastboot.

I'm hoping there is some build target for this, or something I can
tweak in the makefiles to automatically generate an update.zip.

Thanks,
Howard

Travis B

unread,
Nov 23, 2009, 10:04:18 PM11/23/09
to android-platform
There's no build target, but what you CAN do...

Here, let me copy you my build script. :)

travis@Travis-PC(Gentoo) ~/building/dream-build $ cat build
zip update.zip -r META-INF boot.img data google.sh system
java -jar ../signing/javalib.jar ../signing/testkey.x509.pem ../
signing/testkey.pk8 update.zip traviseclair.zip



you need to use the jarsigning javalib.jar, it is somewhere in out/
host (or out/target/common... I honestly forgot) and use the two
testkeys. Maybe you can get away with other keys-- I just know using
jarsigner with my personal key didn't work. :(

META-INF is not needed, only if you want to run certain scripts. If
you go straight with using your system/ directory, isntead of
extracting the image there's nothing you need to repair (extracting
the image breaks a lot of symlinks, and that's what the purpose of the
META-INF directory before signing is). google.sh is a script I made,
and is not necessary for making an update.zip.

Howard M. Harte

unread,
Nov 24, 2009, 8:59:51 PM11/24/09
to android-platform
Thanks Travis,

The following signing command worked for me, after setting AROOT to
the root directory of my android build tree:

From /out/target/product/dream-open/

$ java -jar $AROOT/out/host/common/obj/JAVA_LIBRARIES/
signapk_intermediates/javalib.jar $AROOT/build/target/product/security/
testkey.x509.pem $AROOT/build/target/product/security/testkey.pk8
update.zip update-signed.zip

Unfortunately I get E: signature verification failed Installation
Aborted
in recovery mode. I will try to debug it to find out what is going
on.

Thanks for your help,
Howard
> > Howard- Hide quoted text -
>
> - Show quoted text -

shridutt kothari

unread,
Aug 16, 2013, 10:21:49 AM8/16/13
to android-...@googlegroups.com
you can use command "make otapackage"
in the android source root directory it will create an OTA zip file in out/target/product/your_build_name/otafile_name.zip
which you can than install through recovery.
Reply all
Reply to author
Forward
0 new messages