Commit graph

1082 commits

Author SHA1 Message Date
Ying Wang
d7321d31ac Skip userdata.img only if partition size is not give for extfs.
We still build yaffs2 images which don't need partition size.

Change-Id: I9c7f45069f25868666a257cee044faecf1a8781a
2013-03-15 10:32:29 -07:00
Ying Wang
6a42a25429 Run e2fsck only when building images with the target files.
With this change, e2fsck is run only when you build the update.zip file,
which is built when "dist" is among the make command.

Bug: 7591683
Change-Id: I446b71d5aa9295aff3af622f115175f769746615
2013-02-27 13:54:02 -08:00
Ken Sumrall
3b07cf1277 Add unified fstab support to release tools
Update the release tools to be able to handle the new unified fstab.

Change-Id: Id9d1810c89aba415e83ae2fc586520f148ec73ef
2013-02-21 16:26:46 -08:00
Ying Wang
a7c8f72b40 Use the correct size key
At this point, userdata_size has been converted to partition_size in
build_image.ImagePropFromGlobalDict().

Change-Id: Ida6be1905ca3109c2660274a16359a9f3fbcd94d
2012-11-27 11:29:11 -08:00
Ying Wang
69e9b4d6d1 Run e2fsck on built sparse images.
Bug: 7591683
Change-Id: Id1cba79f7840aab1f0327cb741eda655b45d1b46
2012-11-27 09:57:17 -08:00
Ying Wang
4e3f44f356 Skip userdata.img if no size is provided when building images from target files
Change-Id: Iab5c510fcc7608c4b109781e6595ab8964f4c543
2012-11-19 10:38:44 -08:00
Doug Zongker
b32161a2a5 change recovery partition construction to use resource .dat
When /system/etc/recovery-resource.dat is available, use it to
construct the recovery-from-boot patch.

Change-Id: I1575f7d284711323186ca6823842eb2a866fd890
2012-08-21 10:33:44 -07:00
Doug Zongker
1eb74dd9a0 load SYSTEM/build.prop into the info_dict
Change-Id: Ic747106ba11773ffc9c2eebc163cfd22b1d7a4d5
2012-08-16 16:19:00 -07:00
Doug Zongker
24cd280328 allow diff program to be selected explicitly
Change-Id: I1d8df9cc3ed35cc5983bc50fc13975db32072dbe
2012-08-14 16:36:15 -07:00
Doug Zongker
d513160b76 add extra args to mkbootimg
Arrange to take $(BOARD_MKBOOTIMG_ARGS) and pass it to all invocations
of mkbootimg from within make, and to store it in the target_files so
it can be used by future invocations of img_from_target_files and
ota_from_target_files.

Bug: 6918260
Change-Id: I7130ac52e96bd51d4d8b80ca036635e1626f01f1
2012-08-02 15:03:41 -07:00
Doug Zongker
fffe1d5e9c use the file uid/gid/mode saved in the target_files
When building a bootable image with mkbootfs, use the set of file
metadata that's stored in the target_files zip (when available),
rather than whatever is built into the mkbootfs binary at the time the
image is built.

Bug: 6435132
Change-Id: If6c59149bdbcc9a67e5ab9161398f355bd1f511d
2012-05-03 16:15:29 -07:00
Kenny Root
f32dc71e49 resolved conflicts for merge of a86fcc29 to master
Change-Id: I3868c19bfd309b5b43b5642152a120931fe37315
2012-04-09 14:59:04 -07:00
Stephen Smalley
56882bf9b4 Support the setting of file security contexts in OTA and update packages.
Pass the file_contexts configuration to the releasetools scripts
so that the security contexts of files can be properly set for OTA
and update packages.

Requires Ica5fb73d6f2ffb981b74d1896538988dbc4d9b24

Change-Id: I5a63fd61a7e74d386d0803946d06bcf2fa8a857e
2012-04-06 15:35:41 -04:00
Doug Zongker
1807e700a5 don't generate retouch commands in OTA scripts
Doing ASLR at OTA time is now obsolete; we can stop emitting this code
in OTA scripts.

