Commit graph

401 commits

Author SHA1 Message Date
Dan Albert
8e0178d41b Allow system images larger than 2GiB.
Python 2.7's zipfile implementation wrongly thinks that zip64 is
required for files larger than 2GiB. We can work around this by
adjusting their limit. Note that `zipfile.writestr()` will not work
for strings larger than 2GiB. The Python interpreter sometimes rejects
strings that large (though it isn't clear to me exactly what
circumstances cause this). `zipfile.write()` must be used directly to
work around this.

This mess can be avoided if we port to python3.

The bug (b/19364241) in original commit has been fixed.

Bug: 18015246
Bug: 19364241
Bug: 19839468

(cherry picked from commit cd082d4bfe)

Change-Id: I7b5cc310e0a9ba894533b53cb998afd5ce96d8c6
2015-03-19 13:59:01 -07:00
Tao Bao
dd2a5892e5 Restrict the verification in block-based incremental OTAs
BlockImageDiff has three versions. Only the incremental OTAs generated
with the latest version (3) can be re-applied to the system that's
already on the target build. Otherwise, operations like move will make
unconditional changes and damage the system. During the verification
phase, abort the OTA update if BlockImageDiff is less than 3 and it
doesn't match the checksum of the source build.

Change-Id: Ic630346eab2a993a84d0aeaacd7167ef62cc24f6
(cherry picked from commit daebaa6ed3)
2015-03-13 17:57:15 -07:00
Michael Runge
910b005f18 Do not use block_verify on target-files where feature is missing.
This will only be used when the block file format is at least
version 3.  For V1/V2 (L, L MR1) block versions, fall back to
the old range_sha1 check.

Bug: 19357591
Change-Id: I7cb178b70d48ec3c98cdb88ed1c94cf7797a01d0
(cherry picked from commit cad78c12fb)
2015-03-13 11:36:14 -07:00
Jesse Zhao
7b985f6aed Fix the error that free_string is not defined.
Change-Id: I7490a91ea930daaf194dad0c8b3a3357558b4770
Bug:19573713
(cherry picked from commit 7ca20d1a1c)
2015-03-11 17:22:43 +00:00
Sami Tolvanen
dd67a295cc Change transfer list format to include block hashes
Add source and target block hashes as parameters to transfer list
commands that copy or patch data to a partition. This allows the
updater to verify the status of each command in the transfer list
and makes resuming block based OTAs possible. Due to the changes,
update the transfer list version to 3.

Needs matching changes from
  I1e752464134aeb2d396946348e6041acabe13942

Bug: 18262110
Change-Id: Ia5c56379f570047f10f0aa7373a1025439495c98
(cherry picked from commit cac671a9d1)
2015-03-11 17:22:06 +00:00
Mohamad Ayyash
9b19382f0e resolved conflicts for merge of fc759204 to stage-aosp-master
Change-Id: Icf58e881286a66cb3ca4cb122fa8c11ec217fbab
2015-03-04 15:43:45 -08:00
Mohamad Ayyash
b97746ef09 Allow flashing a squashfs system image
Change-Id: Ic51d11274784a8d2e9d57d5f0b821ebc89680e5a
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-03 18:54:50 -08:00
Justin Harrison
b89ec38113 am 070eea05: am ffd4fee9: Merge "Revert "Allow system images larger than 2GiB."" into lmp-mr1-dev
* commit '070eea05f2f2d47aa873fd1e79160eb8529a0eb8':
  Revert "Allow system images larger than 2GiB."
2015-02-13 20:37:10 +00:00
Justin Harrison
ffd4fee911 Merge "Revert "Allow system images larger than 2GiB."" into lmp-mr1-dev 2015-02-13 18:48:17 +00:00
Justin Harrison
2de68bbbf4 Revert "Allow system images larger than 2GiB."
This reverts commit cd082d4bfe.

