Commit graph

440 commits

Author SHA1 Message Date
Simon Wilson
6d5ddc32ab resolved conflicts for merge of ecfc97f7 to mnc-dev
Change-Id: Ic7661c4176dc87cb2796f9cbb61bdd64f89cdc01
2015-06-24 16:06:34 -07:00
Simon Wilson
ecfc97f772 resolved conflicts for merge of f86e7eea to lmp-mr1-ub-dev
Change-Id: I746021aa57edd5f6fae6e57cec0908951a659664
2015-06-24 15:42:27 -07:00
Mohamad Ayyash
9ca7fa8993 resolved conflicts for merge of 1b748051 to lmp-mr1-ub-dev 2015-06-24 15:04:38 -07:00
Tao Bao
7102f57781 Merge "Adjust the size computation for reserved blocks" into mnc-dev 2015-06-24 00:53:17 +00:00
Tao Bao
2b4ff174ff Fix the error in sparse_img.py
Bug: 22046423
Change-Id: I9c257002c405277557974fadfe27942c38c3cd04
2015-06-23 17:36:10 -07:00
Tao Bao
efbb5d2e69 Adjust the size computation for reserved blocks
Due to the change in https://lwn.net/Articles/546473/, kernel reserves a
few extra blocks (lesser of 2% and 4096 blocks) on ext4 FS which leads to
OTA update failures. Adjust the size computation if the device has
BOARD_HAS_EXT4_RESERVED_BLOCKS := true.

Bug: 21522719
Bug: 22023465
Change-Id: I49f16adbf2dedc5279fbb8622bf99ef71dcc494f
2015-06-23 14:53:28 -07:00
Tao Bao
bebd3cfbf9 Use fstab in the source build
When generating incremental OTAs, we should use the fstab in the source
build instead of the target one. Similarly for recovery_mount_options.

Bug: 22011892
Change-Id: Idb5c72d1a792e8bb40376a380e3dc06136b13652
2015-06-22 19:27:59 -07:00
Simon Wilson
f86e7eeabc Add compressor options for squashfs system images
Change-Id: I2a75f8754273f6e00b96ba6aca6741c4388f5da8
2015-06-22 15:42:52 -07:00
Mohamad Ayyash
1b748051dd common.py: Add support for squashfs
Change-Id: Ia40f8c6307d0213d43207aee91c4c8a5b5ad6f1e
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-06-16 13:18:44 -07:00
Mohamad Ayyash
cade49ddee Allow flashing a squashfs system image
Change-Id: Ic51d11274784a8d2e9d57d5f0b821ebc89680e5a
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-06-16 13:11:21 -07:00
Tao Bao
548eb76c8f Support SELinux context label when mounting
If there is a SELinux context label in the recovery.fstab, we should
honor that when mounting the partition.

Bug: 19764039
Change-Id: I4df71a092b418cd340a18b2e3b0936de33d8e3f5
2015-06-10 15:35:34 -07:00
Baligh Uddin
601ddeae06 Allow custom boot_signer and verity_signer.
Bug: 21701163
Change-Id: I85e75fd3a166a9f6a7859ebf81dee73322dc2798
2015-06-09 15:48:14 -07:00
Tao Bao
726b7f338f Fix the broken signing script
check_target_files_signatures.py was accidentally broken due to the
renaming of a variable in last commit. It escaped the checking from
pylint because it was a keyword ('all').

Bug: 21611858
Change-Id: I58c983e59c4a3e0018481d3c9ba328ed76f5c08a
2015-06-03 17:36:12 -07:00
Tao Bao
5fcaaeffc3 Add post-install verification for BBOTAs
Similar to the assertations in file-based OTA, we perform verification
for block-based OTAs (BBOTAs) after updating a partition, for both of
the incremental and full OTAs. It increases the update time (~20s on
Nexus 6), but will capture unnoticed errors right away.