Change-Id: I2bcf8ef0697ea5590120f89dcd302f273daf531e
2012-02-28 12:21:08 -08:00
Andrew Boie
0f9aec837f releasetools: Fix image size checking
A block of code that should be evaluated for all
image types was instead only being run for yaffs
partitions.

Change-Id: I83ccbd7fa3c1bc02b9bba0832701ecc258e40a7d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-02-21 12:45:23 -08:00
Doug Zongker
e5ff5907be add device-specific hooks at start of OTA phases
Change-Id: I47534e6d40e7918ee8cb9e87d76d9030b9273708
2012-01-17 10:55:37 -08:00
Doug Zongker
bd2dadc21a check entire recovery partition on startup
Checksum the entire recovery partition at boot time to see if we need
to rewrite it, rather than just the first 2kb.

Bug: 5668350
Change-Id: I777754f92e8da630ae3c09bb0d4c41884ff62f39
2011-12-02 13:55:57 -08:00
Doug Zongker
0276d18873 check entire recovery partition on startup
Checksum the entire recovery partition at boot time to see if we need
to rewrite it, rather than just the first 2kb.

Bug: 5668350
Change-Id: I777754f92e8da630ae3c09bb0d4c41884ff62f39
2011-12-02 10:46:59 -08:00
Doug Zongker
402839d17a am 29ea81eb: am 4a84a13e: am a5f534df: use frozensets to represent APK cert sets
* commit '29ea81eb977699a2b026f08d13f213a7d216cb7e':
  use frozensets to represent APK cert sets
2011-11-11 20:36:58 -08:00
Doug Zongker
a5f534df07 use frozensets to represent APK cert sets
Change-Id: Ic92c83be0c3f6a76bf1bd21f0216cd1b87586959
2011-11-11 09:51:37 -08:00
Ying Wang
9f8e8db188 Build cache.img on demand
Bug: 5153694
To build cache.img, set BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE (required,
ext4 only for now), BOARD_CACHEIMAGE_PARTITION_SIZE (optional) in
BoardConfig.mk.

Change-Id: I1d8b91646aa1dba88285e008ad3335768bcbddd2
2011-11-10 14:30:34 -08:00
Doug Zongker
4906f456a4 am 53bef54c: am 4b87f575: am 278c9781: to be upgraded, APKs must have exactly the same set of certs
* commit '53bef54cfff0cb9c6a67494b3e385a9617f75d03':
  to be upgraded, APKs must have exactly the same set of certs
2011-11-10 16:14:42 +00:00
Doug Zongker
278c9781ec to be upgraded, APKs must have exactly the same set of certs
Change-Id: I0d528d3d55e5ee553e57e63ed1f998172c6306f8
2011-11-09 10:32:23 -08:00
Ying Wang
c0debb9b5e Revert "Build cache.img."
This reverts commit 531bdb546a.
2011-11-02 11:19:28 -07:00
Ying Wang
531bdb546a Build cache.img.
Change-Id: I3dbe7afa4934fa718ba20605eebd2e3ce2ae82ab
2011-11-01 10:44:19 -07:00
Ying Wang
bd93d425ae Unify the user image building code
Bug: 5398808

Before this change we have duplicate code in the Makefile and the
python-based releasetool. That's a real headache to maintain.

Change-Id: I8ddf04a79c6886540e89d990f723d8f77c9dd883
2011-10-31 17:11:35 -07:00
Jeff Davidson
033fbe28c2 Support signing target_files without a recovery.fstab.
Change-Id: I7d6f511c69d589bf035ac3eb7eeee4b0e0505faa
2011-10-26 18:16:13 -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
b40a58e4b3 allow APKs to be signed with multiple certs
The Package Manager handles this now.  To share a UID, all packages
must be signed with exactly the same set of certs.

Change-Id: I2fd08923f55f02ae2f1d503266ab124be2472921
2011-09-29 13:22:57 -07:00
Doug Zongker
e92f15a858 patch the /system/build.prop file last
Works around a problem observed on a retail device: incremental update
from build 1 to build 2 partially completed, leaving a mix of files
from the two builds.  (Why it booted into the regular system instead
of recovery to restart update installation is still a mystery.)
build.prop was one of the files updated, so the device reported itself
as having build 2.  The device hobbled along for months in this state,
until build 3 was released and the 2-to-3 incremental package
repeatedly failed (because some of the files it was trying to patch
were build 1).