Change-Id: Ie63e1ba70d907d2849164871bc7ec71c245f7af9
2015-02-13 18:47:51 +00:00
Jesse Zhao
234d122ea6 am c6af9b8f: am 28b2b00a: Merge "Update vendor fingerprint." into lmp-mr1-dev
* commit 'c6af9b8f4a09cc4208ad119218f57022d6fead5b':
  Update vendor fingerprint.
2015-02-07 00:06:13 +00:00
Dan Albert
f8f91c9470 am 3907eaf8: am cd082d4b: Allow system images larger than 2GiB.
* commit '3907eaf8b7c6f7209c4cb11a6b8b66a34f292151':
  Allow system images larger than 2GiB.
2015-02-07 00:06:10 +00:00
Jesse Zhao
28b2b00adb Merge "Update vendor fingerprint." into lmp-mr1-dev 2015-02-06 22:21:06 +00:00
Dan Albert
cd082d4bfe Allow system images larger than 2GiB.
Python 2.7's zipfile implementation wrongly thinks that zip64 is
required for files larger than 2GiB. We can work around this by
adjusting their limit. Note that `zipfile.writestr()` will not work
for strings larger than 2GiB. The Python interpreter sometimes rejects
strings that large (though it isn't clear to me exactly what
circumstances cause this). `zipfile.write()` must be used directly to
work around this.

This mess can be avoided if we port to python3.

Bug: 18015246
Change-Id: I8a476d99c5efdef6ea408373b706e9fbd3a798be
2015-02-06 13:24:06 -08:00
Jesse Zhao
2625d27151 Update vendor fingerprint.
Change-Id: I5d4abdff8b7b13e01271440f4d4f2ffe1b015b71
Bug: 19257598
2015-02-06 09:50:06 -08:00
Jesse Zhao
5827eec013 am fbc8c145: am 0c9384d5: Merge "verify system and vendor image together before patching." into lmp-mr1-dev
* commit 'fbc8c1454e8f2167635398078bb53033dc90f15d':
  verify system and vendor image together before patching.
2015-01-28 23:42:18 +00:00
Jesse Zhao
75bcea0267 verify system and vendor image together before patching.
Change-Id: Ia43657ed6cd8860b0edb78cc2dd6388c761e1f8b
Bug: 17919909
2015-01-07 21:44:09 +00:00
David Turner
7a864af1b7 am aa112716: Merge "build_image: Set file system labels on disk images"
* commit 'aa112716067167d58d1db37aaf8adc49b83b59a1':
  build_image: Set file system labels on disk images
2015-01-07 20:28:17 +00:00
Christoffer Dall
8ed01f3816 build_image: Set file system labels on disk images
When building images set the mount point (data,cache,system) as the
filesystem label on the generated image.  This is required for the
Android Emulator.

IMPORTANT: This depends on the following patch to system/extras/:

    https://android-review.googlesource.com/#/c/120047/

which has already been submitted to AOSP and merged into the
internal tree.

Change-Id: Iaeb45462570c26d37980f1cc5d8a1b929e476c89
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-01-05 17:49:37 +01:00
Michael Runge
2b800123c4 am 34a1bdeb: am ea1dc699: Merge "Rewrite ro.vendor.build.fingerprint/thumbprint on signing" into lmp-mr1-dev
* commit '34a1bdeb333ab15ddc3840ac3e5d1e8c3245d44a':
  Rewrite ro.vendor.build.fingerprint/thumbprint on signing
2014-12-15 22:46:33 +00:00
Michael Runge
e07c75a86b Rewrite ro.vendor.build.fingerprint/thumbprint on signing
This should also indicate release-keys.

Bug: 18281807

Change-Id: I8d2568ca346625b91384f7e639d9c92e97587755
2014-12-09 13:54:52 -08:00
Michael Runge
3deca9e5df am f3761585: am 60f56e7d: am 996d8f48: Merge "Add support for tuning partitions" into lmp-sprout-dev
* commit 'f37615859e369c774841eafdb225a5f02259e1ee':
  Add support for tuning partitions
