Commit Graph

4863 Commits

Author SHA1 Message Date
Tao Bao b94ba1a5e4 Avoid crashing recovery with unwritable /cache. am: 329fe83509
am: 07a5750f1e

Change-Id: I4d73128ba0a754d333350d1987daf512dae09eba
2017-07-22 21:57:42 +00:00
Tao Bao 07a5750f1e Avoid crashing recovery with unwritable /cache.
am: 329fe83509

Change-Id: I88a3da48716c8a7021466fbdefb07cd5776389a7
2017-07-22 21:54: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
Jiyong Park 1ea0ca934a Build libminui with BOARD_VNDK_VERSION am: d774ff247e
am: 8e59e23d14  -s ours

Change-Id: I1a01f19c2421c02be9dceb85925b4e784144548b
2017-07-21 23:57:08 +00:00
Jiyong Park 8e59e23d14 Build libminui with BOARD_VNDK_VERSION
am: d774ff247e

Change-Id: I282db7cb9da4a5612323c7fcb182760534384229
2017-07-21 23:54:28 +00:00
Tao Bao 92844caa81 Merge "Avoid crashing recovery with unwritable /cache." am: 9187f1cc51 am: 4fb2825dc2 am: e62f06246a am: 7d03b8d495
am: 2076da2014

Change-Id: I6b3df2ee56d77b13cd35ba208245d3e8004861c0
2017-07-21 23:39:06 +00:00
Tao Bao 2076da2014 Merge "Avoid crashing recovery with unwritable /cache." am: 9187f1cc51 am: 4fb2825dc2 am: e62f06246a
am: 7d03b8d495

Change-Id: I99fcd7c1af967df6b71430dbcf317355ea19368f
2017-07-21 23:34:09 +00:00
Tao Bao 7d03b8d495 Merge "Avoid crashing recovery with unwritable /cache." am: 9187f1cc51 am: 4fb2825dc2
am: e62f06246a

Change-Id: Ifb7776e0a6946833bd46e00206412082ce053eba
2017-07-21 23:29:45 +00:00
Tao Bao e62f06246a Merge "Avoid crashing recovery with unwritable /cache." am: 9187f1cc51
am: 4fb2825dc2

Change-Id: I7ad113d2e73b9944b999a7c2a53ce1e7c9670c8c
2017-07-21 23:25:21 +00:00
Tao Bao 4fb2825dc2 Merge "Avoid crashing recovery with unwritable /cache."
am: 9187f1cc51

Change-Id: Ie5708c2f703aefbfcad85ad0d2d24ae36b725c78
2017-07-21 23:22:31 +00:00
Treehugger Robot 9187f1cc51 Merge "Avoid crashing recovery with unwritable /cache." 2017-07-21 23:14:08 +00:00
Tianjie Xu 417f504fa6 Merge "Fix a case when brotli writer fails to write last few blocks of data" am: e45c8f0057 am: 80acaab52f am: 75ff0107c8 am: 512283a751
am: 12c6a01e8f

Change-Id: I87f690196f6fde0c79af4837a49bdb7f1d46e443
2017-07-21 22:57:01 +00:00
Jin Qian cd11f924e7 Merge "recovery: replace make_ext4 with e2fsprogs" am: f7c00ddaf6 am: 9203641742 am: 7cdc58497b am: 6fc893ebca
am: ac58c9f87b

Change-Id: If23d3ad9082ffddb75a052c7cca79b0f902756c1
2017-07-21 22:50:06 +00:00
Tianjie Xu 12c6a01e8f Merge "Fix a case when brotli writer fails to write last few blocks of data" am: e45c8f0057 am: 80acaab52f am: 75ff0107c8
am: 512283a751

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

Change-Id: Id765b0a58fad55f940cc6899d3a8c1d4fbf3995c
2017-07-21 22:47:13 +00:00
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
Tao Bao ec57903a7e 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
2017-07-21 13:40:56 -07: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
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
TreeHugger Robot fe6ba1eb72 Merge "Build libminui with BOARD_VNDK_VERSION" 2017-07-21 00:36:05 +00: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 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
Jiyong Park a48c494f13 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
2017-07-19 19:15:46 +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
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 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