Commit Graph

2543 Commits

Author SHA1 Message Date
Tianjie Xu fc887a8fba Merge "Report uncrypt errors in details" am: af8b9363c6
am: 7582609d61

Change-Id: Idbaf422f605c690fe2f2ea120d10e4e37342b5e9
2016-09-27 21:22:26 +00:00
Tianjie Xu 7582609d61 Merge "Report uncrypt errors in details"
am: af8b9363c6

Change-Id: I5790f1c3ce902edf7bf9025e445b043c93036a30
2016-09-27 21:19:56 +00:00
Treehugger Robot af8b9363c6 Merge "Report uncrypt errors in details" 2016-09-27 21:11:06 +00:00
Tianjie Xu da44cf18f3 Report uncrypt errors in details
Add the error codes for uncrypt and report the failure details in
uncrypt_status.

Test: uncrypt_error logs correctly in last_install
Bug: 31603820
Change-Id: I8e0de845ce1707b6f8f5ae84564c5e93fd5f5ef5
2016-09-26 22:48:45 -07:00
Tao Bao c064b01898 Merge "Duplicate the last_install content into last_log." am: 95afc912fb
am: 5ac819a51f

Change-Id: I9449ecabc6b367fe71244fc8751993d89e2b1dc7
2016-09-27 01:45:20 +00:00
Tao Bao bfee61bf28 Duplicate the last_install content into last_log. am: f4885adc18
am: 87f4edf467

Change-Id: I7c28f25f07d0f1c1df41e771c28baaa813b0a44a
2016-09-27 01:45:12 +00:00
Tao Bao 5ac819a51f Merge "Duplicate the last_install content into last_log."
am: 95afc912fb

Change-Id: Ib3838e9d2f3d6a9a15872e9a5163bf140ff2f3d5
2016-09-27 01:43:42 +00:00
Tao Bao 87f4edf467 Duplicate the last_install content into last_log.
am: f4885adc18

Change-Id: I8f197d09af405254a0b07f0ace4e5149736ca0ad
2016-09-27 01:43:41 +00:00
Tao Bao 95afc912fb Merge "Duplicate the last_install content into last_log." 2016-09-27 01:38:53 +00:00
Tao Bao f4885adc18 Duplicate the last_install content into last_log.
Currently we save the OTA metrics in last_install, which keeps the data
for the _last_ install only. This CL logs the same content into last_log
so that we keep the metrics for every install.

Bug: 31607469
Test: Apply an update (via OTA and sideload) and check last_log and last_install.

Change-Id: Id8f174d79534fddc9f06d72a4e69b2b1d8ab186c
2016-09-26 14:46:12 -07:00
Elliott Hughes d5c7d6bffe Merge "Switch to <android-base/properties.h>." am: cc02f9652f
am: be9a94fd17

Change-Id: Ib5e4fb8d20e04df7b592af96d898afbbc6846620
2016-09-26 19:42:16 +00:00
Elliott Hughes be9a94fd17 Merge "Switch to <android-base/properties.h>."
am: cc02f9652f

Change-Id: I5f0d55f980055cee3c7ae477d1bdbd1d05b97dc1
2016-09-26 19:40:28 +00:00
Elliott Hughes cc02f9652f Merge "Switch to <android-base/properties.h>." 2016-09-26 19:32:48 +00:00
Elliott Hughes cb22040c63 Switch to <android-base/properties.h>.
Bug: http://b/23102347
Test: boot into recovery.
Change-Id: Ib2ca560f1312961c21fbaa294bb068de19cb883e
Merged-In: Ib2ca560f1312961c21fbaa294bb068de19cb883e
2016-09-26 09:51:37 -07:00
Tianjie Xu 1d55666106 Merge "Check corruption when reading uncrypt_status file" am: 3cf815a6a9
am: 40bae5e1c6

Change-Id: I098148f53065e7420e500db66f1ada0d0730a0d6
2016-09-13 22:28:32 +00:00
Tianjie Xu 40bae5e1c6 Merge "Check corruption when reading uncrypt_status file"
am: 3cf815a6a9