This change makes updating build.prop the very last thing does by an
incremental update script, so if installation is aborted and the
regular system starts (and works at all), it will continue reporting
itself as build 1 and be sent the 1-to-2 OTA package again.

Change-Id: I1edc1dcef2bd2495b6fd96517c2f4c574b994f27
2011-08-26 13:46:40 -07:00
Ying Wang
bed0a19583 am 6d38bdfc: resolved conflicts for merge of a74a4811 to honeycomb-plus-aosp
* commit '6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8':
  sha module is deprecated
2011-08-11 16:59:48 -07:00
Ying Wang
6d38bdfc7b resolved conflicts for merge of a74a4811 to honeycomb-plus-aosp
Change-Id: I8400ac2bead6aa1a9902d44bf65906084ad353ad
2011-08-11 16:55:00 -07:00
david
cad0bb9f62 sha module is deprecated
This patch removes the deprecated warnings from the python
scripts.

Change-Id: I052a0aab3fb28dd1d78de1307edafda6b6c35e5f
2011-08-10 17:48:04 -07:00
Doug Zongker
02da210a5c pass blobs to write_raw_image() instead of using temp file
Change-Id: I73b71541596612552d52a8f7b1ccdd74451ac6fc
2011-04-12 15:50:17 -07:00
Ying Wang
eb68729bf3 am 080ed92e: Merge "Close inherited PIPE before doing work" into gingerbread
* commit '080ed92e77fc7c24ca3bac1a1dc06057390bfdb8':
  Close inherited PIPE before doing work
2011-03-15 18:21:20 -07:00
Ying Wang
080ed92e77 Merge "Close inherited PIPE before doing work" into gingerbread 2011-03-15 17:49:05 -07:00
Ying Wang
70d6ec5f9b resolved conflicts for merge of 0a1f3236 to honeycomb-plus-aosp
Change-Id: I6596f4a65a99eed98bdca2d8a6840bc378297b6d
2011-03-07 11:07:12 -08:00
Ying Wang
0a1f3236e3 am a73b6561: Drop support for target files with no recovery.fstab.
* commit 'a73b6561cee39ad416f4af327dbe72ec565d2423':
  Drop support for target files with no recovery.fstab.
2011-03-04 17:13:04 -08:00
Ying Wang
a73b6561ce Drop support for target files with no recovery.fstab.
Change-Id: I099298cfffc2546975732a3bf0df60f96ccbdac4
Meanwhile don't build the ota and update zip files if no recovery.fstab
found.
2011-03-04 14:42:13 -08:00
Doug Zongker
369985c6f2 remove vestigial WriteFirmwareImage function
Nothing calls this, and the updater function it calls no longer
exists.  The HTC-device-specific thing it used to do was moved to HTC
extension libraries.

Change-Id: I2252adf44ea0c5beb6e9379215d7337880f66f68
2011-03-02 10:57:06 -08:00
Doug Zongker
ca855e9c0a increase java heap size when signing packages
Large OTA packages are causing signapk to run out of memory.

Change-Id: I511b9b5fb2d303805006ca76458f44bf72faeff2
2011-02-23 09:25:01 -08:00
Doug Zongker
086cbb0acb read partition length from recovery.fstab
Don't hardcode magical partition behavior in the script generator.

Change-Id: I4aeea022f8a32a7c9f316be2c2514510344ca0e0
2011-02-23 09:04:33 -08:00
Ying Wang
7e6d4e45d9 Close inherited PIPE before doing work
Gmake in Darwin has file descriptor leak.
In a full build, ota_from_target_files will inherits
more than 2000 open PIPEs from gmake and fails in a call to select.select().
This change fixes the build by closing the PIPEs before doing real work.

Change-Id: Ie7035d7add0b1da3afb6bf9c2009d40f8c7d29b3
2011-02-10 11:36:43 -08: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
6ae5381670 fix check_target_files_signatures
common.UnzipTemp now returns a 2-tuple instead of just a string.