Bug: 21500869
Change-Id: I0f8b27734caaa0f41f9c1b904d55af2112784a68
(cherry picked from commit 68658c0f4f)
2015-06-02 11:15:33 -07:00
Brian Carlstrom
903186f938 Use zipalign -p to page align .so files
Bug: 21400810
Change-Id: Ie9a0ec0a55511383596016e830b474c76754277a
2015-05-22 15:51:19 -07:00
Tao Bao
58c1b96165 Fix the permission setting in common.ZipWriteStr()
When passing a ZipInfo instance to common.ZipWriteStr(), the
external_attr attribute should not be overwritten unless specified.
We didn't have the issue previously because we were calling
ZipFile.writestr() directly until [1] merged.

[1] commit 2ed665a033.

Bug: http://b/21309935
Change-Id: I8c0190362c60d7d78965ecfe5e484f8398ddc5f2
(cherry picked from commit 9773465409)
2015-05-20 13:29:03 -07:00
Tao Bao
5ece99d64e Add support for clobbered blocks
In ext4 filesystems, some blocks might be changed even being mounted
R/O, such as the superblock (block 0). We need to exclude such blocks
from integrity verification. Plus such blocks should always be
written to the target by copying instead of patching.

Bug: http://b/20939131
Change-Id: I657025b7b1ad50d4365e7b18dc39308facfe864e
(cherry picked from commit ff7778166b)
2015-05-13 12:26:04 -07:00
Tao Bao
f3282b4a7f Wrap zipfile.write(), writestr() and close()
In order to work around the zip 2GiB limit, we need to wrap the related
functions in zipfile. Calls to those functions should always be replaced
with calls to the wrappers instead.

Bug: 18015246
Change-Id: I499574cee51ec4804bc10cbefe0b17940afed918
(cherry picked from commit 2ed665a033)
2015-05-08 15:53:27 -07:00
Mohamad Ayyash
95e74c1424 common.py: Add support for squashfs
Change-Id: Ia40f8c6307d0213d43207aee91c4c8a5b5ad6f1e
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-05-01 15:58:42 -07:00
Sami Tolvanen
3edeb4e97b am 045d817c: am 497b74d5: am d21d1d27: am 00e1f003: Merge "Check partition hash before resorting to block_image_verify"
* commit '045d817cce8cb1feb0186b537306cabf1a5069cd':
  Check partition hash before resorting to block_image_verify
2015-04-25 10:01:53 +00:00
Sami Tolvanen
497b74d5a2 am d21d1d27: am 00e1f003: Merge "Check partition hash before resorting to block_image_verify"
* commit 'd21d1d273b83e701667beeabe0c76fd6888e15fc':
  Check partition hash before resorting to block_image_verify
2015-04-25 09:32:33 +00:00
Sami Tolvanen
e09d096ed6 Check partition hash before resorting to block_image_verify
It's not necessary to call block_image_verify for the most common
case where we attempt an update for the first time and the target
partition has expected contents. It is sufficient to confirm that
the target partition is intact.

Computing a hash is much faster than simulating the update, which
means this change should make the update speed for v3 much closer
to v2 for the common case. If the update was interrupted, this is
going to make resuming somewhat slower, of course. Hopefully this
should be rather rare.

Bug: 20309033
Change-Id: I04792f3681bf2cd5d9a4e1c41eb883c7f26c6f58
2015-04-24 10:56:59 +00:00
Tao Bao
1699a90b21 am b93b9ec4: am d8c62ae5: am 347d8e66: am 7f47c133: Merge "Add support for full radio option"
* commit 'b93b9ec42d008a5478018d8055791e1d1449fa36':
  Add support for full radio option
2015-04-22 22:18:52 +00:00
Tao Bao
d8c62ae577 am 347d8e66: am 7f47c133: Merge "Add support for full radio option"
* commit '347d8e66228ab09af1ec458632cb51c20a818e06':
  Add support for full radio option
