Commit graph

2359 commits

Author SHA1 Message Date
Doug Zongker
c19a8d5590 support for ext4/EMMC in target_files and OTA generation
Move the image sizes into a more generic key-value file.  Make them
optional.  Add additional key/value pairs describing what kind of
filesystem the device uses.  Pass new fs-type-related arguments in
edify scripts when mounting and reformatting partitions.

Don't include all the init.*.rc files from the regular system in
recovery -- they aren't needed, and break recovery on some devices.

Change-Id: Ic1c651f754ed00ba1cffe8cf56c43f7f3b0ebfd7
2010-09-16 11:34:31 -07:00
Doug Zongker
d3b5916be6 resolved conflicts for merge of 8ae62ec7 to master
Change-Id: Ieb424d1a8467ca13dae43190387e1137c1e396c9
2010-09-13 14:37:20 -07:00
Doug Zongker
ea5d7a9de7 move File and Difference classes into common script
This makes them accessible from device-specific extensions (so they
can be used to send radio images as binary patches, for instance).

Change-Id: I2f2174b93b4265abf9400f9e5a0982caca0771e9
2010-09-12 15:26:16 -07:00
Doug Zongker
5c3dc2ad44 am 9314823c: am 93d574f8: Merge "return to using subprocess for running commands" into gingerbread
Merge commit '9314823c06d4434bf18d589c2fdea490428becf8'

* commit '9314823c06d4434bf18d589c2fdea490428becf8':
  return to using subprocess for running commands
2010-09-03 14:35:49 -07:00
Doug Zongker
93d574f8c5 Merge "return to using subprocess for running commands" into gingerbread 2010-09-03 14:31:03 -07:00
Doug Zongker
39a984550f return to using subprocess for running commands
Reverts Ic4f1c747 and fixes the problem by splitting the extra_flags
argument (it wasn't working before because it was getting one argument
"-c 4096 -s 128" instead of four arguments "-c", "4096", "-s", "128"
and mkyaffs2image apparently just ignores that bogus argument?)

Change-Id: Ib1e08d634aa68bfab0f7e09680d407f2cee0797d
2010-09-03 14:15:34 -07:00
Doug Zongker
c60c1bafa0 resolved conflicts for merge of a4a50996 to master
Change-Id: I52c617ff43aaf9e86b8fb7a2e9c305127566971a
2010-09-03 13:22:38 -07:00
Doug Zongker
c637db16d8 remove remaining amend support
Remove the remaining (unused and untested) support for generating
amend scripts.  This means that you won't be able to OTA directly from
cupcake to gingerbread.

Change-Id: Iaf5295db92a42b336960d05295f48b67cb729337
2010-09-03 11:58:31 -07:00
Ying Wang
e238e5af4c am a9703989: am ae553143: Refactor a bit.
Merge commit 'a97039890e6a1999327cb3e9f2a28bf077a96e07'

* commit 'a97039890e6a1999327cb3e9f2a28bf077a96e07':
  Refactor a bit.
2010-08-27 15:52:03 -07:00
Iliyan Malchev
ddaae7326e Merge "Turn on ASLR by default. The "-a" option now takes an argument (on/off)." 2010-08-27 15:04:39 -07:00
Ying Wang
a4b6db9bf0 am cef82129: am aa6dbe21: Try to fix system.img in update zip file.
Merge commit 'cef82129e1b2a26f883c20521d79175747eac434'

* commit 'cef82129e1b2a26f883c20521d79175747eac434':
  Try to fix system.img in update zip file.
2010-08-27 12:14:58 -07:00
Ying Wang
ae55314348 Refactor a bit.
Change-Id: I4573e7a5239536f49571d9222865e2526da573c8
2010-08-26 16:04:09 -07:00
Ying Wang
aa6dbe2144 Try to fix system.img in update zip file.
Change-Id: Ic4f1c7478a22b1f8134ac768904e437fcfea700a
2010-08-26 15:16:22 -07:00
Hristo Bojinov
dafb042755 Turn on ASLR by default. The "-a" option now takes an argument (on/off).
Change-Id: I4ddc70f2087c23586fc6aaaff3bb862f83d9779d
2010-08-26 14:37:42 -07:00
Ying Wang
f5127dfc3d am 485bd44d: am d421f57d: Fix mkyaffs2image extra flags in the release tools.
Merge commit '485bd44d0d78f9f612075e17db1adb281741c84f'

