Commit Graph

2847 Commits

Author SHA1 Message Date
Tao Bao 8f9672c0db Merge "tests: Generate testdata for 2nd arch."
am: 16e88679dc

Change-Id: I9804a4fe55aa9eb1002d279bb2dc286a0409782d
2016-10-25 23:54:07 +00:00
Tao Bao 16e88679dc Merge "tests: Generate testdata for 2nd arch." 2016-10-25 23:48:45 +00:00
Tao Bao f1338fbf41 tests: Generate testdata for 2nd arch.
We currently only copy the testdata to
$(TARGET_OUT_DATA_NATIVE_TESTS)/recovery, which fails the tests
generated for 2nd arch (TARGET_2ND_ARCH). For example, on angler
/data/nativetest/recovery_component_test/recovery_component_test fails
due to missing testdata.

Bug: 32123241
Test: Both of /data/nativetest/recovery... and /data/nativetest64/recovery...
work on angler.

Change-Id: Ib76264b4408d01c08b2619c8ac84b2476ea5a8bc
2016-10-25 15:12:13 -07:00
Tao Bao 565273839e Merge "applypatch: Fix the bug when constructing VAL_BLOB."
am: e1991428ba

Change-Id: I354b9535077cf4dfbda78c731ac41cba015e8805
2016-10-25 02:48:54 +00:00
Tao Bao e1991428ba Merge "applypatch: Fix the bug when constructing VAL_BLOB." 2016-10-25 02:44:10 +00:00
Tao Bao edf1b15fef applypatch: Fix the bug when constructing VAL_BLOB.
When constructing std::string from C-string, the string may be truncated
at null char. Use range constructor instead.

Bug: 32380016
Test: Use applypatch to install a previously failed recovery image.
Change-Id: Id3e2afb4a810594243cd21db526933d1fea5044b
2016-10-24 16:08:28 -07:00
Yabin Cui a866b12c2d Merge "Verify wipe package when wiping A/B device in recovery."
am: fd796317c3

Change-Id: Iac90d4e641c171e5134ebba5e33556713c7aa4d7
2016-10-19 19:23:07 +00:00
Treehugger Robot fd796317c3 Merge "Verify wipe package when wiping A/B device in recovery." 2016-10-19 19:15:06 +00:00
Yabin Cui fd99a318fe Verify wipe package when wiping A/B device in recovery.
To increase the security of wiping A/B devices, let uncrypt write
wipe package in misc partition. Then recovery verifies the wipe
package before wiping the device.

Based on the original cherrypick, this CL also has additional changes to
address the LOG statements and libziparchive changes.

Bug: 29159185
Test: Build and boot into recovery.

Change-Id: I186691bab1928d3dc036bc5542abd64a81bc2168
(cherry picked from commit 6faf0265c9)
2016-10-19 11:19:15 -07:00
Tianjie Xu d7d7f3c792 Merge "Add a unit test for applypatch_check"
am: 06603c76c5

Change-Id: Ieb8dd72e88d01d2067ba35369791d038260a4d49
2016-10-19 03:19:12 +00:00
Treehugger Robot 06603c76c5 Merge "Add a unit test for applypatch_check" 2016-10-19 03:09:25 +00:00
Tianjie Xu 7691800c2e Merge "Clean up bootloader_message usage in recovery"
am: 94f4494613

Change-Id: Idda16fe41dc644ef12fe12706e5d61b8c3a9fa62
2016-10-19 02:55:10 +00:00
Treehugger Robot 94f4494613 Merge "Clean up bootloader_message usage in recovery" 2016-10-19 02:48:02 +00:00
Tianjie Xu bd56f1590c Clean up bootloader_message usage in recovery
Switch to using vector and string.

Test: bootloader message writes correctly on angler.
Change-Id: I95d5a1e584630db326bb4400f3a149b59ad30a9e
2016-10-19 00:50:56 +00:00
Tianjie Xu ece0b68ca6 Merge "Fix applypatch_check failure when applying update on angler"
am: 7df1850d37

Change-Id: I5d5509d15df4ec42077b68bac7977b56cfab9097
2016-10-19 00:42:01 +00:00
Tianjie Xu a5fd5abe80 Add a unit test for applypatch_check
If no sha1 is specified, applypatch_check should pass as long as
the file content loads successfully. Add a unit case acccordingly.