2014-11-24 18:06:36 +00:00
Michael Runge
60f56e7d15 am 996d8f48: Merge "Add support for tuning partitions" into lmp-sprout-dev
* commit '996d8f48a1b3e6e3a63344633546ff294cc67071':
  Add support for tuning partitions
2014-11-24 02:37:02 +00:00
Michael Runge
3e286645ba Add support for tuning partitions
Allow a simple mechanism to call tune2fs to modify an existing
partition without reformatting.

Bug: 18430740
Change-Id: I9210355b6bfec74d002d1f40b930330740f379a5
2014-11-21 00:46:03 -08:00
Ying Wang
e91b83d5e6 Support journal size board config variables.
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".

BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.

Bug: 18430740

(cherry picked from commit f3b86357e2)

Change-Id: Icc6c7e1b3be25b8e21b6a737492d944428e4a35a
2014-11-19 13:48:30 -08:00
Ying Wang
f1021dcb61 am 6ead56be: am f3b86357: Support journal size board config variables.
* commit '6ead56bed56e3927575726bdebf8511e44f6fb47':
  Support journal size board config variables.
2014-11-19 19:28:23 +00:00
Ying Wang
f3b86357e2 Support journal size board config variables.
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".

BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.

Bug: 18430740
Change-Id: I0594814fe19ffc54dff41ec2464e2e3a802b9419
2014-11-18 18:19:43 -08:00
Ying Wang
8cbb0eac18 am 5520d930: Merge "sign_target_files_apks: fix recovery patch generation"
* commit '5520d930c8e78a3bea4eeba9d0430d1c3f19dba8':
  sign_target_files_apks: fix recovery patch generation
2014-11-14 19:01:35 +00:00
Michael Runge
100a9f0720 am 11d21015: am f178d364: Merge "Allow images to be readded to target-files" into lmp-dev
* commit '11d210154d71a229e20eaebd6f9ea580b0c7f036':
  Allow images to be readded to target-files
2014-11-14 07:19:58 +00:00
Michael Runge
2e0d8fcf08 Allow images to be readded to target-files
There may be cases where various partitions were
modified (such as extra signing of boot/recovery)
which require the system partition to be regenerated
with a new recovery patch script.  Allow a request
for the recovery patch to be rebuilt, and for
missing images to be readded to the existing images.

Change-Id: Ie93c5bc1161a0d5002002dca23e07742ce2ba468
2014-11-13 22:55:35 -08:00
Paul Lawrence
a37b2bb236 Fix the build
Bug: 15984840
Bug: 18120110
Change-Id: I0224d5a31e03b711953d9496ecb00b6d88b8ef4c
2014-11-14 02:04:33 +00:00
Sami Tolvanen
8d212ea873 DO NOT MERGE: Change verity key formats
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.

Bug: 15984840
Bug: 18120110
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
(cherry picked from commit 72d90eb189)
2014-11-13 23:23:31 +00:00
Andrew Boie
d083f0b72f sign_target_files_apks: fix recovery patch generation
When rebuilding recovery, the boot images created for patching
purposes still were being signed with the old verity key and
not the new one specified on the command line.

In addition, the replacement verity public key in the boot ramdisk
wasn't being used.

Change-Id: I451e17d1cf08c507580c4b58134c1069532740e8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-11-11 22:17:11 -08:00
Michael Runge
c9594afa93 am 63f01de8: Add post-install verification phase
* commit '63f01de81892aa4e40b517464b3d9ca7db666c9d':
  Add post-install verification phase
2014-10-29 18:51:51 +00:00
Michael Runge
63f01de818 Add post-install verification phase
Verify the SHA sum of all patched and extracted files after
a file system remount.

Bug: 18145574

Change-Id: I2f053d085543e10e39153a774542d37ee0a238bd
2014-10-29 02:54:51 +00:00
Michael Runge
46fe30eff7 am fb8886db: get_stage in updater takes one param, not two.
* commit 'fb8886db6858388af5082268fd023b8a44fb87ea':
  get_stage in updater takes one param, not two.
