Commit graph

3045 commits

Author SHA1 Message Date
Tao Bao
16536a53a0 DO NOT MERGE rangelib.py: Fix the bug in monotonic check.
RangeSet("2-10").monotonic gives a wrong result of "False". Fix the bug
and add more tests into test_rangelib.py.

Bug: 28760775
Change-Id: I04780571b45ecafd34040f405756b9745a9e21a5
(cherry picked from commit e8f756137c)
2016-05-13 15:21:26 -07:00
Tianjie Xu
8d11597558 DO NOT MERGE Monotonic flag sets incorrectly in rangelib
After applying update_target_files_incr_ext4.sh, some files may end up
occupying unsorted block fragments. In one example, an apk file has the
block range [258768-259211,196604]. The monotonic flag in rangelib sets
incorrectly for this example and leads to a bad input file for imgdiff.
After fixing the flag, bsdiff is called instead of imgdiff and the
incremental OTA package generates successfully.

Bug: 28760775
Bug: 28053885
Change-Id: Ib841bf449ff6a29314fc4a1b8fba941a6dc532ac
(cherry picked from commit cd1e16a761)
2016-05-13 10:49:02 -07:00
Tianjie Xu
083f65d66d Adjust the size limit for splitting large files
Modify the number of max blocks per transfer to reduce splitting of
large files during patch generation. This will reduce the size of
final incremental OTA updater package. In specific, the size limit
for each file to transfer is set to 1/8 cachesize instead of a fix
number.

Bug: 26472126

Change-Id: Iffb135e378c4c7a91640f2fc4c40e9e93d1fe4bb
(cherry picked from commit bb86e1d9c2)
2016-03-23 17:00:53 -07:00
Tao Bao
fa41fb2705 Use the update-binary in the source build for downgrade OTAs.
We used to use the update-binary from the target build when creating
incremental OTAs. But for downgrade OTAs, we should use the one in the
source build instead, which is actually newer.

Bug: 27556903
Change-Id: Ib6415729b979dbffdebdda24902f7f560942801a
(cherry picked from commit 4996cf03d2)
2016-03-08 18:48:40 -08:00
Tao Bao
177c610e7f DO NOT MERGE releasetools: Support generating downgrade incremental OTAs.
Add --downgrade flag to ota_from_target_files.py script. It allows
generating an incremental OTA that updates from a newer build to an
older one (based on timestamp comparison). "post-timestamp" line in the
metadata file will be replaced by "ota-downgrade=yes". A data wipe will
always be enforced, so "ota-wipe=yes" will also be included in the
metadata file.

Bug: 26883782
Change-Id: Iaa05f662d948b7ab632a9fbb7051cc3f8bf68c21
(cherry picked from commit 5d1825664a)
2016-03-07 21:02:36 -08:00
Tao Bao
46ae586ab2 am e09359ab: DO NOT MERGE Pass source\'s info_dict to vendor\'s releasetools.py.
* commit 'e09359abc0f8c29fbb16d35ab7375d80fde6f931':
  DO NOT MERGE Pass source's info_dict to vendor's releasetools.py.
2015-10-17 00:09:35 +00:00
Tao Bao
e09359abc0 DO NOT MERGE Pass source's info_dict to vendor's releasetools.py.
When building incremental packages, the info_dict from the source build
should be the one in use. We have done that for most of the partitions
(system and etc.), and should pass that to vendor's script as well.

Also includes the CL in commit aac4ad56b6
that fixes a bug in commit 6f0b219ac5.

Bug: 24898607
Change-Id: I4ea6037dad7061e1683661fc4c394fa3a7a7c5cd
(cherry picked from commit 6f0b219ac5)
2015-10-16 15:47:51 -07:00
Tao Bao
338da607e8 DO NOT MERGE: Only use a fixed timestamp when packaging.
This CL changes to use a fixed timestamp only when packaging
into the target_files zip.

Bug: 24377993
Change-Id: I01d136f4b99e1eff80c559192d93db83a3c5c0a4
(cherry picked from commit 822f5840c0)
2015-10-12 09:55:26 -07:00
Joe Fernandez
1b5eef1b49 am b16edb5f: Merge "add unique ID to each windows download link. These IDs are necessary for the TOS wall to identify which link should be applied to the download button." into mnc-dev
* commit 'b16edb5f3ef9032b7e19c29aac2496c34bb8ac76':
  add unique ID to each windows download link. These IDs are necessary for the TOS wall to identify which link should be applied to the download button.
