Commit graph

2597 commits

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