2014-10-23 21:57:12 +00:00
Michael Runge
10ba565431 am 7cd99bad: Allow info_dict from target_files to specify mount options
* commit '7cd99bad210455dc57702b7cbf674a588a5eb028':
  Allow info_dict from target_files to specify mount options
2014-10-23 21:57:10 +00:00
Michael Runge
fb8886db68 get_stage in updater takes one param, not two.
Change-Id: I09a77eda5a1691080b1ae074d2e94d233eca7150
2014-10-23 13:51:04 -07:00
Michael Runge
7cd99bad21 Allow info_dict from target_files to specify mount options
This will allow safer mount options to be added per mount FS
type, to better ensure data is written during an OTA.
Bug: 18079773, 18092222

Change-Id: I1e3e4fd4639c6fd263e550b770cc3c858ef1e03b
2014-10-22 18:38:49 -07:00
Doug Zongker
641bfeddf3 am e18eb508: add support for the \'fill\' chunk type to sparse_img
* commit 'e18eb50850201e573084a0cd8e1199d877170b64':
  add support for the 'fill' chunk type to sparse_img
2014-10-16 05:52:53 +00:00
Michael Runge
92946baa03 am 9d641c41: Merge "Fix public/private key options on sign_target_files_apks" into lmp-dev
* commit '9d641c41db732c4e9e7a5dac074197f1a9d40bcc':
  Fix public/private key options on sign_target_files_apks
2014-10-16 05:52:17 +00:00
Doug Zongker
e18eb50850 add support for the 'fill' chunk type to sparse_img
Bug: 17987996
Change-Id: Ia661e87877e52274a991ceb77bbed93b7e6218f2
(cherry picked from commit 629c7cc84d)
2014-10-15 23:38:34 +00:00
Michael Runge
947894f87e Fix public/private key options on sign_target_files_apks
The if statements appear to check for public_signing
and then calls the private_signing function, and vice
versa.

Change-Id: I4511b9bcf0e03b9ba49b69eb80db84cf31d77020
2014-10-14 20:58:38 -07:00
Doug Zongker
e985f6f4d8 fix transfer list for full OTAs
The erase command we insert at the top for full OTAs was getting
inserted in the wrong place for version 2.

Change-Id: I9caf03a40efbdba79f3428f73e50d4319d9ba371
2014-09-25 16:39:45 -07:00
Doug Zongker
846cb3a9e6 add unit tests for rangelib
Change-Id: I3b77e849007259e697da56bd493ae5b553b901d1
2014-09-25 16:39:32 -07:00
Doug Zongker
623381880a generate version 2 blockimgdiff files
Generate version 2 of the block_image_update transfer list format.
This improves patch size by a different strategy for dealing with
out-of-order transfers.  If transfer A must be done before transfer B
due to B overwriting A's source but we want to do B before A, we
resolve the conflict by:

  - before B is executed, we save ("stash") the overlapping region (ie
    the blocks B will overwrite that A wants to read)

  - when A is executed, it will read those parts of source data from
    the stash rather than from the image.

This reverses the ordering constraint; with these additions now B
*must* go before A.  The implementation of the stash is left up to the
code that executes the transfer list to apply the patch; it could hold
stashed data in RAM or on a scratch disk such as /cache, if available.

The code retains the ability to build a version 1 block image patch;
it's needed for processing older target-files.

Change-Id: Ia9aa0bd45d5dc3ef7c5835e483b1b2ead10135fe
2014-09-25 16:39:14 -07:00
Michael Runge
560569a617 If oem_fingerprint_props is empty, ignore.
There may be cases where there is an OEM partition
but it has no effect on the OTA itself.  In these
cases, ignore an empty value from the misc_info.txt

Change-Id: I5f467e873030765af12810a07ddd5f302ca8cc0b
2014-09-18 15:12:45 -07:00
Doug Zongker
b34fcce08c explicitly check the superblock for differences
When generating incrementals for the system and vendor partitions,
check the first block (which contains the superblock) of the partition
to see if it's what we expect.  If this check fails, give an explicit
log message about the partition having been remounted R/W (the most
likely explanation) and the need to flash to get OTAs working again.

