Commit graph

3364 commits

Author SHA1 Message Date
Tao Bao
146f92ab3e Merge "updater: Refactor set_stage() and get_stage() functions."
am: c627cd6486

Change-Id: Ie4ff6fa512c875c6be65b02908eadb498d3f9644
2016-11-20 05:09:49 +00:00
Tao Bao
9f4d385704 Merge "update_verifier: Sync Android.mk with aosp-master." into stage-aosp-master
am: ad57e2ca2c

Change-Id: I5ad7c0763284e32952c9b7953e526ec2d8e1aed9
2016-11-20 05:09:49 +00:00
Tao Bao
ca64fa7bb9 update_verifier: Sync Android.mk with aosp-master.
am: 5422d80961

Change-Id: Iac281a5f7a1a771282cdbf4503fe7e0991073624
2016-11-20 05:09:48 +00:00
Tao Bao
ad57e2ca2c Merge "update_verifier: Sync Android.mk with aosp-master." into stage-aosp-master 2016-11-20 05:06:00 +00:00
Tao Bao
c627cd6486 Merge "updater: Refactor set_stage() and get_stage() functions." 2016-11-20 05:04:54 +00:00
Tao Bao
009455b313 bootloader_message: Remove the no-op blank line. am: fbde508ace
am: 52b4d869b0

Change-Id: I1586aae053d9c9b503c55e5e1122bb6c37aacc21
2016-11-19 18:19:08 +00:00
Tao Bao
52b4d869b0 bootloader_message: Remove the no-op blank line.
am: fbde508ace

Change-Id: Ia3f298ef61fbeed0a80b8d85366ee27358a3320f
2016-11-19 18:15:08 +00:00
Tao Bao
fbde508ace bootloader_message: Remove the no-op blank line.
This single blank line was introduced by some cherry-pick, which is
causing merge conflicts.

Test: N/A
Change-Id: Ida527b76fca7cc916499c5f888476c8e51ba3eaa
2016-11-18 16:00:23 -08:00
Tao Bao
5422d80961 update_verifier: Sync Android.mk with aosp-master.
It's out of sync due to the cherry-pick in commit
d007cf2da2.

Test: mmma bootable/recovery
Change-Id: I286fe89c4c7d09de3a06d09f9a2b0cdecef326f5
2016-11-18 15:10:01 -08:00
Connor O'Brien
7ad875cc81 Merge "Revert "Convert update_verifier to boot HIDL HAL"" into nyc-mr1-dev-plus-aosp
am: 692e95aa87

Change-Id: Ic30a3fb13abda71cd6317760f41058728ead4cf0
2016-11-18 20:52:13 +00:00
Connor O'Brien
7d17f64275 Revert "Convert update_verifier to boot HIDL HAL"
am: 7206ec7a1d

Change-Id: Id9fa374c3f979f39fb32a1d82c9e2d18e38b0efa
2016-11-18 20:52:12 +00:00
Connor O'Brien
692e95aa87 Merge "Revert "Convert update_verifier to boot HIDL HAL"" into nyc-mr1-dev-plus-aosp 2016-11-18 20:48:09 +00:00
Connor O'Brien
1d5bf16cf0 Merge "Revert "Convert update_verifier to boot HIDL HAL"" am: fc6e8cae9c -s ours am: 6fd51ffdaa
am: b5cf492040

Change-Id: I8aca5c87a0786cc897a4a674f10952a60d816ca3
2016-11-18 20:45:43 +00:00
Connor O'Brien
b5cf492040 Merge "Revert "Convert update_verifier to boot HIDL HAL"" am: fc6e8cae9c -s ours
am: 6fd51ffdaa

Change-Id: I5db9f43be5c7fb6375dc8f0b1964796112a7eef1
2016-11-18 20:42:41 +00:00
Connor O'Brien
6fd51ffdaa Merge "Revert "Convert update_verifier to boot HIDL HAL""
am: fc6e8cae9c  -s ours

Change-Id: I767f58a16ec318d760c64782a2215e0bac60a283
2016-11-18 20:39:42 +00:00
Connor O'Brien
fc6e8cae9c Merge "Revert "Convert update_verifier to boot HIDL HAL"" 2016-11-18 20:24:58 +00:00
Connor O'Brien
7206ec7a1d Revert "Convert update_verifier to boot HIDL HAL"
This reverts commit 86199a47e1.

Bug: 32973182
Change-Id: If3eab18cc2e810446da447fadfd0fb44c02b771b
2016-11-18 20:18:27 +00:00
Connor O'Brien
30628db65c Revert "Convert update_verifier to boot HIDL HAL"
This reverts commit f50593c447.