Change-Id: Ic7404abd3026a8faffaac14a20c90ebf2ef10106
2016-09-13 22:26:03 +00:00
Treehugger Robot 3cf815a6a9 Merge "Check corruption when reading uncrypt_status file" 2016-09-13 22:20:04 +00:00
Tianjie Xu 1c1864f321 Check corruption when reading uncrypt_status file
Bug: 31383361
Change-Id: I0de920916da213528d73b742e4823b4a98c63ea1
2016-09-13 13:56:00 -07:00
Tianjie Xu 86ea1724ae Merge "save uncrypt status to last_install" am: cdf509cce2
am: 6048138e10

Change-Id: I6fa2612bc1ea1fc706a5ded855c9296b4e794009
2016-09-12 23:03:58 +00:00
Tianjie Xu 6048138e10 Merge "save uncrypt status to last_install"
am: cdf509cce2

Change-Id: I4ef51a1d2c75f42c31f419e68ed616838a3f8ead
2016-09-12 23:01:28 +00:00
Tianjie Xu cdf509cce2 Merge "save uncrypt status to last_install" 2016-09-12 22:56:31 +00:00
Tianjie Xu fe16b5ccaf save uncrypt status to last_install
Save the uncrypt time cost to /cache/recovery/uncrypt_status. Recovery
reads the file and saves its contents to last_install.

Bug: 31383361
Test: Tested on angler and uncrypt_time reports correctly.

Change-Id: I5cd3f7b6ca069d69086d09acfea8fc4f1215c833
Merged-In: I5cd3f7b6ca069d69086d09acfea8fc4f1215c833
2016-09-12 22:55:36 +00:00
Tianjie Xu ec6a47ae46 Merge "Switch recovery to libbase logging" am: 61590bbf0d
am: c5becf0ef8

Change-Id: I4c856d31d30173e2a97edbe3ecaa14cb7279c567
2016-09-01 23:14:58 +00:00
Tianjie Xu c5becf0ef8 Merge "Switch recovery to libbase logging"
am: 61590bbf0d

Change-Id: I246ff0e75b0610abeedf21d3c3b1a9849a68856b
2016-09-01 23:12:01 +00:00
Tianjie Xu 61590bbf0d Merge "Switch recovery to libbase logging" 2016-09-01 23:04:37 +00:00
Tianjie Xu 7b0ad9c638 Switch recovery to libbase logging
Clean up the recovery image and switch to libbase logging.

Bug: 28191554
Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35
Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35
2016-09-01 18:33:25 +00:00
Tianjie Xu 0ae9d80082 Merge "Check an edge case when read(2) returns 0" am: 3202b8faf4
am: 852ae8d0fb

Change-Id: I1ff21b583748136119ee98137c13fa3ee7a0ecc7
2016-09-01 17:55:08 +00:00
Tianjie Xu 852ae8d0fb Merge "Check an edge case when read(2) returns 0"
am: 3202b8faf4

Change-Id: I7d748b9f13c0f03f195f943cb3f5afa57c80296e
2016-09-01 17:52:10 +00:00
Treehugger Robot 3202b8faf4 Merge "Check an edge case when read(2) returns 0" 2016-09-01 17:48:39 +00:00
Tianjie Xu 71e182bc38 Check an edge case when read(2) returns 0
We might end up in an infinite loop if read(2) reached EOF unexpectedly.
The problematic code in uncrypt mentioned in the bug has been fixed
by switching to libbase ReadFully(). So I grepped through the recovery
code and fixed some other occurences of the issue.

Bug: 31073201
Change-Id: Ib867029158ba23363b8f85d61c25058a635c5a6b
2016-08-31 19:11:41 -07:00
Josh Gao a331d85806 Merge "minadbd: rename adb_server_main to minadbd_main." am: 818394869d
am: aad4cef0f3

Change-Id: I6ef1ef45fd598e12629a5bb5a28e9dca74e954fe
2016-08-30 20:30:37 +00:00
Josh Gao aad4cef0f3 Merge "minadbd: rename adb_server_main to minadbd_main."
am: 818394869d

Change-Id: I7a8fe351a8bfa0b7bdc48c89d56647a98018af51
2016-08-30 20:27:39 +00:00
Josh Gao 818394869d Merge "minadbd: rename adb_server_main to minadbd_main." 2016-08-30 20:17:27 +00:00
Josh Gao acb2a2fa4c minadbd: rename adb_server_main to minadbd_main.
adb_server_main in adb refers to the adb server on the host, not adbd.
Since there doesn't seem to be a good reason to reuse the declaration
from adb's headers, give minadbd a main function of its own.

