Commit Graph

4865 Commits

Author SHA1 Message Date
android-build-team Robot 70ec0b3cc1 release-request-08461da0-a262-4ebb-8c32-784b60a151df-for-git_oc-mr1-release-4216972 snap-temp-L74000000086000437
Change-Id: I5fc9273d564fea92f473c4941bccee266feb7699
2017-07-26 07:26:20 +00:00
Jin Qian e2d31361ef recovery: handle security footer before passing size to mke2fs
am: 5e47d5161a

Change-Id: Iaf9b1b1138425101fa10946a215462ada4700433
2017-07-25 23:35:14 +00:00
Jin Qian 5e47d5161a recovery: handle security footer before passing size to mke2fs
mke2fs doesn't take negative size as reserved size. If footer is
specified, compute fs size to be
(max partition size - reserved footer size) / block_size

Bug: 23686092
Bug: 63968011
Merged-In: Iac4e143bd26a70cfc81eb52a399d687e19b1049c
Change-Id: Iac4e143bd26a70cfc81eb52a399d687e19b1049c
(cherry picked from commit f3ccad58dd)
2017-07-25 21:09:02 +00:00
Tao Bao fda6ee7d61 recovery: Fix the flickering when turning on text mode.
When there's no command specified when booting into debuggable builds
(such as using `adb reboot recovery`), we turn on the text mode (i.e.
recovery menu) directly. This CL fixes the issue to avoid showing the
background image in a flash while turning on the text mode.

Bug: 63985334
Test: `fastboot boot $OUT/recovery.img` and it shows the recovery menu
      directly without the no command image in a flash.
Change-Id: Id86bbe346ab76c8defc95e2b423e695a86774b09
(cherry picked from commit 7022f33ec8)
2017-07-25 10:16:48 -07:00
android-build-team Robot fd98c139bd release-request-2b6c1b3d-5e73-4d4a-9a8d-92acb8a1483b-for-git_oc-mr1-release-4212424 snap-temp-L13800000085536241
Change-Id: I9a6e4dc2bb8359230d4ce1e9e12eae9a8878bb2f
2017-07-25 07:25:08 +00:00
Tao Bao 5cee24f4f1 tests: Add a test to cover legacy care_map.txt handling.
This is to cover the code added by commit
5a1dee01df, where an O update_verifier
should not reject N care_map.txt.

Bug: 63544345
Test: recovery_component_test passes on marlin.
Change-Id: Ia944e16cba3cc635098b3ffd92842d725b570fec
(cherry picked from commit c319613e06)
2017-07-24 12:51:19 -07:00
TreeHugger Robot 71b8103bf1 Merge "update_verifier: Handle legacy care_map.txt gracefully." into oc-mr1-dev 2017-07-24 19:50:18 +00:00
Tianjie Xu 92aef7fa88 Merge "Fix a case when brotli writer fails to write last few blocks of data" into oc-mr1-dev 2017-07-24 18:31:54 +00:00
Tao Bao 5fb9f532f0 update_verifier: Handle legacy care_map.txt gracefully.
update_verifier should be backward compatible to not reject legacy
care_map.txt from old releases, which could otherwise fail to boot into
the new release.

For example, we've changed the care_map format between N and O. An O
update_verifier would fail to work with an N care_map.txt - a) we have
switched update_verifier to read from device mapper in O; b) the last
few blocks that contain metadata can't be read via device mapper. This
could be a result of sideloading an O OTA while the device having a
pending N update.

Bug: 63544345
Test: As follows on sailfish:
 1. Flash the device with this CL;
 2. Put a copy of N care_map.txt at /data/ota_package/. Restore the
    permissions properly ('cache' group);
 3. `adb reboot bootloader`;
 4. `fastboot set_active <current_slot>`
 5. Device boots up into home screen, with a warning in logcat that says
    it has skipped legacy care_map.txt.
Change-Id: I6acc88c9e655a9245e6531f176fef7953953935f
(cherry picked from commit 5a1dee01df)
2017-07-24 09:14:15 -07:00
android-build-team Robot a187538c37 release-request-e64ca0c4-2b43-4758-b238-0b8c6fabc365-for-git_oc-mr1-release-4207446 snap-temp-L19600000085022555
Change-Id: I7579fd758d239dc485d7a61f3cf24381b408bb3a
2017-07-23 07:31:42 +00:00
Tao Bao 329fe83509 Avoid crashing recovery with unwritable /cache.
When /cache is unwritable, recovery hits a crash loop. Because it
passes nullptr to fileno(3) when writing back the locale file. This
prevents user from recovering a device - it cannot boot far enough to
recovery menu which allows wiping /cache.