Bug: 17393999
Change-Id: Ifd2132b428dbc4907527291712690204a3664ac0
2014-09-11 09:38:01 -07:00
Doug Zongker
8544877399 select default search_path by platform
Bug: 17443175
Change-Id: I2b8b0a3b56e667b749ac167a6d09dc973ecf8419
2014-09-09 15:11:13 -07:00
Baligh Uddin
bdc2e3186f Add java_args as a valid option
Bug: 17393134
Change-Id: If2749d03b5d409a08d415a829dd21f986cac1789
2014-09-06 00:37:54 +00:00
Baligh Uddin
339ee4968a Add jvm args option. I rather not hardcode some large value just for Volantis. This can easily be passed in from sign-build.sh and should be a no-op for any other tools
Bug: 17393134
Change-Id: Ic2325d7c1e1e7292c9339e169efbed526f82263c
2014-09-05 18:29:47 +00:00
Doug Zongker
424296a4e8 add missing AOSP copyright notices
Change-Id: Idc812db30b259a55702f8728197f957f2d24d978
2014-09-02 08:53:09 -07:00
Doug Zongker
ab7ca1d286 refactor BlockDifference into common
Move BlockDifference into common and make its script generation code
more complete, so that it can be use by releasetools.py to do diffs on
baseband images.

Bug: 16984795
Change-Id: Iba9afc1c7755458ce47468b5170672612b2cb4b3
2014-08-26 13:12:11 -07:00
Doug Zongker
4d0bfb4f40 remove unused xdelta3/xz utilities
This was part of the original block-based OTA mechanism.

Bug: 16987495
Change-Id: I5bd6599829ee6084a8da1f0b14af87aabf07c130
2014-08-26 13:11:56 -07:00
Doug Zongker
5f9c28cad4 fix build
Change-Id: I1e503406129343bbfddacc1150c81e403b47778c
2014-08-26 13:11:37 -07:00
Doug Zongker
fc44a515d4 new block OTA system tools
Replace the xdelta/xz-based block OTA generation with a new system
based on the existing bsdiff/imgdiff tools.

Bug: 16984795
Change-Id: Ia9732516ffdfc12be86260b2cc4b1dd2d210e886
2014-08-26 13:10:25 -07:00
Doug Zongker
6f1d031b39 take bootable images from target_files if present
Now that we're building and saving images in the target_files at build
time, we should use those images instead of rebuilding them.

Bug: 17201052
Change-Id: I459e650f66f1e0bdf01ad54df9e34f36bf2ee899
2014-08-22 10:25:57 -07:00
Geremy Condra
95ebe7a09b Use the specified verity key to sign boot and recovery OTA images.
This ensures that when the verity key is rotated to a release key
both the boot and recovery images will be correctly signed. It does
mean that they will both be signed with the same key for now, but
as that doesn't change the threat model separating them is just a
distant nice-to-have.

Bug: 15725238
Change-Id: I5b75e4346fe0655065643ab553431690cc1a8cb0
2014-08-20 20:17:01 +00:00
Geremy Condra
f19b365cc9 Add support for switching to verity release keys.
Bug: 15725238
Change-Id: I8f92210fd854b5a2567cf76aaecb5be02c3f9293
2014-08-20 00:05:23 +00:00
Benoit Fradin
a45a8682fa BuildBootImage: Add secondstage image support [DO NOT MERGE]
The AOSP bootimage format allows the use of a second stage image
however the BuildBootableImage function does not allows the "second"
optional argument. This patch adds the support of this argument.

Bug: 17035158

Change-Id: I8ed9d9e56449945c2d42fc908269921c394f68c0
Signed-off-by: Benoit Fradin <benoit.fradin@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-08-14 11:24:54 -07:00
Doug Zongker
f21cb5a219 save file block allocations in target_files
make_ext4fs can now output a file listing the blocks used for each
file in the image.  Request this file and save it in the target_files;
it will be used for future improvements to block OTAs.

