Commit graph

23455 commits

Author SHA1 Message Date
Baligh Uddin
59f4ff109d Add verity_signer and verity_key flags to add_img_to_target_files.
The signing process requires the boot and recovery images be signed
by CROS-Signer, which is done after a signed_target_files.zip is
available.  Once the boot/recovery images are signed, we need
to insert it back into signed_target_files.zip and regenerate the
system.map and verity tree.  The script (add_img_to_target_files) does
this operation and needs to be aware of verity specific flags.

Bug: 23831896
Change-Id: Id24e878161052c768b74da1231b97eb0574b4c8b
2015-09-16 21:20:30 -07:00
Bo Hu
ca352f3623 am 2ad5c0cc: Merge "emulator.mk: Add ethernet permission" into mnc-dev
* commit '2ad5c0cca46b7f0a159dbc90243756c84a93b093':
  emulator.mk: Add ethernet permission
2015-09-16 17:45:59 +00:00
Bo Hu
2ad5c0cca4 Merge "emulator.mk: Add ethernet permission" into mnc-dev 2015-09-16 17:38:07 +00:00
Ian Pedowitz
a0abf49d2b resolved conflicts for a1fcaf86 to mnc-dr-dev
Change-Id: Ie53652faa530a3c9c83f30c8f2b636d90f0f1b7a
2015-09-15 18:39:19 -07:00
leozwang
a1fcaf86c4 Add an option to include a full bootloader in incremental OTA.
Bug: 23999213
Change-Id: I6c715eb01048e187622ba1e90c89a3306a294b8a
2015-09-15 08:44:12 -07:00
leozwang
07e0af0d18 am 91c8c66e: am 17aa06f6: Fix build.
* commit '91c8c66eb033a76e0c5968c23eced5f7bbde6d82':
  Fix build.
2015-09-15 07:58:27 +00:00
leozwang
91c8c66eb0 am 17aa06f6: Fix build.
* commit '17aa06f6fe0c10cb3bb84a11dfc78a88a4155adc':
  Fix build.
2015-09-15 07:52:08 +00:00
leozwang
1e7f6f7442 Fix build.
Convert ota_from_target_files back to symbolic link.

Change-Id: I932ba8c0b15fa71a27083adc92e9f9a90dc82f8c
(cherry picked from commit 17aa06f6fe)
2015-09-15 07:50:10 +00:00
leozwang
17aa06f6fe Fix build.
Convert ota_from_target_files back to symbolic link.

Change-Id: I932ba8c0b15fa71a27083adc92e9f9a90dc82f8c
2015-09-15 00:41:53 -07:00
Leo Wang
888b6f47c7 am 47f6a4e7: am 1c1a6d15: am 2c9dfb82: am 1d4ad515: Revert "Add an option to include a full bootloader in incremental OTA."
* commit '47f6a4e72592bef7ed91f2541c55c151428e11ad':
  Revert "Add an option to include a full bootloader in incremental OTA."
2015-09-15 04:51:19 +00:00
Leo Wang
47f6a4e725 am 1c1a6d15: am 2c9dfb82: am 1d4ad515: Revert "Add an option to include a full bootloader in incremental OTA."
* commit '1c1a6d15b2c979f28d3cf9a13e96e16e24be16ec':
  Revert "Add an option to include a full bootloader in incremental OTA."
2015-09-15 04:43:38 +00:00
Leo Wang
1c1a6d15b2 am 2c9dfb82: am 1d4ad515: Revert "Add an option to include a full bootloader in incremental OTA."
* commit '2c9dfb8239bb4cbe1c9118ccc5bd115713f513e6':
  Revert "Add an option to include a full bootloader in incremental OTA."
2015-09-15 04:36:53 +00:00
Leo Wang
2c9dfb8239 am 1d4ad515: Revert "Add an option to include a full bootloader in incremental OTA."
* commit '1d4ad5158b2cf2f30269d8f733548188208af64a':
  Revert "Add an option to include a full bootloader in incremental OTA."
2015-09-15 04:29:45 +00:00
Leo Wang
1d4ad5158b Revert "Add an option to include a full bootloader in incremental OTA."
This reverts commit 46d5efcd0d.