2015-04-22 18:55:14 +00:00
Tao Bao
43078aa37a Add support for full radio option
Occasionally we need to include full radio image in incremental OTAs.
Adding --full_radio option to support that.

It needs matching changes in the releasetools.py in the target_files
zip, which comes from device/<vendor>/<device>/releasetools.py.

Bug: 19994922
Change-Id: Id1fb3a9cdb7e67dd9dbadd8fb6cd5fccd358820e
2015-04-21 16:54:52 -07:00
Sami Tolvanen
8f9f7c0672 am c4d303e9: am 7788547f: am 586b38cc: Merge "Calculate max_stashed_blocks correctly for block OTA v3"
* commit 'c4d303e958e1f3475fd1070bdb307b4f675f3bdd':
  Calculate max_stashed_blocks correctly for block OTA v3
2015-04-17 19:30:23 +00:00
Sami Tolvanen
c4d303e958 am 7788547f: am 586b38cc: Merge "Calculate max_stashed_blocks correctly for block OTA v3"
* commit '7788547ff34d93b5196933eedb9f006fb1fe9f4d':
  Calculate max_stashed_blocks correctly for block OTA v3
2015-04-17 19:09:02 +00:00
Sami Tolvanen
29f529f33e Calculate max_stashed_blocks correctly for block OTA v3
The updater automatically stashes overlapping source blocks to
make it possible to resume if the command performing the update
is interrupted. However, blockimgdiff.py does not take this into
account and therefore, max_stashed_blocks indicates only the
number of explicitly stashed blocks. Change blockimgdiff.py to
correctly calculate the maximum used stash space, including any
automatically stashed blocks.

Bug: 20309033
Change-Id: Ibf5cb1abc38c54e60a6ad3ce4cbce43556b08ac2
2015-04-17 16:28:08 +01:00
Sami Tolvanen
e18196095b Merge "Separate boot and recovery image signing from dm-verity" 2015-04-10 09:44:47 +00:00
Tao Bao
915e47aad5 am 948f67b0: am d0ca0549: am 8c76d1e0: Merge "Dump fingerprints into recovery log"
* commit '948f67b0e7b3863488fd4a12a6797311d4c30508':
  Dump fingerprints into recovery log
2015-04-10 04:35:11 +00:00
Tao Bao
948f67b0e7 am d0ca0549: am 8c76d1e0: Merge "Dump fingerprints into recovery log"
* commit 'd0ca05493bfe06cf166e4e215cd9bf38936fb344':
  Dump fingerprints into recovery log
2015-04-10 02:23:31 +00:00
Tao Bao
6c55a8adc8 Dump fingerprints into recovery log
No more guessing. We should have the info for OTA issues diagnosis.

Change-Id: I0ce919434444ab16a38cc7af818e64785509b0fb
2015-04-09 17:36:05 -07:00
Sami Tolvanen
8b3f08bc7b Separate boot and recovery image signing from dm-verity
Allow dm-verity to be enabled without boot and recovery images being
signed. This makes it possible to enable only dm-verity to detect
corruption without confusing bootloaders that do not understand signed
images.

Bug: 19985143
Change-Id: Ie52c6ff595faa7a5c1f1bc1b37f6899c4d0c7001
2015-04-08 12:30:16 +01:00
Mohamad Ayyash
31bca0bea9 am e71b5560: am 347195da: am 6ddc3600: Merge "build_image.py: Verity support for flashing non partition spanning fs"
* commit 'e71b55606e2d0820f4a743f6c0e6b524f2354919':
  build_image.py: Verity support for flashing non partition spanning fs
2015-04-02 18:57:32 +00:00
Mohamad Ayyash
e71b55606e am 347195da: am 6ddc3600: Merge "build_image.py: Verity support for flashing non partition spanning fs"
* commit '347195da2ea801db95cf201fa7516bf392dc005a':
  build_image.py: Verity support for flashing non partition spanning fs