Bug: 16984795
Change-Id: Id1e60465e3b5a9d126a7934b4d089cf34d8fec44
2014-08-12 17:09:38 -07:00
Doug Zongker
f83400896d add 5 minute timeout on binary patch construction
When making bsdiff/imgdiff patches, give up after 5 minutes.  (On
certain large files it can take hours to build a patch, if it ever
even completes.)

Change-Id: I123c06f8194f85f6f4e640f7eb31c7746f76ba4d
2014-08-05 10:39:37 -07:00
Doug Zongker
56d91dd07f Merge "fall back to generating full OTA if incremental fails" into lmp-dev 2014-08-01 17:53:35 +00:00
Doug Zongker
62d4f18a30 fall back to generating full OTA if incremental fails
Block incremental OTA generation can currently fail on some
target-files pairs.  Fall back to generating a full OTA so that the
script succeeds rather than failing.

Change-Id: Ide70395d1f3759aa2076bd173836f6a5e5b397c0
2014-08-04 16:06:43 -07:00
Ying Wang
a961a09e59 Fix error: 'NoneType' object is not iterable
Change-Id: I5a54edbed0e5e5481a570b93c07d50f6ca3e18e0
2014-07-29 11:42:37 -07:00
Doug Zongker
3c84f56948 store images in target-files
Store sparse images in the target-files, and use those (when they're
available) for building block OTAs.

- New script add_img_to_target_files is added to make the images and
  add them to the IMAGES/ subdir in the target-files.  It gets run
  from the Makefile when building a target-files.

- img_from_target_files becomes mostly vestigial: it creates the
  img.zip by just copying the images out of the target-files.  (It
  still knows how to build images for use on older target-files.)

- ota_from_target_files uses images from the target-files in
  preference to rebuilding images from the source files.

- sign_apk_target_files builds images and includes them in its output
  target files (even if the input target-files didn't have them).

Bug: 16488065
Change-Id: I444e0d722d636978209467ffc01750a585c6db75
2014-07-31 11:06:30 -07:00
Daniel Rosenberg
f4eabc3961 Added support for building verified vendor partition
Change-Id: I762724800ccab3a365e6d2efdf86cd9c394818eb
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2014-07-14 22:55:22 +00:00
JP Abgrall
4d09dcb2c6 releasetools: only allow yaffs to have no userdata image size (fix build)
In the past, there was an exception for ext-base fs types to
deal with the lack of image size.
Back then it was only yaffs and ext*.
So now we explicitely only allow yaffs to have no userdata image size.

Change-Id: Ie354ee6222a58228dbcce2c6934971a0737422af
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-26 21:15:39 -07:00
Ying Wang
f5770d78da resolved conflicts for merge of 240e136e to master
Change-Id: Ic6e2cbe593914ddb613454581964c5d3d443b9d5
2014-06-19 10:32:35 -07:00
Ying Wang
240e136efd am 318c8e76: am 17c6426e: Merge "Document the worker_threads option."
* commit '318c8e76ee8f47fb9f077e419713cf4dbb454788':
  Document the worker_threads option.
2014-06-19 17:16:39 +00:00
JP Abgrall
5bfed5a320 core+tools: support specifying F2FS as the fstype for userdata
- Support TARGET_USERIMAGES_USE_F2FS.
- Support BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE.
- Support "userdata_fs_type" in the prop dict.
- Update build_image to recognize f2fs and call the correct command.

Change-Id: If31cc8bd235f93a4c7814fab36e6e2d13d3037ad
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-17 13:32:14 -07:00
Doug Zongker
c8b4e849f1 full support for OTA of vendor partitions
Make vendor partition a first-class member of the OTA system (for
target_files that contain a VENDOR/ subdirectory).

Build vendor images in a way that is compatible with block-based OTA.
Support updating the vendor partition in both full and incremental,
block and file OTAs.  In most cases this is handled by refactoring the
existing code to handle the system partition to handle either, and
then calling it twice.

Currently we don't support incremental OTAs from a target-files
without a VENDOR subdirectory to one with one, or vice versa.  To add
or remove a vendor partition a full OTA will need to be done.

Bug: 15544685
Change-Id: I9cb9a1267060bd9683a9bea19b43a26b5a43800d
2014-06-16 15:39:54 -07:00
Doug Zongker
8282282122 use fs_config and file_contexts from target_files
When building images, we want to use the file_contexts and fs_config
data contained in the target_files zip, rather than whatever happens
to be in the current client.

Change-Id: I13df2405898039f5a9b4bb4837147e76b31b068a
2014-06-16 09:24:41 -07:00
Doug Zongker
1113e38195 test block patch more realistically
Read and write the same file when testing block patches, which can
turn up errors that don't show up otherwise.  (And will appear on the
device.)