Change-Id: Ibd347be362db50c0cdb34bf828718872bd74ad56
2015-09-15 04:03:20 +00:00
leozwang
160603cfc2 am 5837f102: am 1753b4e9: resolved conflicts for 00fdede3 to lmp-mr1-ub-dev
* commit '5837f1025cf28935f3c6f3e0417dcfeac4d56688':
  Add an option to include a full bootloader in incremental OTA.
2015-09-15 01:17:03 +00:00
leozwang
5837f1025c am 1753b4e9: resolved conflicts for 00fdede3 to lmp-mr1-ub-dev
* commit '1753b4e9e444d9ce57f5ce481ed5e3317670ee31':
  Add an option to include a full bootloader in incremental OTA.
2015-09-15 01:07:05 +00:00
bohu
9ee993f60e emulator.mk: Add ethernet permission
Networking on old emulator device(a.k.a. goldfish) relies on RIL;
However, RIL is not available on ranchu device yet. For ranchu device
to have a functional networking, we need to add ethernet permission
and start dhcpcd_eth0 service on ranchu device. This CL adds ethernet
permission to both goldfish (which is harmless) and ranchu devices.

This addition was originally proposed by miroslav.tisma@imgtec.com
and the ethernet permission was only added to arm64 and mips64 after
discussion. With the ranchu device supporting more architectures,
it makes sense to allow this permission on all devices and all CPU
architectures.

related CL by miroslav.tisma@imgtec.com on AOSP:
    b09fb84becf73bf2bc578ebf27910d75b79d668a

bug: 24070972

Change-Id: I81ac5d8901adee43784fe9dd45a170fb90bb824a
2015-09-14 16:40:12 -07:00
leozwang
1753b4e9e4 resolved conflicts for 00fdede3 to lmp-mr1-ub-dev
Change-Id: If4b79f7ed4d67cd8ed708a84703eac58b1e979ac
2015-09-14 16:39:23 -07:00
leozwang
00fdede320 am 46d5efcd: Add an option to include a full bootloader in incremental OTA.
* commit '46d5efcd0d451a48cc793931efef2b1ca982386d':
  Add an option to include a full bootloader in incremental OTA.
2015-09-14 21:27:04 +00:00
leozwang
46d5efcd0d Add an option to include a full bootloader in incremental OTA.
Bug: 23101469
Bug: 23999213

Change-Id: Id5ed748a5639663bb5df954f9375838fd9c295ca
2015-09-14 10:41:34 -07:00
Tao Bao
e35d00d019 am 265d9aeb: releasetools: Update the fingerprint when signing.
* commit '265d9aeb622c5829787b16b903f028cacaa99c18':
  releasetools: Update the fingerprint when signing.
2015-09-12 23:00:24 +00:00
Tao Bao
265d9aeb62 releasetools: Update the fingerprint when signing.
ro.bootimage.build.fingerprint should be updated when signing.

Bug: 22720426
Bug: 24009888
Change-Id: I5bd31858c6bc31edcecc6f5248f4274481506288
2015-09-11 16:47:28 -07:00
Tao Bao
28f6f9c3de releasetools: Always write the last block if it's padded.
In BBOTAs if the last block of a DataImage is padded, we should always
write the whole block even for incremental OTAs. Because otherwise the
last block may be skipped if unchanged, but would fail the post-install
verification if it has non-zero contents in the padding bytes.

Bug: 23828506
Change-Id: I6f6789eec568ed0b808b9e425f5ecdbea1bdf446
(cherry picked from commit 7589e961a7)
2015-09-08 10:55:32 -07:00
Tao Bao
a6e6afbce6 am 39c322ce: releasetools: Fix the bug in symlink deletion.
* commit '39c322cefcc0ecba76a2ffb8881694fd010a87fc':
  releasetools: Fix the bug in symlink deletion.
2015-09-03 17:26:12 +00:00
Tao Bao
39c322cefc releasetools: Fix the bug in symlink deletion.
For file-based OTAs, symlinks in the source build but not in the target
build will be deleted. However, if a symlink is replaced by a regular
file in the target build, the file will be accidentally deleted when
applying (resuming) the same package again.

Verify the checksum of a symlink that will be unpacked or renamed to.
Delete the file only if it doesn't have the target checksum.