2015-04-02 18:37:05 +00:00
Mohamad Ayyash
6ddc360065 Merge "build_image.py: Verity support for flashing non partition spanning fs" 2015-04-02 18:18:21 +00:00
Tao Bao
521a8dbd18 am 93d46584: am ae26f5b0: am 53602955: Merge "Add support to sign bootable images with vboot_signer"
* commit '93d46584170a9aae1728cdb9010eef41e25b4d4a':
  Add support to sign bootable images with vboot_signer
2015-04-01 17:33:36 +00:00
Tao Bao
93d4658417 am ae26f5b0: am 53602955: Merge "Add support to sign bootable images with vboot_signer"
* commit 'ae26f5b002de956d495c4019b365040490ff18dd':
  Add support to sign bootable images with vboot_signer
2015-04-01 17:15:29 +00:00
Tao Bao
d95e9fd267 Add support to sign bootable images with vboot_signer
Add vboot properties to the dictionary file, which will be packed into
the target_files zip. Add support in packaging and OTA scripts to
sign the generated bootable images (boot.img and recovery.img) when
vboot is enabled.

Change-Id: I08758ced03d173219415bca762bbdb66c464a9f5
(cherry picked from commit 5d5a3bd9e8d8b14b71d1b2105417a2958d13d3d2)
2015-04-01 09:23:08 -07:00
Mohamad Ayyash
dd063528ed build_image.py: Verity support for flashing non partition spanning fs
Change-Id: Ic5f7b256ed9a31e99ebaebdf8a8a19ba9adcced3
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-04-01 00:50:39 +00:00
Dan Albert
3d4466f3d6 am 146366bf: am b6339d74: am f1a8c8c5: Merge "Fix up a few callers of GetTypeAndDevice."
* commit '146366bfb28e6f7c7b785188325fab40c4db000a':
  Fix up a few callers of GetTypeAndDevice.
2015-03-28 02:38:22 +00:00
Dan Albert
146366bfb2 am b6339d74: am f1a8c8c5: Merge "Fix up a few callers of GetTypeAndDevice."
* commit 'b6339d74fe575aa9e824ebb593c3064555a7af28':
  Fix up a few callers of GetTypeAndDevice.
2015-03-28 02:24:39 +00:00
Dan Albert
ebb19aa01a Fix up a few callers of GetTypeAndDevice.
Change-Id: I8f2d8d28b60715f917e9aceb8f851ad652034aa7
2015-03-27 19:11:53 -07:00
Dan Albert
f9aa358b4b am ee8323b6: Fix bad merge.
* commit 'ee8323b6297c9e0e27524805c53d0eb3b271bc93':
  Fix bad merge.
2015-03-28 00:02:13 +00:00
Dan Albert
ee8323b629 Fix bad merge.
Change-Id: Ifdb2a2999fe13f770c239f47330e8c2c44fdfdbe
2015-03-27 23:50:31 +00:00
Dan Albert
cd9ecc0258 resolved conflicts for merge of eecf00db to master
Change-Id: I7f268122c10152aff8ef59622edbba88db427fca
2015-03-27 16:37:23 -07:00
Dan Albert
eecf00db59 resolved conflicts for merge of 4c32aa3d to lmp-mr1-dev-plus-aosp
Change-Id: I32a06c88416e68ce628f642e0d025d1df5e227d7
2015-03-27 14:37:14 -07:00
Dan Albert
99e22a57d0 Merge "Make releasetools pylint clean." 2015-03-27 18:40:02 +00:00
Baligh Uddin
6c0618976c Merge "Add bootsigner path as an option" 2015-03-26 23:03:13 +00:00
Ying Wang
52ea2066a1 am abc748c1: am 6ff1b035: Merge "Support to build image of root file system with /system and ramdisk combined."
* commit 'abc748c11cbba71a99f306d318c74b5336b28730':
  Support to build image of root file system with /system and ramdisk combined.
2015-03-26 17:57:22 +00:00