Change-Id: Ic9b8d93ec980d13163b135f619af589f41433d7f
2014-06-13 10:38:32 -07:00
Martin Blumenstingl
374e114d16 Document the worker_threads option.
Change-Id: I44775493bedc0c7224c2c4ef06330bdb1430a1b6
2014-06-11 23:03:44 +02:00
Doug Zongker
4b9596fe00 configure progress bar during block OTA script generation
Emit script commands to produce a more accurate progress bar (for full
block OTAs) and a working progress bar (for incremental block OTAs) --
ones that are driven by the progress callback from the thing actually
writing the system image.

Change-Id: Ifca10be68cfdaab7135d23515bd0ae5be2f98a16
2014-06-09 14:15:45 -07:00
Ying Wang
1343ec169c am b75fe469: am eafdd2cd: Fix emulator builds
* commit 'b75fe4696e847ef49aa9b11693243c00de497808':
  Fix emulator builds
2014-06-04 22:24:51 +00:00
Ying Wang
eafdd2cd87 Fix emulator builds
which don't have boot.img.

Change-Id: Id97a53c5356d435d9c70107ef047bed003769e22
2014-06-04 15:16:17 -07:00
Ying Wang
3a9cb0ca11 Merge "Allow to build the update.zip for emulator build." 2014-06-04 17:40:45 +00:00
Ying Wang
dc7ff05427 am bc080d51: am 2a386e0c: Allow to build the update.zip for emulator build.
* commit 'bc080d510f022da8055b89b85e02d91e74c3757d':
  Allow to build the update.zip for emulator build.
2014-06-04 17:26:00 +00:00
Ying Wang
2a386e0cfb Allow to build the update.zip for emulator build.
img_from_target_files.py just skips the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.

Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
2014-06-04 17:04:14 +00:00
Michael Runge
4eb9e61c24 Merge "Add sprout support to signing tools" 2014-06-03 22:32:38 +00:00
Michael Runge
dc2661afe2 Add sprout support to signing tools
Bug: 15379701

Change-Id: Ied8329e1162250cc5509b65ef8bf0b5a9ddda3c3
2014-06-03 15:30:40 -07:00
Ying Wang
f8824aff68 Allow to build the update.zip for emulator build.
img_from_target_files.py just skipps the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.

Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
2014-06-03 14:07:27 -07:00
Geremy Condra
e8e982afd3 Fix salt for verity tree generation.
Prior to this change salts were randomly generated, causing OTAs
to fail when they tried to check whether the system they were
installing on was binary identical to the source from which they
were generated.

Bug: 15018770
Change-Id: I86fffe2264a0c263aaf47112fb82fa71240e3403
2014-05-16 19:14:30 -07:00
Geremy Condra
15d5348e6c Reopen temporary system image to avoid stale data.
NamedTemporaryFile's aggressive caching behavior can cause an issue
where changes made by another process aren't visible even after the
fseek() below or a flush(). To avoid this, simply open the file
again and read from the fresh version.

This fixes an issue where verity metadata written by append2simg
doesn't become visible to img_from_target_files.