Bug: 63927337
Test: Corrupt /cache and boot into recovery on bullhead:
 1. m -j recoveryimage
 2. fastboot erase cache
 3. fastboot boot $OUT/recovery.img
 4. recovery menu shows up.
Change-Id: I1407743f802049eb48add56a36298b665cb86139
(cherry picked from commit ec57903a7e)
2017-07-21 19:12:02 -07:00
Tianjie Xu d9759e8a7b Fix a case when brotli writer fails to write last few blocks of data
receive_new_data may exit too early if the zip processor has sent all
the raw data. As a result, the last few 'new' commands will fail even
though the brotli decoder has more output in its buffer.

Restruct the code so that 'NewThreadInfo' owns the decoder state solely;
and receive_brotli_new_data is responsible for the decompression.

Also reduce the test data size to 100 blocks to avoid the test timeout.

Bug: 63802629
Test: recovery_component_test. on bullhead, apply full updates with and
w/o brotli compressed entries, apply an incremental update.

Change-Id: Id429b2c2f31951897961525609fa12c3657216b7
(cherry picked from commit 6ed175d541)
2017-07-21 22:18:34 +00:00
Jiyong Park d774ff247e Build libminui with BOARD_VNDK_VERSION
Use libdrm_platform which is a platform variant of libdrm.

Bug: 63741047
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j libminui
Test: ryu recovery graphics test shows various graphics
Change-Id: Ifd2c1432781a96538585cdf818aa728d628a2f5a
Merged-In: Ifd2c1432781a96538585cdf818aa728d628a2f5a
(cherry picked from commit a48c494f13)
2017-07-21 00:45:21 +00:00
android-build-team Robot 9030a47ab4 release-request-d8901a87-7dd0-4cc8-a44e-d04982e429da-for-git_oc-mr1-release-4198291 snap-temp-L50900000084068812
Change-Id: I1f54fbfc485d7f06464d84f7cdace9442387d91c
2017-07-20 07:27:35 +00:00
Tianjie Xu 3a3019199c Merge "Fix the android-cloexec-* warnings in bootable/recovery" am: 94a8ea1797 am: 6d8827e0d3 am: 96b5bb9601
am: f2a279adb5

Change-Id: I85c1b30fe78f99a935a19ba28d02841f68216226
2017-07-19 23:14:51 +00:00
Tianjie Xu f2a279adb5 Merge "Fix the android-cloexec-* warnings in bootable/recovery" am: 94a8ea1797 am: 6d8827e0d3
am: 96b5bb9601

Change-Id: I55911c112a34797d7c7098e5e325145667b46715
2017-07-19 23:12:20 +00:00
Tianjie Xu 96b5bb9601 Merge "Fix the android-cloexec-* warnings in bootable/recovery" am: 94a8ea1797
am: 6d8827e0d3

Change-Id: I0c150dc44b70353f1c4b6ef7dd65b1f601e2ec4b
2017-07-19 23:09:20 +00:00
Tianjie Xu 6d8827e0d3 Merge "Fix the android-cloexec-* warnings in bootable/recovery"
am: 94a8ea1797

Change-Id: I57ae57bab58f603540654bb24df9facca9a7d625
2017-07-19 23:06:50 +00:00
Tianjie Xu 94a8ea1797 Merge "Fix the android-cloexec-* warnings in bootable/recovery" 2017-07-19 23:00:19 +00:00
Tianjie Xu de6735e80c Fix the android-cloexec-* warnings in bootable/recovery
Add the O_CLOEXEC or 'e' accordingly.

Bug: 63510015
Test: recovery tests pass
Change-Id: I7094bcc6af22c9687eb535116b2ca6a59178b303
2017-07-19 12:17:41 -07:00
android-build-team Robot 3925d88c79 release-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-4185249 snap-temp-L63000000082739046
Change-Id: If5b820c31fd15c067850d75cdb9d9518e1e1b666
2017-07-16 07:28:18 +00:00
Tao Bao f7cc0e0cfb Merge "Remove the obsolete reference to /file_contexts." 2017-07-14 00:04:12 +00:00
Tao Bao 0d24d9cbed Merge "Fix the missing char when showing recovery logs." am: 8155a8ba74 am: c61bbe158e am: 762c42d6f6
am: 1a4f9e37dd

