Commit graph

79 commits

Author SHA1 Message Date
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
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