* commit '485bd44d0d78f9f612075e17db1adb281741c84f':
  Fix mkyaffs2image extra flags in the release tools.
2010-08-25 21:21:43 -07:00
Ying Wang
d421f57d22 Fix mkyaffs2image extra flags in the release tools.
Change-Id: I806e3e85ef89941edf04352331e25730c491c470
2010-08-25 20:39:41 -07:00
Ying Wang
eb85d8d78e am eed6860d: am 4de6b5bf: Fix mkbootimg parameters for releasetools.
Merge commit 'eed6860d388f1761405d7165cb4d72e1f038b8a6'

* commit 'eed6860d388f1761405d7165cb4d72e1f038b8a6':
  Fix mkbootimg parameters for releasetools.
2010-08-25 15:13:07 -07:00
Ying Wang
4de6b5bfc8 Fix mkbootimg parameters for releasetools.
Change-Id: I6192743e9db415f5fe7f3b82081f8a82061254b3
2010-08-25 14:30:17 -07:00
Ying Wang
ee4bad51bc Disable CheckSize on ext partitions to fix build [DO NOT MERGE]
Original CL: 59920

Change-Id: I81437996670a61e10284293d25a08da8907ad296
2010-08-24 11:18:07 -07:00
Ying Wang
065521be4f Backport ext4 support from master [DO NOT MERGE]
ext4 support is needed by crespo.

Change-Id: I604cb9ada526ce8ba6b3648171ac1d614a5519a9
2010-08-23 11:34:40 -07:00
Colin Cross
48642604fd Disable CheckSize on ext partitions to fix build
Change-Id: I66c67f8bbd84eb9da988b4079ad4c36089c1c930
2010-08-03 22:54:30 -07:00
Ying Wang
ee81cd931c Pass partition size to mkuserimg.sh
Change-Id: Id6a53d8d552e8ce1bdf83fbb756724454e05e5c8
2010-08-03 18:05:25 -07:00
Hristo Bojinov
96be7205dc Working ASLR implementation.
ASLR for shared libraries is controlled by "-a" in ota_from_target_files.
Binary files are self-contained (supported by apriori/soslim).

Signed-off-by: Hristo Bojinov <hristo@google.com>
Change-Id: I500e325bf4a70a8d69a2ab9b2938e83dadb4e65d
2010-08-02 14:25:01 -07:00
Doug Zongker
67369983cf generate pseudofilenames for EMMC partitions
Change-Id: Ibe77f4338fed5745c7c650270dcef24988ebfdda
2010-07-07 14:34:59 -07:00
Doug Zongker
b4c7d32cba support for ext4/EMMC in target_files and OTA generation
Move the image sizes into a more generic key-value file.  Make them
optional.  Add additional key/value pairs describing what kind of
filesystem the device uses.  Pass new fs-type-related arguments in
edify scripts when mounting and reformatting partitions.

Don't include all the init.*.rc files from the regular system in
recovery -- they aren't needed, and break recovery on some devices.

Change-Id: I40e49e65f0d76f735259e4b4fef882322cd739da
2010-07-01 15:30:11 -07:00
Doug Zongker
5a3ba25fbf am c58e4f42: am 06acf91f: am 3b85269c: include build timestamp in OTA metadata
Merge commit 'c58e4f42ec27f81cd72d3e5872fd65e13a8e4213'

* commit 'c58e4f42ec27f81cd72d3e5872fd65e13a8e4213':
  include build timestamp in OTA metadata
