Commit graph

24 commits

Author SHA1 Message Date
T.R. Fullhart
a28acc6972 Add support for using custom signapk.jar.
Details:
* New --signapk_path, --extra_signapk_args, --java_path.
* New --public_key_suffix, --private_key_suffix so you can change the filenames.
* Fixes raising exceptions on error.

Change-Id: I0b7014b6d779d52ae896f95dfecb1bcccf536cf4
2013-06-05 09:57:55 -07:00
Doug Zongker
b11e2d78ec add missing parameter to ReplaceOtaKeys
Change-Id: Ib596235a8e3b3588d363fea82b92b69895ee5408
2011-10-05 11:23:06 -07:00
Doug Zongker
831840e51b change OTA tools to handle variable dev keys
The signing and OTA-building tools now understand the
default_sys_dev_certificate value which may be present in the
META/misc_info.txt file of the target-files packages.

Change-Id: I64f09ec0b77a5184b6ddb74019255518776ee773
2011-10-04 16:02:01 -07:00
Doug Zongker
e121d6acf4 support TARGET_EXTRA_RECOVERY_KEYS
Specifying one or more key files (without .x509.pem extension) as
TARGET_EXTRA_RECOVERY_KEYS causes them to be included as acceptable
keys for recovery packages.  They are *not* included in otacerts.zip,
so actual downloaded over-the-air packages can't use them, but they
can be used to sign sideload-only packages.

Bug: 3413359
Change-Id: I6f248ffa35f0c6b125dd8a7517493017e236c776
2011-02-01 14:13:52 -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
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
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
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
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
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
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
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