Commit Graph

4796 Commits

Author SHA1 Message Date
Tianjie Xu 512283a751 Merge "Fix a case when brotli writer fails to write last few blocks of data" am: e45c8f0057 am: 80acaab52f
am: 75ff0107c8

Change-Id: Ieab5e6e412704599e873c7497d1c0de42453e642
2017-07-21 22:46:00 +00:00
Jin Qian 6fc893ebca Merge "recovery: replace make_ext4 with e2fsprogs" am: f7c00ddaf6 am: 9203641742
am: 7cdc58497b

Change-Id: Ib2e1ffa2f8620d51c7693130e0d51ed2da9b207f
2017-07-21 22:44:41 +00:00
Tianjie Xu 75ff0107c8 Merge "Fix a case when brotli writer fails to write last few blocks of data" am: e45c8f0057
am: 80acaab52f

Change-Id: Id429b2c2f31951897961525609fa12c3657216b7
2017-07-21 21:06:52 +00:00
Tianjie Xu 80acaab52f Merge "Fix a case when brotli writer fails to write last few blocks of data"
am: e45c8f0057

Change-Id: I337e8ec26f59a5245ab299080d7251331823e2da
2017-07-21 21:04:17 +00:00
Tianjie Xu e45c8f0057 Merge "Fix a case when brotli writer fails to write last few blocks of data" 2017-07-21 20:59:24 +00:00
Jin Qian 7cdc58497b Merge "recovery: replace make_ext4 with e2fsprogs" am: f7c00ddaf6
am: 9203641742

Change-Id: I8e23f2622021e8bae61a3dc4954c665c7fc85ccf
2017-07-21 19:10:22 +00:00
Jin Qian 9203641742 Merge "recovery: replace make_ext4 with e2fsprogs"
am: f7c00ddaf6

Change-Id: I17167b59242c709b18d09fccb52058b0bc25bf09
2017-07-21 19:06:06 +00:00
Treehugger Robot f7c00ddaf6 Merge "recovery: replace make_ext4 with e2fsprogs" 2017-07-21 19:00:46 +00:00
Tianjie Xu 6ed175d541 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: I9442f2536b74e48dbf7eeb062a8539c82c6dab47
2017-07-21 11:44:00 -07:00
Jin Qian ded2dac082 recovery: replace make_ext4 with e2fsprogs
Execute mke2fs to create empty ext4 filesystem.
Execute e2fsdroid to add files to filesystem.

Test: enter recovery mode and wipe data
Bug: 35219933
Change-Id: I10a9f4c1f4754ad864b2df45b1f879180ab33876
(cherry picked from commit ac31808cd3)
2017-07-20 11:42:17 -07: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
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 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 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 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 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 9839965b25 Import translations. DO NOT MERGE
am: 28b67f8eea  -s ours

Change-Id: I1f451ff10f7c09b0d960830f8985515c8bc0ab0b
2017-07-11 03:13:57 +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
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
Tianjie Xu b87a166a16 Merge "Fix a rare failure for imgdiff when random data equals gzip header" 2017-07-07 17:42:12 +00:00
Luke Song 1c8189c851 Restructure vr_ui
am: c392888df7  -s ours

Change-Id: I898ecb8a10383d0aaba9cbaf3f47911b5e895576
2017-07-07 01:21:36 +00:00
Luke Song 6660c97f07 Introduce VR recovery ui
am: edc6b52f00  -s ours

Change-Id: I4b6b4a5c7ffc3ae29c0b35d91f19ed56048ab049
2017-07-07 00:38:12 +00:00
Luke Song c392888df7 Restructure vr_ui
Get rid of pixel offset variables, and use makefile variables in
BoardConfigs.

Cherry picked from commit 81a8e4cab2

Bug: 37779982
Test: Verified vr ui has same behavior.
Change-Id: Ifbf44e27d7101aedbe3c0e6db4b8181d56efadfd
2017-07-06 16:49:27 -07:00
Tianjie Xu 14ebc1e5ae Fix a rare failure for imgdiff when random data equals gzip header
In a rare case, a random chunk will pass both the gzip header check
and the inflation process; but fail the uncompressed length check in the
footer. This leads to a imgdiff failure. So, we should treat this chunk
as 'normal' instead of 'inflated' while generating the patch.

Bug: 63334984
Test: imgdiff generates patch successfully on previous failing images.
Change-Id: Ice84f22d3653bce9756bda91e70528c0d2f264a0
2017-07-06 16:49:11 -07:00
Luke Song edc6b52f00 Introduce VR recovery ui
A version of screen ui with specific adjustments for vr device
compatibility.

Cherry picked from commit a44dba7f4e

Bug: 37779982
Test: "adb reboot recovery" to view
Change-Id: If6b0f26c1b587f8d0176060685b5efb6c67593b1
2017-07-06 21:53:00 +00:00
Android Build Merger (Role) 114b555807 Merge "Merge "recovery: replace make_ext4 with e2fsprogs" into oc-dr1-dev am: bee95d6866" into oc-dr1-dev-plus-aosp 2017-07-05 22:41:56 +00:00
Jin Qian 6895d5c44d Merge "recovery: replace make_ext4 with e2fsprogs" into oc-dr1-dev
am: bee95d6866

Change-Id: Iafcdb0e0b27090349d17f130bc0bcdb45ff1b8d4
2017-07-05 22:40:44 +00:00
Jin Qian 987c5a98a8 Merge "recovery: replace make_ext4 with e2fsprogs" into oc-dr1-dev
am: bee95d6866

Change-Id: I2428f35c9c8a67ba8f1de23602b4110641e63a3f
2017-07-05 22:40:26 +00:00
TreeHugger Robot bee95d6866 Merge "recovery: replace make_ext4 with e2fsprogs" into oc-dr1-dev 2017-07-05 22:33:35 +00:00
Tao Bao 9e62767759 Merge "Update ScreenRecoveryUI::Draw* function signatures." am: c8e338fa9c am: c24d97fafa
am: 7e3b1c00c6

Change-Id: I8892407f036aa2dd1a8e90068274362648cc6cc0
2017-07-02 02:51:46 +00:00
Tao Bao 7e3b1c00c6 Merge "Update ScreenRecoveryUI::Draw* function signatures." am: c8e338fa9c
am: c24d97fafa

Change-Id: I6ab605dc914bed4f5104b6fd405d7f5f19a5d863
2017-07-02 02:49:46 +00:00
Tao Bao c24d97fafa Merge "Update ScreenRecoveryUI::Draw* function signatures."
am: c8e338fa9c

Change-Id: I8754a10003053459407cbc633a527943a622385a
2017-07-02 02:47:16 +00:00
Treehugger Robot c8e338fa9c Merge "Update ScreenRecoveryUI::Draw* function signatures." 2017-07-02 02:42:46 +00:00
Tao Bao ea78d86b44 Update ScreenRecoveryUI::Draw* function signatures.
Move away from taking int* for the Y-offset. Change it to int and return
the offset instead.

Test: Check the recovery menu and 'Wipe data' menu.
Change-Id: Ib15e070a0d576a0f8f66f35605cb8479e7071f26
2017-07-01 17:41:24 -07:00