2010-06-23 10:18:21 -07:00
Doug Zongker
3b85269cfe include build timestamp in OTA metadata
Change-Id: I44292c6346db3356dfafbd044027e37a9b467cfe
2010-06-21 15:31:39 -07:00
Ying Wang
933abf15bc extfs support for img_from_target_files
Change-Id: Ie3df70426066bff467792b8528bc4528eb6afe15
2010-06-17 11:25:27 -07:00
Doug Zongker
027dcb47de am 5324cb81: am ed661dd6: am 1d37a0da: am 2ea21065: add metadata to OTA package in easily-parsed form 2010-05-02 16:15:40 -07:00
Doug Zongker
2ea21065b6 add metadata to OTA package in easily-parsed form
This is only for use by the tools that manipulate OTA packages; it
doesn't touch device code.

Change-Id: I1e21b24b86340d8f86c9d15b2aeb79c461f75d18
2010-04-28 16:05:51 -07:00
Doug Zongker
9ce2ebf5d3 remove remaining amend support
Remove the remaining (unused and untested) support for generating
amend scripts.  This means that you won't be able to OTA directly from
cupcake to gingerbread.

Change-Id: Ie7179a5f2e5ca0d2c0305000344ac39b1dd7385f
2010-04-21 14:17:21 -07:00
Doug Zongker
3475d362a7 fix typo (leftover from some debugging code)
Change-Id: I29a42820ccf8567508f1aeefcc89c2462e9ad43c
2010-03-17 16:39:30 -07:00
Doug Zongker
283e2a1e1b store filesystem config info in target files at build time
Store a dump of the desired uid/gid/mode for every system file in the
target_files zip.  Modify ota_from_target_files to use this stored
information when it is available, instead of running fs_config from
the current client (which might be out of sync from the one where the
target_files zip was built).

b/2516887 - New android_filesystem_config.h needed

Change-Id: I8409a0265d1d50daad9c2bc033c99b74b8931b20
2010-03-15 18:04:15 -07:00
Doug Zongker
c8d446bcde pass blobs to applypatch in incremental OTAs
applypatch now takes patches as blob-valued arguments instead of just
filenames, eliminating the need to unpack all patches to /tmp before
starting to apply them.

Revert the last change I made where sha1_check(read_file(...)) was
substituted for apply_patch_check(...).  apply_patch_check() knows to
check /cache/saved.file if the original source file is missing or has
a bad checksum, which is important if the device loses power or
otherwise restarts during patching.

Change-Id: Ia5b761474b0f809a5a5eed29455b1b145145699e
2010-02-22 15:41:53 -08:00
Doug Zongker
5a48209541 relocate applypatch; check patch integrity
- Delete the applypatch code (it's being moved to bootable/recovery).

- Change the OTA script generator to verify the sha1sum of all the
  patch files after they are unpacked into /tmp.

b/2361316 - VZW Issue PP628: Continuous reset to Droid logo:
            framework-res.apk update failed (CR LIBtt59130)

Change-Id: I5858d48f10127f72e708d50d3de844569d1aff27
2010-02-19 12:14:53 -08:00
Doug Zongker
42265390d9 change incremental OTA file install order
(Cherry-pick from donut.)

Delete the old recovery-from-boot patch before patching system files,
then install the new one at the end of the process.  Also fix an issue
with applypatch returning the wrong status.

Change-Id: I614fce39f307eded696ba792912b863f9fb0580b
2010-02-12 12:20:49 -08:00
Doug Zongker
14833605d2 add UnmountAll function to OTA script; support radio images w/path
Three unrelated changes:

- change the add-radio-file makefile function to support adding files
  with paths.  (The path part of the pathname is stripped off.)

- add an UnmountAll function to the OTA script generation code, so
  that we can explicitly unmount everything we've mounted (in addition
  to doing it automatically at the end of the script).

- add the updater API version to the info object passed to
  device-specific code.

Change-Id: Ia62b15403c1cc8fce8d9910f291450c8077e49f4
2010-02-03 09:21:22 -08:00
Doug Zongker
c09abc8103 update ro.build.tags when signing release builds
Apply the same changes to tags to ro.build.tags that we do for the
tags in the fingerprint (ro.build.fingerprint) and the description
(ro.build.description).