Bug: 3398407
Change-Id: Ifd0408283aaa15752caa549f4510a0a3db03c3fd
2011-01-27 10:20:27 -08:00
Doug Zongker
55d932840f support use of prebuilt bootable images
img_from_target_files now, with the -z flag, will produce an output
zip with only the bootable partitions (boot and recovery).

img_ and ota_from_target_files can take, instead of a simple
"target_files.zip", a name of the form
"target_files.zip+bootable_images.zip", where the second zip contains
bootable images that should be used instead of building them from the
target_files.zip.  (This should be the zip produced by the above -z
flag, perhaps with the images messed with in some way, such as by an
unnamed OEM's extra signature wrapper for their "secure boot"
process.)

Bug: 3391371
Change-Id: Iaf96dfc8f30e806ae342dcf3241566e76ae372d4
2011-01-25 17:07:09 -08:00
Michael Chan
b43ac8fc2f Fix build break
Change-Id: Ie07f042a9f25bf3329cf2cea8fdeea3e208da775
2011-01-19 21:12:41 -08:00
Ken Sumrall
a67616acfd Teach the build system to reserve the last 16 Kbytes of /data for the crypto footer
If making /data and it's an EMMC interface, reserve the last 16 Kbytes
of the partition for the crypto footer.

Change-Id: Ia2c0bb53a545f074e79fc9d6ac04faee75fb9be4
2011-01-19 17:14:51 -08:00
Ying Wang
085a14698b Product-configurable sparse ext images.
Also pass extfs sparse image flag to the release tool.

Change-Id: I79a6a71873634a231aa8990cee22374259601505
2010-12-28 13:41:33 -08:00
Ying Wang
f9bbfb5772 Close inherited PIPE before doing work
Gmake in Darwin has file descriptor leak.
In a full build, ota_from_target_files will inherits
more than 2000 open PIPEs from gmake and fails in a call to select.select().
This change fixes the build by closing the PIPEs before doing real work.

Change-Id: Ife021382198642a97bbbf0b623e4f24f3d86b2b2
2010-12-13 16:25:36 -08:00
Ying Wang
c5a07ce038 Pass extfs sparse image flag to the release tool.
Change-Id: Icb2a1c4fddb2b6153298ba1b849016aa3d792773
2010-11-17 17:45:36 -08:00
Ying Wang
421b46e0cb resolved conflicts for merge of 18c00c5c to master
Change-Id: I7f6870b654e24a268a14b9c47eb8d384993273f2
2010-09-28 10:45:54 -07:00
Ying Wang
026f1451ce Fix userdata partition's ext4 mount point to data.
Bug: 3041475
Change-Id: I07306cd9c90072626dfc132d6655618ae70e64be
2010-09-27 17:49:03 -07:00
Doug Zongker
e1c292a06b am 8317e664: am 96a57e73: make info_dict and GetTypeAndDevice available to device extensions
Merge commit '8317e66433903badaec8ebd2b9ec2b8153f3d612'

* commit '8317e66433903badaec8ebd2b9ec2b8153f3d612':
  make info_dict and GetTypeAndDevice available to device extensions
2010-09-26 15:17:44 -07:00
Doug Zongker
96a57e7377 make info_dict and GetTypeAndDevice available to device extensions
Change-Id: I3aa04cb6d7988fc1fdd7f179634b09ceab5749fb
2010-09-26 14:57:41 -07:00
Doug Zongker
f2ab290550 accommodate both new and old target-files when creating incrementals
(cherry-picked from gingerbread.)

Change-Id: I925bf122b0012302a85c0b6f04cca48eb694b0c4
2010-09-22 10:17:31 -07:00
Doug Zongker
780c237270 accommodate both new and old target-files when creating incrementals (do not merge)
Change-Id: Ibc211164bf1dee8275e15d10cbe81b63d666069f
2010-09-22 10:12:54 -07:00
Doug Zongker
539db3b845 resolved conflicts for merge of e1daf61d to master
Change-Id: Idf5767f68dd19b51940ea69528cdd389b04d56b9
2010-09-21 20:10:32 -07:00
Doug Zongker
ad806982c1 arg: system_size, not system_img
Change-Id: Iba5d10204c93159a4f12ea8e8d8687db5b9dd5ca
2010-09-21 17:22:14 -07:00
Doug Zongker
33a4b08b15 fall back to MTD if no recovery.fstab is present
Needed for non-device builds (like for the emulator) to work.