Change-Id: I291fb3a95d5b532218ac6205ecc9e9b4f3a36bd4
2014-05-13 20:23:54 -07:00
Geremy Condra
c10320eef3 Merge "Add verity support to make dist." 2014-05-12 17:00:58 +00:00
Geremy Condra
5b5f4958d8 Add verity support to make dist.
Without this, system images will be built that do not contain the
necessary bits for verification.

Change-Id: I87c15282b26377d7a2a1540e3d0e30b0299622e3
2014-05-10 18:31:07 -07:00
Michael Runge
4f12fceead Add missing quotation mark in assertion
Change-Id: I3e76997fe257bfccb7d61dcc1273e014cdb55a41
2014-05-09 14:14:42 -07:00
Doug Zongker
91a99c28e0 fix ota script to generate non-block commands correctly
If you had a target_files without a recovery patch and specified
--block (which should have no effect without a patch), it would have
omitted some necessary commands from the OTA script.

Change-Id: I96e79cd561ebf09cfe53792d1cc558cc71479869
2014-05-09 13:16:50 -07:00
Doug Zongker
af845256f1 assert recovery finger/thumbprints, not system
Block OTAs don't have the system partition mounted and so can't use
file_getprop on the system partition.  Make assertions look at the
recovery system finger/thumbprints, which should be the same as the
ones on the system partition (even for sprout devices).

Change-Id: Ie5d329d13beab4b428e37f75da9b9e1b8ceb35bc
2014-05-09 08:29:05 -07:00
Ed Heyl
3e92fd0fba Fix build: Revert "Add verity support to make dist."
This reverts commit 5dee206d8e.

Change-Id: I6f4f536c127d3e5dcb6594efb193231cd8dece7e
2014-05-09 05:53:54 +00:00
Geremy Condra
5dee206d8e Add verity support to make dist.
Without this, system images will be built that do not contain the
necessary bits for verification.

Change-Id: Icaa636085dbfd386424c90dfbe404c5960df0fe4
2014-05-06 18:06:18 -07:00
Michael Runge
0a2ce08f66 Merge "Support block OTA + OEM partition" 2014-05-05 19:57:56 +00:00
Michael Runge
c6e3afd26d Support block OTA + OEM partition
Change-Id: I9e662098569a43b05279908e6833e9552a7abe3a
2014-05-05 12:22:12 -07:00
Colin Cross
e8eef02cca Merge "verity: switch to C++ version of build_verity_tree" 2014-05-02 23:52:16 +00:00
Michael Runge
6e836116f7 Add support for verifying OEM properties.
A separate OEM file must be specified to provide the expected
values for these properties.  The list of properties comes from
the "oem_fingerprint_properties" list in misc_info.txt

Bug: b/13367676

Change-Id: I1a3eaf108492132cf6f595a5d1c9f7e0c3cb3142
2014-05-01 17:37:57 -07:00
Colin Cross
477cf2b029 verity: switch to C++ version of build_verity_tree
The C++ version avoids the need to unsparse the image to generate
the verity image, and is much faster for images with large regions
of don't care (treated as zeroes).

Change-Id: I8396b08a5fdb93f27d8c71c9c1ac23cb75cf1f7f
2014-04-28 17:19:13 -07:00
Ying Wang
b8888432f0 Set up rules to build oem.img
To build oem.img:
- You must define BOARD_OEMIMAGE_PARTITION_SIZE in your BoardConfig.mk
- The file system type will be the same as system.img and userdata.img.
- To install a module to oem.img, use "LOCAL_OEM_MODULE := true"
- run "make -j48 showcommands oem_image dist". By default it's not
  built.

Bug: 13367676
Change-Id: I1a26d4d0c61b72ecffe60279667b1b3de050780d
2014-04-28 09:43:51 -07:00
Ying Wang
c73e461537 Fix variable name.
Change-Id: Ie7439f71cf7fd2eeacd45a5d6625e610dad8bfbe
(cherry picked from commit 1a1dfcb5fcb6eda11d8dbf5df02f0083853dd5c1)
2014-04-15 22:31:54 +00:00