Bug: 32973182
Change-Id: I5b14a812671ea02575cb452242ff1a6f05edb9c1
2016-11-18 20:16:53 +00:00
Tao Bao
bedf5fc11c updater: Refactor set_stage() and get_stage() functions.
Add read_bootloader_message_from() and write_bootloader_message_to() to
allow specifying the BCB device (/misc).

Also add testcases for set_stage() and get_stage().

Test: recovery_component_test passes.
Test: Build a recovery image and apply a two-step OTA package.
Change-Id: If5ab06a1aaaea168d2a9e5dd63c07c0a3190e4ae
2016-11-18 12:04:48 -08:00
Tao Bao
1ae9f22d6e Merge "updater: Add testcase for package_extract_dir()." am: 23e785935e am: d109c788ad
am: 9b1a791e3c

Change-Id: Ifdd250d55ad59887d92591858a820dc5e36d141b
2016-11-18 17:52:00 +00:00
Tao Bao
9b1a791e3c Merge "updater: Add testcase for package_extract_dir()." am: 23e785935e
am: d109c788ad

Change-Id: Ia682f518ef8f2a651d0ecbef37a87b52d40a0f35
2016-11-18 17:49:00 +00:00
Tao Bao
d109c788ad Merge "updater: Add testcase for package_extract_dir()."
am: 23e785935e

Change-Id: I9827d196b8cccd138e244a1aad64202baa1dd600
2016-11-18 17:45:58 +00:00
Tao Bao
23e785935e Merge "updater: Add testcase for package_extract_dir()." 2016-11-18 17:40:40 +00:00
Tao Bao
1036d36542 updater: Add testcase for package_extract_dir().
Test: recovery_component_test passes.
Change-Id: I3af4707bc42c7331ca961be8b967a53de82ea25b
2016-11-17 23:02:13 -08:00
Tao Bao
1bf1772625 DO NOT MERGE updater: Add "write_value()" function.
write_value(value, filename) writes 'value' to 'filename'. It can be
used to tune device settings when applying an OTA package. For example,
write_value("960000", "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq").

Bug: 32463933
Test: recovery_component_test passes.
Test: Apply an OTA package that contains a call to write_value(), and
      check the result.

Change-Id: Ib009ecb8a45a94353f10c59e2383fe1f49796e35
(cherry picked from commit d0f3088aa9)
2016-11-17 21:30:32 -08:00
Tao Bao
7028ab255f Merge "applypatch: Use unique_fd to avoid leaking FDs." am: 2e5cf3c0bc am: d2cd8b4d30
am: 776ea9b464

Change-Id: I97cf01e270fab31e0859b8fce5a1889d9ae3d2c3
2016-11-18 02:15:41 +00:00
Tao Bao
776ea9b464 Merge "applypatch: Use unique_fd to avoid leaking FDs." am: 2e5cf3c0bc
am: d2cd8b4d30

Change-Id: I57228be65dfc37f853c3902ad8c5f65c0e3f1018
2016-11-18 02:12:43 +00:00
Tao Bao
d2cd8b4d30 Merge "applypatch: Use unique_fd to avoid leaking FDs."
am: 2e5cf3c0bc

Change-Id: I4e4cabf7b58a691236ea193f5b11962b2bb740bd
2016-11-18 02:10:12 +00:00
Tao Bao
2e5cf3c0bc Merge "applypatch: Use unique_fd to avoid leaking FDs." 2016-11-18 02:02:43 +00:00
Tao Bao
1906efab60 Merge "updater: Add "write_value()" function." am: d00046b691 am: 100dba35f9
am: 29dc892c07

Change-Id: Id1c8869ef4e8efe47159d22341888bcd41b78f66
2016-11-18 01:12:14 +00:00
Tao Bao
29dc892c07 Merge "updater: Add "write_value()" function." am: d00046b691
am: 100dba35f9

Change-Id: I00b0dfd4856e0b20fae778389cfd6e4e220d4d0d
2016-11-18 00:57:14 +00:00
Tao Bao
100dba35f9 Merge "updater: Add "write_value()" function."
am: d00046b691

Change-Id: I016c1e2fda1fd0d2e85d07c79f36c27f3c8a8a22
2016-11-18 00:42:42 +00:00
Tao Bao
d00046b691 Merge "updater: Add "write_value()" function." 2016-11-18 00:16:41 +00:00
Tao Bao
d065686007 Merge "applypatch: Clean up LoadPartitionContents()." am: c6ee8cf8df am: 9e4ba70b7f
am: c43acc9938