Change-Id: I733b98ea22719db36e3bca71cc083be5df403288
2017-07-13 20:52:18 +00:00
Tao Bao 1a4f9e37dd Merge "Fix the missing char when showing recovery logs." am: 8155a8ba74 am: c61bbe158e
am: 762c42d6f6

Change-Id: I8dd98865f38e0cc328f5a908a2c7c092d73e3a61
2017-07-13 20:50:17 +00:00
Tao Bao 762c42d6f6 Merge "Fix the missing char when showing recovery logs." am: 8155a8ba74
am: c61bbe158e

Change-Id: Ic38f2132b05642ff8f5e00745fc1a0ac001d9e27
2017-07-13 20:45:48 +00:00
Tao Bao c61bbe158e Merge "Fix the missing char when showing recovery logs."
am: 8155a8ba74

Change-Id: I237241a661838e914e3c3e5c7bd2ba113e6a0501
2017-07-13 20:42:18 +00:00
Treehugger Robot 8155a8ba74 Merge "Fix the missing char when showing recovery logs." 2017-07-13 20:34:55 +00:00
Tao Bao 7af933b6a6 Remove the obsolete reference to /file_contexts.
This file no longer exists:
- /file_contexts has been split into plat_file_contexts and
  nonplat_file_contexts since commit
  b236eb6ca204cefcb926e19bd5682f9dcad4021d (system/sepolicy).
- It was named /file_contexts.bin prior to the split.

'-S file_contexts' is also no longer required by e2fsdroid, since commit
2fff6fb036cbbb6dedd7da3d208b312a9038a5ce (external/e2fsprogs). It will
load the file contexts via libselinux.

Test: Trigger the path by performing a data wipe for converting to FBE.
Change-Id: I179939da409e5c0415ae0ea0bf5ddb23f9e6331e
2017-07-13 11:52:11 -07:00
Tao Bao ca6ce2c848 Fix the missing char when showing recovery logs.
This is a regression when adding support for margin space in commit
171b4c4c.

We're losing one char when showing long log lines. Because text_ is
aware of kMarginWidth, but not the the added indent (TEXT_INDENT).

Test: 'View recovery logs' on angler, with no missing character.
Change-Id: I284d54681d603e85e69d8e9c25173b1437a704df
2017-07-13 11:44:11 -07:00
android-build-team Robot dda74c41b3 release-request-5ee66a34-3e58-4de0-ba73-1f49074ee497-for-git_oc-mr1-release-4169335 snap-temp-L20600000081126177
Change-Id: Id358b9f673d94846f67a87536ff7db9c3427d077
2017-07-11 07:27:49 +00:00
Bill Yi 8ac91e06b3 Merge "Import translations. DO NOT MERGE am: 28b67f8eea -s ours am: 9839965b25 -s ours am: 7e05669aba -s ours" into oc-dr1-dev-plus-aosp
am: c33abb73bc  -s ours

Change-Id: I595fc1bbe2235ffcb5809423d94f89383ae82976
2017-07-11 03:22:06 +00:00
Bill Yi d7307321dd Import translations. DO NOT MERGE am: 28b67f8eea -s ours am: 9839965b25 -s ours am: 04e1d6ebd9 -s ours
am: 1efc63d9d4  -s ours

Change-Id: Ie810f9995732ff09b79fb3ac9858059a5596dc17
2017-07-11 03:21:57 +00:00
Android Build Merger (Role) c33abb73bc Merge "Import translations. DO NOT MERGE am: 28b67f8eea -s ours am: 9839965b25 -s ours am: 7e05669aba -s ours" into oc-dr1-dev-plus-aosp 2017-07-11 03:19:35 +00:00
Bill Yi 69a23a37f5 Import translations. DO NOT MERGE am: 28b67f8eea -s ours am: 9839965b25 -s ours
am: 7e05669aba  -s ours

Change-Id: Ib58bfa4519142c21b4f7440d0a269732172f9e16
2017-07-11 03:19:28 +00:00
Bill Yi 1efc63d9d4 Import translations. DO NOT MERGE am: 28b67f8eea -s ours am: 9839965b25 -s ours
am: 04e1d6ebd9  -s ours

Change-Id: I7a86f732572f2b03220890f096f5881e0f074b25
2017-07-11 03:19:27 +00:00
Bill Yi 7e05669aba Import translations. DO NOT MERGE am: 28b67f8eea -s ours
am: 9839965b25  -s ours