Change-Id: Ie5a057d8f04cbc32d849f91e1f9d2ea7832e81f6
http://b/2363735 - release-key user builds ship with property ro.build.tags == test-keys
2010-01-11 13:14:04 -08:00
Doug Zongker
decf995c59 map -e with no cert to PRESIGNED
Needed for backwards compatibility with scripts that use -e.
2009-12-15 17:27:49 -08:00
Doug Zongker
f6a53aa5f2 add "EXTERNAL" as special value of LOCAL_CERTIFICATE
Setting LOCAL_CERTIFICATE to "EXTERNAL" now marks an apk (either a
prebuilt or otherwise) as needing the default test key within the
system, but one that should be signed after the target_files is
produced but before sign_target_files_apks does the rest of the
signing.  (We use this to ship apps on the system that are signed by
third parties, like Facebook.)
2009-12-15 15:06:55 -08:00
Doug Zongker
714111cbdd include pre-signed prebuilt .apks in apkcerts.txt 2009-12-14 10:14:46 -08:00
Doug Zongker
bbfb96f464 remove shared_uid cert check from sign_targt_file_apks
This check (and others) are now done by the separate script
check_target_files_signatures; the one here is redundant.
2009-12-10 11:22:57 -08:00
Doug Zongker
75f1736469 add signing checker script to releasetools
The check_target_files_signatures determines what key was used to sign
every .apk in a given target_files.  It can compare that signature to
that of another target_files (eg, the previous release for that
device) and flag any problems such as .apks signed with a different
key.
2009-12-09 09:36:41 -08:00
Doug Zongker
e4ea0ab8bd am ae91c7f8: Merge change I5ecba70c into eclair
Merge commit 'ae91c7f8d1962e7c0ba7aa0d57453fe359e2e2d8' into eclair-mr2

* commit 'ae91c7f8d1962e7c0ba7aa0d57453fe359e2e2d8':
  add missing comma