Change-Id: I8d99f72d4d9a7bbed80537ced27f3481ad69ceff
2016-11-17 20:31:08 +00:00
Tao Bao
c43acc9938 Merge "applypatch: Clean up LoadPartitionContents()." am: c6ee8cf8df
am: 9e4ba70b7f

Change-Id: I18284f42cda54ef23dee4f2615083733c50fe493
2016-11-17 20:22:39 +00:00
Connor O'Brien
80d0044fb0 Merge "Convert update_verifier to boot HIDL HAL" am: 5b171d30ab -s ours am: b9d1cd7713 -s ours
am: 97f6af8d34  -s ours

Change-Id: I6f7657c8cde63cff8859e8ef3e07891751571849
2016-11-17 20:22:24 +00:00
Tao Bao
9e4ba70b7f Merge "applypatch: Clean up LoadPartitionContents()."
am: c6ee8cf8df

Change-Id: I2c20eb8b2c8f5bba40e71f6b267152f3bfab0316
2016-11-17 20:14:40 +00:00
Connor O'Brien
97f6af8d34 Merge "Convert update_verifier to boot HIDL HAL" am: 5b171d30ab -s ours
am: b9d1cd7713  -s ours

Change-Id: Ibce6da9d3d3cbf74d4754a629f2f6fe832fc2982
2016-11-17 20:14:21 +00:00
Tao Bao
c6ee8cf8df Merge "applypatch: Clean up LoadPartitionContents()." 2016-11-17 20:06:57 +00:00
Connor O'Brien
b9d1cd7713 Merge "Convert update_verifier to boot HIDL HAL"
am: 5b171d30ab  -s ours

Change-Id: I30f99aae371bf51c161c482e53c3032d321fb53a
2016-11-17 20:05:51 +00:00
Tao Bao
6e02ea92ec applypatch: Use unique_fd to avoid leaking FDs.
Add unique_fd that calls ota_close() instead of the default closer.

Test: recovery_component_test passes.
Test: Apply a package that calls apply_patch().

Change-Id: I0c19921731757934f76cf7d5215916673a8f2777
2016-11-17 12:01:44 -08:00
Connor O'Brien
5b171d30ab Merge "Convert update_verifier to boot HIDL HAL" 2016-11-17 19:07:21 +00:00
Tao Bao
8fce75a069 applypatch: Clean up LoadPartitionContents().
We don't need three vectors to sort the (size, SHA-1) pairs.

Test: recovery_component_test passes.
Test: Apply a package that calls apply_patch_check() to patch EMMC
      partitions.
Change-Id: I4a6620630a6711f490822cf30f1e7fe5cea6ce49
2016-11-17 00:02:52 -08:00
Connor O'Brien
e1a0adc2b5 Convert update_verifier to boot HIDL HAL
am: 86199a47e1

Change-Id: Iac542175e8662a1795aa50e9e67b9acf301b760b
2016-11-17 02:58:36 +00:00
Connor O'Brien
86199a47e1 Convert update_verifier to boot HIDL HAL
Test: Flashed device and confirmed update_verifier runs successfully
Change-Id: I5bce4ece1e3ba98f57299c9cf469a5e2a5226ff2
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-11-16 16:43:32 -08:00
Tao Bao
d0f3088aa9 updater: Add "write_value()" function.
write_value(value, filename) writes 'value' to 'filename'. It can be
used to tune device settings when applying an OTA package. For example,
write_value("960000", "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq").

Bug: 32463933
Test: recovery_component_test passes.
Test: Apply an OTA package that contains a call to write_value(), and
      check the result.

Change-Id: Ib009ecb8a45a94353f10c59e2383fe1f49796e35
2016-11-16 15:51:53 -08:00
Rahul Chaudhry
8ef4c38abe Merge "Remove unnecessary uses of reinterpret_cast." am: c470dc8681 am: 849a911dee
am: 6a6e54da04

Change-Id: Ia0783f4d936d844284cf488481318e8b96133066
2016-11-16 21:52:26 +00:00
Rahul Chaudhry
6a6e54da04 Merge "Remove unnecessary uses of reinterpret_cast." am: c470dc8681
am: 849a911dee

Change-Id: Ia7ef00388123d70cc01cfcb499120096cf103983
2016-11-16 21:45:03 +00:00
Rahul Chaudhry
849a911dee Merge "Remove unnecessary uses of reinterpret_cast."
am: c470dc8681

Change-Id: I44081a387bfc60ce9f9cacf5b8db0b9248c84c4d
2016-11-16 21:37:25 +00:00
Treehugger Robot
c470dc8681 Merge "Remove unnecessary uses of reinterpret_cast." 2016-11-16 21:27:32 +00:00