Change-Id: I0b93748069282ecd14fdcba5341c961913df0432
2017-07-11 03:16:27 +00:00
Bill Yi 04e1d6ebd9 Import translations. DO NOT MERGE am: 28b67f8eea -s ours
am: 9839965b25  -s ours

Change-Id: Ib54432253ac2e1db0f9a59fbf18c1fb4ce8dfe04
2017-07-11 03:16:27 +00:00
Bill Yi 9839965b25 Import translations. DO NOT MERGE
am: 28b67f8eea  -s ours

Change-Id: I1f451ff10f7c09b0d960830f8985515c8bc0ab0b
2017-07-11 03:13:57 +00:00
Tianjie Xu 7df56291c0 Merge "Add support to decompress brotli compressed new data" am: 918e6ea1b2 am: 43bdf6cad6 am: 8375ebee37
am: 9f8fd32d95

Change-Id: I6af65721fec0bb2ff47980cbe5125d4a301b4787
2017-07-10 22:53:43 +00:00
Tianjie Xu 9f8fd32d95 Merge "Add support to decompress brotli compressed new data" am: 918e6ea1b2 am: 43bdf6cad6
am: 8375ebee37

Change-Id: I3eea508486f48d316644b68278f42976ffd4698d
2017-07-10 22:47:10 +00:00
Tianjie Xu 8375ebee37 Merge "Add support to decompress brotli compressed new data" am: 918e6ea1b2
am: 43bdf6cad6

Change-Id: If938b5b33303c52ea815016c42817a62ab9d08d9
2017-07-10 22:40:10 +00:00
Tianjie Xu 43bdf6cad6 Merge "Add support to decompress brotli compressed new data"
am: 918e6ea1b2

Change-Id: I4fd9cea71716ad1574ecb4bb7f612bc8734711c5
2017-07-10 22:33:37 +00:00
Tianjie Xu 918e6ea1b2 Merge "Add support to decompress brotli compressed new data" 2017-07-10 22:19:24 +00:00
Bill Yi 28b67f8eea Import translations. DO NOT MERGE
Change-Id: If9d38fc1db0f4abc498c5229aa6d45150b0ef5e7
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-10 13:22:17 -07:00
Tianjie Xu 107a34f9fc Add support to decompress brotli compressed new data
Add a new writer that can decode the brotli-compressed system/vendor
new data stored in the OTA zip.

Brotli generally gives better compression rate at the cost of slightly
increased time consumption. The patch.dat is already compressed
by BZ; so there's no point to further compress it.

For the given 1.9G bullhead system image:
Size: 875M -> 787M; ~10% reduction of package size.
Time: 147s -> 153s; ~4% increase of the block_image_update execution time.
(I guess I/O takes much longer time than decompression.)

Also it takes 4 minutes to compress the system image on my local
machine, 3 more minutes than zip.

Test: recovery tests pass && apply a full OTA with brotli compressed
system/vendor.new.dat on bullhead

Change-Id: I232335ebf662a9c55579ca073ad45265700a621e
2017-07-07 16:08:18 -07:00
android-build-team Robot e7935db536 release-request-ccd04736-6e66-4825-a227-ecd69d8b5337-for-git_oc-mr1-release-4163697 snap-temp-L79500000080559163
Change-Id: I29a0df65f76250a6ba7359be1bcf28f5798e7d77
2017-07-07 22:01:47 +00:00
Tianjie Xu 84e4b9fe87 Merge "Fix a rare failure for imgdiff when random data equals gzip header" am: b87a166a16 am: 8542502f1f am: 233f4b0b4b
am: 79c1562dc9

Change-Id: Ice4f792e23043b595e20110d72cab292edc16041
2017-07-07 18:32:43 +00:00
Tianjie Xu 79c1562dc9 Merge "Fix a rare failure for imgdiff when random data equals gzip header" am: b87a166a16 am: 8542502f1f
am: 233f4b0b4b

Change-Id: If7e81b8e794f34d374d385eb5603353cdfec524f
2017-07-07 18:11:59 +00:00
Tianjie Xu 233f4b0b4b Merge "Fix a rare failure for imgdiff when random data equals gzip header" am: b87a166a16
am: 8542502f1f

Change-Id: Iaf46b8d2abad2357975ba6ecedaeed522c20b51e
2017-07-07 17:55:18 +00:00
Tianjie Xu 8542502f1f Merge "Fix a rare failure for imgdiff when random data equals gzip header"
am: b87a166a16

Change-Id: Ic3c7d102cc7a2b992c699add012076a4bda549c6
2017-07-07 17:52:26 +00:00