Test: Unit tests passed
Bug: 32243751
Change-Id: I8c013be67c197d2935e11cf6acc59fb9b943cfd9
2016-10-18 17:30:38 -07:00
Tianjie Xu 7df1850d37 Merge "Fix applypatch_check failure when applying update on angler" 2016-10-19 00:29:23 +00:00
Yabin Cui 83e4e6d35c Merge "Fix bootloader_message."
am: 7c95fe10de

Change-Id: I102d5b27dcb295e82b7ec094a641a43efca793dc
2016-10-18 23:36:28 +00:00
Treehugger Robot 7c95fe10de Merge "Fix bootloader_message." 2016-10-18 23:23:09 +00:00
Yabin Cui 0d5b85944c Fix bootloader_message.
Bug: 29945717
Change-Id: I934fd6c52b0111937fa75455de2fa4157fb30f6f
(cherry picked from commit 9da04d595f)
2016-10-18 15:10:59 -07:00
Tao Bao 69c117c2ff resolve merge conflicts of e89bf25 to stage-aosp-master
Change-Id: I3b0ddb23daf264d407370cd8ace31eceb230a11a
2016-10-18 15:08:07 -07:00
Tao Bao e89bf257a1 Merge "Create bootloader_message static library." 2016-10-18 21:48:23 +00:00
Tianjie Xu 8176cf232e resolve merge conflicts of 6fba98c to stage-aosp-master
Change-Id: I2fa8b85109309ec88c1f8d8def593aa65ab885d7
2016-10-18 21:31:04 +00:00
Tianjie Xu 984d7d058e Fix applypatch_check failure when applying update on angler
Applypatch_check should be skipped if no sha is specified. As the
comments said: "It's okay to specify no sha1s; the check will pass if
the LoadFileContents is successful. Useful for reading partitions,
where the filename encodes the sha1s."

Test: The update package applied on angler successfully.
Bug: 32243751
Change-Id: Ib8f3dadf19f745c2dbd350d60da46ab12d75bc87
2016-10-18 21:22:48 +00:00
Yabin Cui 8b309f6970 Create bootloader_message static library.
bootloader_messages merges bootloader_message_writer
and bootloader.cpp, so we can use the same library to
manage bootloader_message in normal boot and recovery mode.

Bug: 29582118

Change-Id: I9efdf776ef8f02b53911ff43a518e035e0c29618
(cherry picked from commit 2f272c0551)
2016-10-18 11:37:05 -07:00
Tianjie Xu 6fba98ce64 Merge "Replace minzip with libziparchive" 2016-10-18 17:30:02 +00:00
Tianjie Xu 8cf5c8f60f Replace minzip with libziparchive
Clean up the duplicated codes that handle the zip files in
bootable/recovery; and rename the library of the remaining
utility functions to libotautil.

Test: Update package installed successfully on angler.
Bug: 19472796

Change-Id: Iea8962fcf3004473cb0322b6bb3a9ea3ca7f679e
2016-10-17 17:41:51 -07:00
Tianjie Xu 430b7ae469 Merge "Change StringValue to use std::string"
am: 2b17b24ae5

Change-Id: Ie3c7e6993848f53893e9079bb5cffa11d9c2a3f0
2016-10-18 00:15:29 +00:00
Treehugger Robot 2b17b24ae5 Merge "Change StringValue to use std::string" 2016-10-18 00:05:12 +00:00
Tao Bao 4de11bb370 Merge "init: move healthd to late-init"
am: a01ffc73ef

Change-Id: Iab786297c3dd19c61b11364d6fb49d52fcf007a4
2016-10-17 17:44:33 +00:00
Tao Bao a01ffc73ef Merge "init: move healthd to late-init" 2016-10-17 17:32:56 +00:00
Tianjie Xu aced5d9e4e Change StringValue to use std::string
Changing the field of 'Value' in edify to std::string from char*.
Meanwhile cleaning up the users of 'Value' and switching them to
cpp style.

Test: compontent tests passed.
Bug: 31713288

Change-Id: Iec5a7d601b1e4ca40935bf1c70d325dafecec235
2016-10-15 01:18:23 +00:00
Tao Bao ddf293aa0c resolve merge conflicts of 08d0ae9 to stage-aosp-master
Change-Id: I4d0cc04fd5853cabdd950691dfb2e7115cb1ff17
2016-10-14 15:51:00 -07:00
Treehugger Robot 08d0ae9254 Merge "Fix the prefix matching for uncrypt status." 2016-10-14 22:39:19 +00:00
Tao Bao ee9b95544a Fix the prefix matching for uncrypt status.
Also change its logging statement from PLOG to LOG, since
android::base::StartsWith() doesn't set errno.