Bug: 23646151
Change-Id: I77bae035e39f2e0be25f7f6d71c5882464e3d50f
(cherry picked from commit 84006eacd0)
2015-09-02 21:21:17 -07:00
Zach Jang
9f7c37811b am 057831bc: Merge "Set the Security Patch level with Oct 1 for MNC" into mnc-dev
* commit '057831bc665b15d7beda970b91b2c332dee417f0':
  Set the Security Patch level with Oct 1 for MNC
2015-09-02 00:04:40 +00:00
Zach Jang
057831bc66 Merge "Set the Security Patch level with Oct 1 for MNC" into mnc-dev 2015-09-01 23:51:02 +00:00
Badhri Jagan Sridharan
dfea066f88 Merge "Include init.usb.configfs.rc into rootdir" into mnc-dr-dev 2015-09-01 22:57:27 +00:00
Badhri Jagan Sridharan
a8a4a93733 Include init.usb.configfs.rc into rootdir
Bug=23633457

Change-Id: I26bbc5ff597138b2ccac1de72117753739b31554
2015-09-01 22:43:42 +00:00
Tao Bao
ccad82c52e Merge "Revert "Temporarily use blockimgdiff v2 for OTA."" into mnc-dr-dev 2015-09-01 19:02:24 +00:00
smain@google.com
77c1ff7bf9 am 4ffdc8fa: Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
* commit '4ffdc8faf2c795027f38b6ef4685dd6d1179878e':
  Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
2015-08-31 21:36:29 +00:00
Tao Bao
e337093e6c Merge changes from topic 'stash-size' into mnc-dr-dev
* changes:
  Split large files for BBOTA v3.
  Revise stash for BBOTAs when needed.
  Assert the stash size when generating OTAs.
2015-08-31 20:59:48 +00:00
Zach Jang
4d034675f0 Set the Security Patch level with Oct 1 for MNC
- MNC currently has security patches from the August OEM bulletin with patch date of Sep 1 plus only critical fixes from September OEM bulletin
- To be cherry-picked if picking up remaining fixes from September OEM bulletin to MNC

Change-Id: I2d1ba9c5a893727962f3f1837df1dd9df49e44f5
2015-08-31 10:12:17 -07:00
smain@google.com
4ffdc8faf2 Fix bug that caused table of Studio links to result in "stand-alone" tools instructions.
bug: 23570662

Change-Id: I7482eddbeffa581307bf7f76b9653de41966b6f9
2015-08-28 17:27:47 -07:00
Ying Wang
f4ad2febdb am 4fc14679: am fc168f84: resolved conflicts for merge of 1a8c6567 to lmp-mr1-ub-dev
* commit '4fc1467949aaf9e6a49a6771ed996e3c2c702314':
  Don't fail build of otatools if there are no device certificates
2015-08-27 01:37:54 +00:00
Ying Wang
d0cc11e898 am 8f7c08ed: am 1e120181: am 473b6a5f: am fc028e59: Dist the otatools package.
* commit '8f7c08ed622d733c0997324d5b0464ba7e57c1fa':
  Dist the otatools package.
2015-08-27 01:37:53 +00:00
Ying Wang
4fc1467949 am fc168f84: resolved conflicts for merge of 1a8c6567 to lmp-mr1-ub-dev
* commit 'fc168f84695f492f2ad0eed3063145f425bebf45':
  Don't fail build of otatools if there are no device certificates
2015-08-27 01:33:15 +00:00
Ying Wang
8f7c08ed62 am 1e120181: am 473b6a5f: am fc028e59: Dist the otatools package.
* commit '1e120181f0a9240eca61dface4fb4530bf2594ab':
  Dist the otatools package.
2015-08-27 01:27:37 +00:00
Ying Wang
fc168f8469 resolved conflicts for merge of 1a8c6567 to lmp-mr1-ub-dev
Change-Id: Iadb7c55c246705ac10c6822b7bb5d71794ce485b
2015-08-26 17:03:18 -07:00
Tao Bao
7540c08807 Revert "Temporarily use blockimgdiff v2 for OTA."
This reverts commit d07bfc5196.

Real fixes [1][2][3] are ready to merge. Time to revert the workaround.

[1] commit d47d8e1488
[2] commit 1fc67631ee
[3] commit 937847ae49