2015-10-09 23:59:07 +00:00
Joe Fernandez
b16edb5f3e Merge "add unique ID to each windows download link. These IDs are necessary for the TOS wall to identify which link should be applied to the download button." into mnc-dev 2015-10-09 23:54:46 +00:00
smain@google.com
3d59345527 add unique ID to each windows download link.
These IDs are necessary for the TOS wall to identify which link should be applied to the download button.

Change-Id: I1b5b8b516a5b8d7fd8433c02011cb4fb2044b71f
2015-10-09 16:30:05 -07:00
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
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
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
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
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
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
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
smain@google.com
15bb28fc73 am ed7e864a: fix a few bugs in the studio download button behavior: - make button text always white (avoid blue on blue during hover) - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens - remove the animation scr
* commit 'ed7e864a735f004f1dbb4a2db5261855b5693913':
  fix a few bugs in the studio download button behavior:  - make button text always white (avoid blue on blue during hover)  - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens  - remove the animation script when clicking download before agree because it reloaded the page (unkown cause) depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/
2015-08-24 16:41:18 +00:00
smain@google.com
ed7e864a73 fix a few bugs in the studio download button behavior:
- make button text always white (avoid blue on blue during hover)
 - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens
 - remove the animation script when clicking download before agree because it reloaded the page (unkown cause)
depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/

Change-Id: I1b2b4ff9c0b0cbbd34f1c77a2b736fe3425a16e4
2015-08-20 00:52:27 +00:00
Dirk Dougherty
8ea2636c19 am 6a8f88cd: adjust image placement for m hero on medium screens.
* commit '6a8f88cdec931470256ade35ffe6b8097425e36f':
  adjust image placement for m hero on medium screens.
2015-08-16 23:57:48 +00:00
Dirk Dougherty
6a8f88cdec adjust image placement for m hero on medium screens.
Change-Id: I644837bf151549ad8dbbfb194f8e699233362933
2015-08-14 21:19:22 -07:00
Joe Fernandez
a2869db89e am 71e0a80c: Merge "doc change: Add hero image for m and css for landing pages." into mnc-dev
* commit '71e0a80c2c2fdc26bb014685eebb874aa40f782d':
  doc change: Add hero image for m and css for landing pages.
2015-08-13 23:11:45 +00:00
Joe Fernandez
71e0a80c2c Merge "doc change: Add hero image for m and css for landing pages." into mnc-dev 2015-08-13 23:02:37 +00:00
Dirk Dougherty
083da20347 doc change: Add hero image for m and css for landing pages.
Change-Id: I52ddba716eebf821f8f5dbd888d6e3519f4284d4
2015-08-13 12:37:34 -07:00
Dianne Hackborn
897f3ba8b1 am 25abc5a3: Merge "Fix issie #23116383: Include security patch level in Settings" into mnc-dev
* commit '25abc5a38e2e7f2962463aa4e5cd407ecdde689c':
  Fix issie #23116383: Include security patch level in Settings
2015-08-13 00:54:30 +00:00
Dianne Hackborn
25abc5a38e Merge "Fix issie #23116383: Include security patch level in Settings" into mnc-dev 2015-08-13 00:46:58 +00:00
Dianne Hackborn
e593e5c42a Fix issie #23116383: Include security patch level in Settings
Change-Id: I46303c064d1365781a2c8a05bd6087518afb2aec
2015-08-12 16:29:08 -07:00
Tao Bao
67e7c66124 am 007979ee: Add support for clobbered blocks
* commit '007979ee7543a396d97b3e9ada21aca44d503597':
  Add support for clobbered blocks
2015-08-12 05:18:37 +00:00
Tao Bao
007979ee75 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: If9efab3d7a0071a87b4d4297daf7963c3b818afe
(cherry picked from commit ff7778166b)
2015-08-11 21:02:45 -07:00
Clay Murphy
86e510cc31 am 71a33c4d: Merge "Add the ability to display annotations in the generated docs (cherry-picked from commit 87c44d8a11) Bug: 8440225 Change-Id: I41c1c7909b283832b818b8860ffe370cd4328f20" into mnc-dev
* commit '71a33c4d5b010757423980b90681445ca2bb2be0':
  Add the ability to display annotations in the generated docs (cherry-picked from commit 87c44d8a11) Bug: 8440225 Change-Id: I41c1c7909b283832b818b8860ffe370cd4328f20
2015-08-11 21:04:24 +00:00