Test: Build and reboot into recovery image. Check last_log.

Change-Id: I55ac7eec24228db76a13580958b4a4330b06cf57
2016-10-13 16:07:15 -07:00
Tao Bao 1b1a4edb4b Merge "edify: Some clean-ups to libedify." am: c5b4b71913 am: 039e9dc5ca
am: bd16939bbf

Change-Id: Ibbbe5b4b202263e4f3a5d3e802210baf81347708
2016-10-13 17:50:16 +00:00
Tao Bao bd16939bbf Merge "edify: Some clean-ups to libedify." am: c5b4b71913
am: 039e9dc5ca

Change-Id: I0188f978c2ef1497ffbad1c3e3125fa61d11ddf5
2016-10-13 17:38:14 +00:00
Tao Bao 039e9dc5ca Merge "edify: Some clean-ups to libedify."
am: c5b4b71913

Change-Id: I6ac4dfc514dfa917698268a999d8435987790302
2016-10-13 17:30:14 +00:00
Tao Bao c5b4b71913 Merge "edify: Some clean-ups to libedify." 2016-10-13 17:18:07 +00:00
Tao Bao 39119ad8ec edify: Some clean-ups to libedify.
- Remove dead declarations in expr.h: SetError(), GetError(),
  ClearError().
- Remove the declaration of Build() out of expr.h.
- Use std::unordered_map to implement RegisterFunction() and
  FindFunction(); kill FinishRegistration().
- Add a testcase for calling unknown functions.

Test: mmma bootable/recovery; recovery_component_test passes.
Change-Id: I9af6825ae677f92b22d716a4a5682f58522af03b
2016-10-12 23:29:59 -07:00
Tao Bao 998c6debca Merge "updater: Kill the duplicate PrintSha1() in install.cpp." am: 19bb05dfc7 am: 3ac1995cfd
am: aa9f017ceb

Change-Id: I713aa645bdff6ff6c73f28d15b46cd642e23d1a0
2016-10-12 19:42:24 +00:00
Tao Bao aa9f017ceb Merge "updater: Kill the duplicate PrintSha1() in install.cpp." am: 19bb05dfc7
am: 3ac1995cfd

Change-Id: I431110e967af930aaed0e684dc9b3b7c91a25c25
2016-10-12 19:34:54 +00:00
Tao Bao 3ac1995cfd Merge "updater: Kill the duplicate PrintSha1() in install.cpp."
am: 19bb05dfc7

Change-Id: I04198ff3cdfca583334eb532f83a6ecd0bfd0ad8
2016-10-12 19:28:24 +00:00
Tao Bao 19bb05dfc7 Merge "updater: Kill the duplicate PrintSha1() in install.cpp." 2016-10-12 19:22:16 +00:00
Tao Bao 40677619d2 Merge "Refactor libupdater into a seperate module." am: a7995d7581 am: f2cbf0fbe0
am: 44864a75ed

Change-Id: I14f5e027f8905163100d4d5bd25855544aae787d
2016-10-11 03:55:10 +00:00
Tao Bao 3a01338332 Refactor libupdater into a seperate module. am: 0c7839ac14 am: cf1dbfa854
am: 8ff7cd20ba

Change-Id: I421800ada6015970dae038ecd58c1d985f8b4b8f
2016-10-11 03:55:00 +00:00
Tao Bao 44864a75ed Merge "Refactor libupdater into a seperate module." am: a7995d7581
am: f2cbf0fbe0

Change-Id: I0123851b44800e34b12e428df79259d656f960df
2016-10-11 03:49:42 +00:00
Tao Bao 8ff7cd20ba Refactor libupdater into a seperate module. am: 0c7839ac14
am: cf1dbfa854

Change-Id: Ifb2c199bc32e164e5bd53f3910a35801237c4ef3
2016-10-11 03:49:30 +00:00
Tao Bao f2cbf0fbe0 Merge "Refactor libupdater into a seperate module."
am: a7995d7581

Change-Id: Ie3b643513c44abfc2a42f5544638057a903a5070
2016-10-11 03:44:01 +00:00
Tao Bao cf1dbfa854 Refactor libupdater into a seperate module.
am: 0c7839ac14

Change-Id: I5ff4c438daa6df248cee38b62251c78baac67a76
2016-10-11 03:44:00 +00:00