Bug: 22430577
Change-Id: Icd6623e8717c93ad1f12cd1ba43db5e006e928ad
2015-08-26 15:29:00 -07:00
Tao Bao
937847ae49 Split large files for BBOTA v3.
For BBOTA v3, we need to stash source blocks to support resumable
feature. However, with the growth of file size and the shrink of the
cache size, source blocks that represent a file are too large to be
stashed as a whole. CL in [1] solves the issue by replacing the diff
command with a "new" command. However, it may increase the generated
package size substantially (e.g. from ~100MB to ~400MB).

With this CL, if a file spans too many blocks, we split it into smaller
pieces by generating multiple commands. For the same case above, it
reduces the package size to ~150MB.

One potential downside is that after splitting, files like .jar,
.apk and .zip can no longer use imgdiff. We may lose the potential
benefit of using imgdiff for patch size reduction.

[1] commit 82c47981bd

Bug: 22430577
Change-Id: Iee1ad6543f3d40368e079e418cc31728e1ab3f48
(cherry picked from commit 9a5caf2c30)
2015-08-26 15:00:38 -07:00
Tao Bao
1fc67631ee Revise stash for BBOTAs when needed.
When generating incremental BBOTAs (v2 and above), we need to ensure
that the needed runtime stash is below the given threshold. If it's
running out of space on /cache, we replace the command that uses a
stash with a "new" command instead.

This may increase the OTA package size, since it is carrying more full
blocks instead of patches. It gets even worse for large files that span
a number of blocks, because currently we will store all the blocks for
the file as "new" blocks if stashing cannot be satisfied. We may further
optimize by splitting them into smaller chunks so that most of them can
still be stashed.

Bug: 22430577
Change-Id: Ieae5243d461e3f899f613f76a380f6f7c3edb356
(cherry picked from commit 82c47981bd)
2015-08-26 15:00:38 -07:00
Tao Bao
d47d8e1488 Assert the stash size when generating OTAs.
With block-based OTA v2 and v3, it requires stash space on the /cache
partition to back up blocks during an update. We need to ensure that
it doesn't exceed the partition size. Since there might be other files
on /cache as well, we use cache_size * threshold as the maximum allowed
size. The threshold defaults to 0.8, which can be overridden by command
line option '--stash_threshold'.

Change-Id: Ieee5d373c9bfb2ea401d85ca8a3adb491579de76
(cherry picked from commit 23ac404212)
2015-08-26 15:00:38 -07:00
Ying Wang
1e120181f0 am 473b6a5f: am fc028e59: Dist the otatools package.
* commit '473b6a5f2b00f941acb08b5c3df59cbbdf647609':
  Dist the otatools package.
2015-08-26 20:17:16 +00:00
Claes Elgemark
1a8c656704 am 8d771971: Don\'t fail build of otatools if there are no device certificates
* commit '8d771971212069f77851163f437c782f581bf6db':
  Don't fail build of otatools if there are no device certificates
2015-08-26 17:14:49 +00:00
Claes Elgemark
8d77197121 Don't fail build of otatools if there are no device certificates
Bug: 23552169
Change-Id: I32723701d952ef2243ce0234132fa9876f0f21b6
2015-08-26 10:07:16 -07:00
Bart Sears
8a1fa15844 am c69aa42b: Merge "Set the Security Patch level for MNC" into mnc-dev
* commit 'c69aa42b4331569814d23336412e6754a0495d65':
  Set the Security Patch level for MNC
2015-08-26 03:49:10 +00:00
Bart Sears
c69aa42b43 Merge "Set the Security Patch level for MNC" into mnc-dev 2015-08-26 03:40:38 +00:00
Tao Bao
d3a79db8fe am afc5ab39: am c6e087ad: resolved conflicts for merge of 2bcfbe7e to lmp-mr1-ub-dev
* commit 'afc5ab39d84e9fc5fecbcd3c5a77fe4f956ff825':
  add otatools-package target
2015-08-25 23:39:51 +00:00
Tao Bao
afc5ab39d8 am c6e087ad: resolved conflicts for merge of 2bcfbe7e to lmp-mr1-ub-dev
* commit 'c6e087adc420ca08bfea8613c07aa51e1b4a2e3e':
  add otatools-package target
2015-08-25 23:30:14 +00:00