Change-Id: I748f1a6822dc14c726cb73ef3b533c57a6615608
2016-08-30 13:15:12 -07:00
Chih-Hung Hsieh d987fe1d57 Merge "Fix clang-tidy warnings in bootable/recovery." am: 89bf2bdc85
am: 9968866e86

Change-Id: Id888e91546d18d5ed0054e1fbac2823a6e31c6a1
2016-08-26 23:44:33 +00:00
Chih-Hung Hsieh 9968866e86 Merge "Fix clang-tidy warnings in bootable/recovery."
am: 89bf2bdc85

Change-Id: I7748981badcbcdfe24d0cbe1c41007c67f611b14
2016-08-26 23:42:05 +00:00
Treehugger Robot 89bf2bdc85 Merge "Fix clang-tidy warnings in bootable/recovery." 2016-08-26 23:29:23 +00:00
Chih-Hung Hsieh 8b23811d2a Fix clang-tidy warnings in bootable/recovery.
* Use const reference type for read-only parameters.
Bug: 30407689
* Use faster overloaded string find function.
Bug: 30411878
* Add parentheses around macro parameters.
Bug: 28705665

Test: build with WITH_TIDY=1
Change-Id: I4e8e5748bfa4ae89871f1fb5fa4624d372530d75
2016-08-26 14:54:29 -07:00
Tao Bao 7f8dc846a3 Merge "Free mmaped area if keys fail to load" am: f599414aec
am: b3ddc0a4bf

Change-Id: I204d7fedd2f950da41c3a481231c459fc32d0056
2016-08-18 06:17:13 +00:00
Tao Bao b3ddc0a4bf Merge "Free mmaped area if keys fail to load"
am: f599414aec

Change-Id: Id96153c211ca1fcc1cd78d6e662b0b48795c0d76
2016-08-18 06:14:46 +00:00
Tao Bao f599414aec Merge "Free mmaped area if keys fail to load" 2016-08-18 06:10:35 +00:00
WiZarD edafac6c7b Free mmaped area if keys fail to load
Keys for package verification is loaded after the update
package is mmaped into memory. This mmaped area needs
to be freed when exiting the function.

Another approach would be to mmap after loading the keys.

Change-Id: Ib77711a8acd5c363b5517da12dc311fb8f9f4605
Signed-off-by: WiZarD <WiZarD.Devel@gmail.com>
2016-08-18 05:20:40 +00:00
Tianjie Xu e254b4e9e4 Merge ""view recovery logs" will show /tmp/recovery.log" am: c158cf0a14
am: 4e4474c9c5

Change-Id: Iaca861be960a271c09c07deeaf4f98850edc4f71
2016-08-17 22:10:12 +00:00
Tianjie Xu 4e4474c9c5 Merge ""view recovery logs" will show /tmp/recovery.log"
am: c158cf0a14

Change-Id: I1485c1c84a7caa20b11da4fd2561e0dba95fc39b
2016-08-17 22:07:44 +00:00
Tianjie Xu c158cf0a14 Merge ""view recovery logs" will show /tmp/recovery.log" 2016-08-17 22:05:16 +00:00
Tianjie Xu a54f75ede8 "view recovery logs" will show /tmp/recovery.log
For A/B devices, "view recovery logs" doesn't work due to the lack
of cache partition. To help debugging, we'll show /tmp/recovery.log
instead if /cache is not found.

Change-Id: Idb77c3a4c30388148a210b38d732a7b27e757bba
Test: Tested on an A/B device and /tmp/recovery.log showed up.
Bug: 30905700
2016-08-17 12:35:22 -07:00
Johan Harvyl d7865e81f1 Merge "Format formattable partitions if mount fails" am: cb76857147
am: 2f5cfdbb9d

Change-Id: I7c0848776028caf766f33895a010349ccabf13bf
2016-08-15 18:07:35 +00:00
Johan Harvyl 2f5cfdbb9d Merge "Format formattable partitions if mount fails"
am: cb76857147

Change-Id: I50c2045f56693e445922d30af72867e7ac55b61f
2016-08-15 18:03:37 +00:00
Treehugger Robot cb76857147 Merge "Format formattable partitions if mount fails" 2016-08-15 17:53:54 +00:00
Josh Gao d7067c7fea Merge "adb headers now refer to openssl headers." am: e4cf854dbf
am: c687a72d9f

Change-Id: I03330b8b93d9ac0262c2556018720689035b8d8f
2016-08-12 21:25:18 +00:00