Commit graph

159 commits

Author SHA1 Message Date
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
a5f534df07 use frozensets to represent APK cert sets
Change-Id: Ic92c83be0c3f6a76bf1bd21f0216cd1b87586959
2011-11-11 09:51:37 -08: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
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