Change-Id: I5fdbfb3af34821811744e8ce5bf1eff8df344c73
2010-09-21 16:12:55 -07:00
Doug Zongker
c0434ac8b5 add recovery.fstab as dependency so it triggers rebuild (do not merge)
Make recovery image depend on the fstab file so it gets rebuilt when
fstab changes.  Add support for "emmc" fstab partition type to
edify_generator.

Change-Id: Ic5df4e86c24321bf7d82a644e3e4770352e4f64b
2010-09-21 14:26:36 -07:00
Doug Zongker
9ce0fb6e59 support for per-partition fs_type
Include the recovery.fstab file in the recovery image.  Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.

(Cherrypicked from gingerbread w/some edits to resolve conflicts.)

Change-Id: Ic3ed85ac5672d8fe20280dacf43d5b82053311bb
2010-09-21 14:13:11 -07:00
Doug Zongker
258bf46ea6 support for per-partition fs_type (do not merge)
Include the recovery.fstab file in the recovery image.  Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.

Change-Id: I35ee2dd0989441dc2a704b63c1b32e598049acb5
2010-09-21 09:55:29 -07:00
Doug Zongker
cb269124bb am 25df2a98: am 6be030af: Merge "remove remaining refs to max_image_sizes" into gingerbread
Merge commit '25df2a980d87f011fe702b6209c3b71b2824fc18'

* commit '25df2a980d87f011fe702b6209c3b71b2824fc18':
  remove remaining refs to max_image_sizes
2010-09-17 08:24:37 -07:00
Doug Zongker
1684d9c0cf remove remaining refs to max_image_sizes
Change-Id: I7e4686bc06f9c3eab2df34d092021c549738b217
2010-09-17 07:45:30 -07:00
Doug Zongker
b984ae51e5 resolved conflicts for merge of 813ad17a to master
Change-Id: I3fc84babbbcab712c5e38a0c8b815115ba89375f
2010-09-16 23:13:11 -07:00
Doug Zongker
37974731fc consolidate target_files metadata into one key-value file
Instead of separate files for recovery api version, tool extensions,
and mkyaffs2 options, put those all in the generic key-value file.

Change-Id: Ib642311632844d52e4895fd4747093fc7e86232d
2010-09-16 17:44:38 -07:00
Doug Zongker
486de126e3 only do size check for yaffs images; fix incremental info dict
Change-Id: Ic862000a23b93289604b0737bfcaf8d461f36ff8
2010-09-16 14:01:56 -07:00
Doug Zongker
9b3944ed8c am 4d197be3: am ec5ffbab: allow partition sizes in hex (when prefixed with 0x)
Merge commit '4d197be33970a163e8e38ba1b685718784498e43'

* commit '4d197be33970a163e8e38ba1b685718784498e43':
  allow partition sizes in hex (when prefixed with 0x)
2010-09-16 13:08:25 -07:00
Doug Zongker
ec5ffbabd3 allow partition sizes in hex (when prefixed with 0x)
Change-Id: I806879fd496304c449ff5315b0ef48fd766d6428
2010-09-16 13:01:26 -07:00
Doug Zongker
f127eb709b resolved conflicts for merge of 2cb8d5eb to master
Change-Id: I3b1aec1aee7c6bfcee2e978b4755b2bae9e480c4
2010-09-16 12:38:40 -07:00
Doug Zongker
c77a9ad444 store user-visible image sizes in target-files
Do the yaffs-specific adjustments to image sizes in common.CheckSize,
instead of baking it into the image size stored in the target-files
package.  Remove the special fs_type flag and fold it into the
"info_dict" we have for saving key-value pairs from the build system.

Change-Id: I6e63f3330f6277d9a946b22e66cadeb51203ba14
2010-09-16 12:29:17 -07:00
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