2009-12-03 16:43:37 -08:00
Doug Zongker
5ecba70ce5 add missing comma
A missing comma is breaking the option parsing for the signing tools
(this doesn't affect any device code, only the signing tools).
2009-12-03 16:36:20 -08:00
Doug Zongker
d816500cdd am 8bec09ee: add \'extras\' mechanism to OTA and signing tools
Merge commit '8bec09ee7264160e4e08973a0efcc6bd2c898925' into eclair-mr2

* commit '8bec09ee7264160e4e08973a0efcc6bd2c898925':
  add 'extras' mechanism to OTA and signing tools
2009-12-01 17:14:51 -08:00
Doug Zongker
8bec09ee72 add 'extras' mechanism to OTA and signing tools
Add the -x option which allows arbitrary key-value pairs to be passed
into the device-specific module for doing signing and OTA packaging.
2009-11-30 15:37:14 -08:00
Doug Zongker
5f5f08dd22 stop adding ota-rel-keys tag when signing
ota-rel-keys is now redundant with release-keys, since there are no
"half-signed" builds any more.
2009-10-22 16:09:34 -07:00
Doug Zongker
f2b32f2a4b resolved conflicts for merge of cfd7db6d to eclair 2009-10-07 17:05:36 -07:00
Doug Zongker
cfd7db6d84 move recovery image to the top of the OTA package
Make the recovery image be the first thing installed in system/ in the
OTA package, so it will get installed even if the system partition
fills during OTA installation.
2009-10-07 16:26:00 -07:00
Mike Ritter
239e9f2671 Bug in Mac build where it gets confused over case, fix no longer needed.
(cherry picked from commit e44fadeb49)
2009-09-30 12:09:19 -07:00
Doug Zongker
c18736b1a7 remember device-specific releasetools extensions in target-files
Store the location of the releasetools extensions in the target-files
zip, and make ota_from_target_files use that stored location by
default (though it can still be overridden with -s if desired).
2009-09-30 09:20:32 -07:00
Doug Zongker
481c4e650f fix python syntax error 2009-09-28 10:07:13 -07:00
Doug Zongker
761e642d54 parallellize computation of binary patches
Change ota_from_target_files to compute binary patches for all the
changed files in the OTA package in parallel.  On a recent test build
this cuts incremental construction time roughly in half (6 min to 2
min 40 sec).
2009-09-25 12:35:11 -07:00
Doug Zongker
881dd40ffb improve the OTA progress bar
Make the OTA progress bar advance a bit more smoothly by reallocating
how much is dedicated to various phases of incremental OTA
installation, based on some crude measurements of how long each phase
takes.
2009-09-20 14:03:55 -07:00
Mike Ritter
e44fadeb49 Bug in Mac build where it gets confused over case, fix no longer needed. 2009-09-15 11:18:31 -07:00
Doug Zongker
15604b84e2 use imgdiff -z to diff zipfiles
imgdiff now understands the zip file format and can produce smaller
patches by doing the patching in uncompressed space.  Start taking
advantage of this for .zip, .apk, and .jar files.
2009-09-01 17:53:34 -07:00
Doug Zongker
f76b9c87b1 remove bootloader assertions
These should be done by the device-specific module where necessary;
they aren't appropriate for all devices.
2009-08-27 16:12:00 -07:00
Doug Zongker
2f78b8ba12 am 8fead691: Merge change 22448 into donut
Merge commit '8fead6912ed3f04867974631935435a887ed889d' into eclair

* commit '8fead6912ed3f04867974631935435a887ed889d':
  incremental OTAs should remove /system/recovery.img
2009-08-24 13:39:30 -07:00
Doug Zongker
3b949f0725 incremental OTAs should remove /system/recovery.img
This file has been replaced by the recovery_from_boot.p patch file,
but needs to be removed from existing devices if it exists.
2009-08-24 10:24:32 -07:00
Doug Zongker
1f8b697a7f am e05628cc: fix signing user builds
Merge commit 'e05628cc8df4ec4b69befa9652d81eb81f0ab008' into eclair

* commit 'e05628cc8df4ec4b69befa9652d81eb81f0ab008':
  fix signing user builds
2009-08-20 18:18:29 -07:00
Doug Zongker
e05628cc8d fix signing user builds
When unzipping a target-files which has been signed with OTA key
replacement, you'll get "overwrite this file?" prompts because the key
files appear in the zip files twice.  Suppress these prompts.

Many developer phone products don't define PRODUCT_OTA_PUBLIC_KEYS, so
add a default key.

This change doesn't affect device code.
2009-08-20 18:02:47 -07:00
Doug Zongker
09cf56001a explicitly set max heap size when running signapk
On the mac, -Xmx defaults to 64MB, which isn't enough to do a
whole-file signing of a full OTA package.
2009-08-14 15:25:06 -07:00
Doug Zongker
951495fc48 update OTA package maker to do whole-file signature
Use the new -w flag to SignApk when signing OTA packages.
2009-08-14 14:07:15 -07:00
Doug Zongker
1218b09012 am 1aca962a: allow for malformed imagesizes.txt
Merge commit '1aca962af153d6437937e3e687740d2c1c12657d'

* commit '1aca962af153d6437937e3e687740d2c1c12657d':
  allow for malformed imagesizes.txt
2009-08-04 15:14:01 -07:00
Doug Zongker
1aca962af1 allow for malformed imagesizes.txt
Some builds have blank values for max image sizes; ignore these lines.
2009-08-04 15:09:27 -07:00
Android (Google) Code Review
7d7630cca8 am b6153173: Merge change 9605 into donut
Merge commit 'b6153173952895441e55d0ff6be332bb7c7605e2'

* commit 'b6153173952895441e55d0ff6be332bb7c7605e2':
  use the max image sizes from the target files zip
2009-08-04 14:16:38 -07:00
Android (Google) Code Review
b615317395 Merge change 9605 into donut
* changes:
  use the max image sizes from the target files zip
2009-08-04 14:11:15 -07:00
Doug Zongker
fdd8e69c42 use the max image sizes from the target files zip
For some time now the build system has included all the max image
sizes in a file in the META directory.  Use these instead of needing
to parse the BoardConfig.mk file for the device at the time of
building an image or OTA package.
2009-08-03 17:27:48 -07:00
Doug Zongker
e8cb956b8a am 828bbfb1: in amend, remove symlink targets before creating them
Merge commit '828bbfb18838f04b93ffbed0d7d3b597beaa534c'

* commit '828bbfb18838f04b93ffbed0d7d3b597beaa534c':
  in amend, remove symlink targets before creating them
2009-08-03 16:55:57 -07:00
Doug Zongker
828bbfb188 in amend, remove symlink targets before creating them
amend's symlink command isn't idempotent, so if you restart after the
symlinks have been completed then the second installation attempt will
fail.  Work around this by deleting all symlink targets before
creating symlinks.

Bug: 2020011
2009-08-03 14:11:09 -07:00
Android Git Automerger
358a48e12a merge 73ef8257ce from donut (resolved conflicts) 2009-07-24 12:46:51 -07:00
Android (Google) Code Review
ef9f4ea0b8 am 4d7c4348: Merge change 8295 into donut
Merge commit '4d7c4348077b0f1a713ebffe59b458a5d95fba11'

* commit '4d7c4348077b0f1a713ebffe59b458a5d95fba11':
  applypatch changes for patching recovery image
2009-07-23 23:58:04 -07:00
Doug Zongker
73ef8257ce use a binary patch to install recovery from system
Instead of storing the whole recovery image in system in order to
flash it on first boot, we instead use an imgdiff patch from the boot
image to create the recovery image.  This is substantially smaller
since it effectively only stores the recovery binary and UI images
(the kernel and the init binary are identical to that of the boot
image).

This change modifies the OTA-building script to create and install
these patches, and changes the calculation of the system image size in
the Makefile to reflect the new scheme.
2009-07-23 15:12:53 -07:00
Doug Zongker
6c770467fb applypatch changes for patching recovery image
Make some changes needed to applypatch in order to store the recovery
image in the system partition as a binary patch relative to the boot
image:

  - make applypatch use shared libraries, so it's smaller.  It will
    need to be on the main system so it can install the recovery
    image.  Make an applypatch_static binary for use in recovery
    packages (still needed for updating cupcake devices to donut).

  - output the results of patching to an in-memory buffer and write
    that to the partition; there's no convenient /tmp for us to us.
    (This should be basically a no-op in recovery, since /tmp is a
    ramdisk anyway.)
2009-07-22 19:15:59 -07:00
Doug Zongker
0493e240fd make bootloader requirements optional
Interpret a "*" in the "require version-bootloader" line as "don't
require any specific bootloader".  Sholes OTAs include the bootloader
and the main system in the same package.
2009-07-22 09:28:25 -07:00
Doug Zongker
b606925ef9 am 03061474: in auto mode, generate both edify and amend scripts for full OTAs
Merge commit '030614740c1a22e51c6513058852f9ab368fdf5d'

* commit '030614740c1a22e51c6513058852f9ab368fdf5d':
  in auto mode, generate both edify and amend scripts for full OTAs
2009-07-14 12:54:56 -07:00
Doug Zongker
030614740c in auto mode, generate both edify and amend scripts for full OTAs
Generate packages that can be installed by either amend or edify, so
we can remove amend support from donut.
2009-07-14 12:40:26 -07:00
Doug Zongker
acb8bda3bb am 0f3298a4: delete source files not in target
Merge commit '0f3298a497e32f6c2325a0071124a62d031fae6f'

* commit '0f3298a497e32f6c2325a0071124a62d031fae6f':
  delete source files not in target
2009-07-01 16:01:52 -07:00
Doug Zongker
0f3298a497 delete source files not in target
Incremental OTAs were not removing files from the old build that don't
exist in the new build.  Fix.
2009-06-30 08:16:58 -07:00
Doug Zongker
8e2f2b9b20 ignore missing/bad device-specific releasetools modules
If we fail to load the device-specific releasetools module (ie, if -s
is specified but the file is missing), issue an error message but
continue without any device-specific code.
2009-06-24 14:34:57 -07:00
Doug Zongker
a4ebcbb929 resolved conflicts for merge of e1c31bac to master 2009-06-24 13:58:30 -07:00
Doug Zongker
e1c31bacae make building recovery and boot images optional
If the source target-files zip omits files needed to build the
recovery and/or boot images, leave them out instead of dying with an
error.  This lets build like "generic-userdebug" work.
2009-06-23 17:40:35 -07:00
Android (Google) Code Review
0fbd7da3cd am 55766e47: Merge change 5150 into donut
Merge commit '55766e47aaf4fe72a2b5cdd8aa60d14781c01e94'

* commit '55766e47aaf4fe72a2b5cdd8aa60d14781c01e94':
  don't fail if no required bootloaders are defined
2009-06-23 16:34:08 -07:00
Doug Zongker
9fc74c7823 don't fail if no required bootloaders are defined
Generic targets don't have a list of defined bootloaders.  Instead of
failing to build an OTA package, just omit the constraint.

Fix bad references to ExternalError.
2009-06-23 16:29:13 -07:00
Doug Zongker
05d3dea519 support hooks for device-specific code in OTA package generation
Replace the installation of the "radio image", which is an
HTC-specific notion, with calls to device-specific python modules that
can add whatever additional OTA script commands are necessary.  Add
the -s flag to specify the location of the device-specific script
(replacing the unused -s flag in sign_target_files_apks).
2009-06-22 15:09:22 -07:00
Doug Zongker
ac4920a90b resolved conflicts for merge of c494d7ce to master 2009-06-18 13:42:20 -07:00
Doug Zongker
c494d7cee8 generate OTA packages that use edify
Split the details of generating script syntax into a generator class:
one for amend (whose output should be equivalent to the current
output), and one for edify.

Fix 'otatools' build rule to build imgdiff.
2009-06-18 13:19:07 -07:00
Doug Zongker
d6fb2d40b5 am 602a84e0: fix releasetools for non-linux architectures
Merge commit '602a84e0bbf1807a9403cfa50184241f6fc035c4'

* commit '602a84e0bbf1807a9403cfa50184241f6fc035c4':
  fix releasetools for non-linux architectures
2009-06-18 10:47:13 -07:00
Doug Zongker
602a84e0bb fix releasetools for non-linux architectures
The ota and img building scripts contained some hardcoded 'linux-x86'
paths.  Remove and replace with a slightly redefined -p option.
Modify Makefile to pass correct -p when building.
2009-06-18 10:43:55 -07:00
Doug Zongker
38a649f873 handle BOARD_KERNEL_BASE in releasetools
Some devices define a BOARD_KERNEL_BASE argument which must be given
as an argument to mkbootimg when building a bootable image.  Store the
value of this var (if any) in the target-files zip and use it when
building images.
2009-06-17 09:07:09 -07:00
Doug Zongker
171f1cde10 don't require some OTA features
Make the following things optional:
 - kernel command lines for bootable images
 - radio images
 - bootloader assertions
These are not all (yet?) defined for some new devices.
2009-06-15 22:36:37 -07:00
Doug Zongker
048e7ca15f fix archive files being created with perms 000
In python 2.5 and earlier, ZipFile.writestr(filename, data) results in
the file being added to the archive with permissions 000.  (See
http://svn.python.org/view?view=rev&revision=65235.)  Work around this
by creating a ZipInfo object and setting the permissions explicitly.
2009-06-15 14:31:53 -07:00
Doug Zongker
5da317e51d support incremental updates of boot image
Modify applypatch to be able to write MTD partitions as well as read
them.  Make applypatch save a backup copy of the contents of an MTD
partition it reads in cache, to be used in case an update is
interrupted while writing back to MTD.  Modify OTA package creation
script to send boot image updates in patch form.
2009-06-02 14:09:11 -07:00
Doug Zongker
f6a8bada5f add support for reading MTD partitions to applypatch
Allow an MTD partition so serve as a source "file" in applypatch,
using a magically-formatted 'filename' that specifies the partition
name, size of data to read, and expected hash.  Build incremental OTAs
that update the recovery image via a patch.
2009-06-01 15:48:24 -07:00
Doug Zongker
32da27a9ff build images with minigzip instead of system gzip
Use minigzip (from the zlib distribution, built in the android tree)
to compress images rather than the system install of gzip.  This will
let us send useful patches for images since we can make zlib available
in the applypatch program.
2009-05-29 11:42:57 -07:00
Doug Zongker
8ce7c25e90 improve password entry for signing keys
Allow the user to set ANDROID_PW_FILE to the name of a file for
storing password keys.  When the tools need additional passwords, they
will rewrite this file and invoke the user's editor for the new
passwords to be added.  This allows passwords to be reused across
invocations of the signing tools, without making the user reenter them
every time.

Paranoid users can use a file stored in a ramdisk, or not use this
feature at all (the code will prompt for passwords in the ordinary way
when ANDROID_PW_FILE is not set).
2009-05-22 15:31:08 -07:00
Doug Zongker
eb338efd2e make sure package keys are consistent with shared users
All APKs that want to share a given user id must be signed with the
same key.  Look inside each APK for what (if any) shared user id it
requests, and error out if any with the same shared user are being
signed with different keys.
2009-05-20 16:50:49 -07:00
Doug Zongker
1c390a2aa9 add -e option to add extra commands to OTA script 2009-05-14 19:06:36 -07:00
Doug Zongker
ef85ea6086 allow separate source and target files for applypatch
Allow applypatch to use different filenames for the source and target.
(Using the same filename is still fine; in fact the target filename
can be specified as "-" to mean "same as the source file.)  This will
allow us to still use diffs in the case of files being renamed, and
will allow us to use diffs for the boot and recovery images.
2009-05-08 15:43:26 -07:00
Doug Zongker
962069ce59 add -n option to turn off prereq check when build OTA packages
Developers might legitimately want to install older builds on their
phones, so add option to build OTA packages that will install over
newer builds.
2009-04-23 11:44:08 -07:00
Doug Zongker
dbfaae5567 add -w option to ota_from_target_files
Add option to make OTA packages that wipe user data.
2009-04-21 17:12:54 -07:00
Doug Zongker
ae877013ab generalize -t option to add and remove tags in fingerprints
To support devphone and holiday builds we need more control over the
build fingerprint tags; generalize the -t option so we can arbitrarily
add and remove tags.
2009-04-21 15:56:42 -07:00
Doug Zongker
17aa944001 add option to modify build fingerprint tags when signing
Adds the -t option to sign_target_files_apks, which lets the user
specify extra tags that should be added to the build fingerprint
during the signing process.
2009-04-17 10:15:58 -07:00
Doug Zongker
43874f8c86 make unsigned apks explicit
Allow user to explicitly specify that an apk is not to be
re-signed. Fail if we have any apks that for which no key is provided.
2009-04-14 17:12:20 -07:00
Doug Zongker
547c8cfa7d Merge branch 'readonly-p4-donut' into donut 2009-04-14 12:35:46 -07:00
Doug Zongker
ad88c7ce4f AI 146194: am: CL 146193 Fix signing script so keys specified in -e options get passed
through the key map.  Clarify the help for the -e option to
  make clear this should happen.
  (This change doesn't affect device code.)
  Original author: dougz
  Merged from: //branches/cupcake/...

Automated import of CL 146194
2009-04-14 12:34:27 -07:00
Doug Zongker
8e931bf999 update the cert used for OTA verification when signing
The build system now (in donut) produces builds that use the testkey
cert for OTA package verification.  Change the app-signing script to
also optionally substitute the "real" cert in both the recovery and
system images.  Also fix bug where the build fingerprint and
description were not getting properly updated in the recovery
partition.
2009-04-06 15:21:45 -07:00
Doug Zongker
eef3944eb3 AI 144270: am: CL 144269 Relocate the new (google-indepedent) tools for signing and
building images & OTA packages out of vendor/google.
  No device code is touched by this change.
  Original author: dougz
  Merged from: //branches/cupcake/...

Automated import of CL 144270
2009-04-02 12:14:19 -07:00