Commit Graph

6558 Commits

Author SHA1 Message Date
Tianjie Xu a47f985edd Merge "Add a python binary to generate the protobuf for care_map" am: fae0881528
am: 0901a08fc2

Change-Id: I4e8671c015abbc6699b2903187630784d30639ad
2018-08-16 20:37:50 -07:00
Tao Bao 6ebca741fb Merge "ui: Only set brightness when needed." am: cf01f7dcbe
am: d03842982f

Change-Id: I3e0786705df73af571b24b70c93fe90859f72a14
2018-08-16 20:34:28 -07:00
Tao Bao b46691b03d Merge "updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}." am: d460afe963
am: 559d01ff16

Change-Id: Ief7dbd3f6e360a55068ca6ab9caa95d1364f3f91
2018-08-16 20:22:42 -07:00
Tianjie Xu 0901a08fc2 Merge "Add a python binary to generate the protobuf for care_map"
am: fae0881528

Change-Id: I259dcf3ba7d3840436d96640e91a00cf9be0fdf3
2018-08-16 17:52:05 -07:00
Tao Bao d03842982f Merge "ui: Only set brightness when needed."
am: cf01f7dcbe

Change-Id: If9747c9fdb2822cacad87828ad627b72742e9aff
2018-08-16 17:44:47 -07:00
Tao Bao 559d01ff16 Merge "updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}."
am: d460afe963

Change-Id: Ib3798641e976658e8288150a2d3fea80d415ed33
2018-08-16 17:28:16 -07:00
Tianjie Xu fae0881528 Merge "Add a python binary to generate the protobuf for care_map" 2018-08-17 00:02:24 +00:00
Tianjie Xu 7e520d24fe Add a python binary to generate the protobuf for care_map
This binary parses the legacy care_map text in the input file and writes
the generated protobuf message into the output file. For test purpose,
it also has a "--parse_proto" option to reverse the process and convert
a protobuf message file into plain text.

The build script will then call the binary to generate the care_map.txt
in the new format.

Bug: 77867897
Test: Run the binary to convert a care_map.txt, run update_verifier
Change-Id: I3ca65e19027404806132aa8d51e9bff766630c99
2018-08-16 15:09:32 -07:00
Tao Bao cf01f7dcbe Merge "ui: Only set brightness when needed." 2018-08-16 20:10:26 +00:00
Tao Bao d460afe963 Merge "updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}." 2018-08-16 19:26:37 +00:00
Tao Bao 53be332711 ui: Only set brightness when needed.
There is a regression due to recent change in commit
b76af93ab5, where it started to set
brightness to normal on every key input. This is unneeded and spamming
the recovery log.

Test: Run recovery_unit_test on marlin.
Test: Built and boot into recovery image. Press a few keys, then check
      the recovery log.
Change-Id: Ia3a7ea400bcccdebbb27a6a7586e435bfb915923
2018-08-16 11:54:01 -07:00
Tao Bao 3c8927390e updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}.
Bug: 112151972
Test: Run recovery_unit_test on marlin.
Change-Id: Ica2a7b3c768f5d8ca5d591a9560bca9f8ed847c5
2018-08-16 11:09:35 -07:00
Tao Bao 7bcfe850d2 Merge "tests: Add the missing tests in applypatch_modes_test.cpp." am: f83d9f6b71
am: d9067aed88

Change-Id: Ic7fd58ba2c75f4eb4b58df0df2c3b71d94aadd18
2018-08-15 19:13:08 -07:00
Tao Bao 83f035df3e Merge "Fixing the Mac SDK build" am: 0b66e96da5
am: f13b38ca72

Change-Id: I9fa0b4de3364cccfff80943f8b191dd2c225d525
2018-08-15 19:12:52 -07:00
Tao Bao d9067aed88 Merge "tests: Add the missing tests in applypatch_modes_test.cpp."
am: f83d9f6b71

Change-Id: I3ab7b006384ee1fda877a5edb1c3f5af42722dff
2018-08-15 18:44:51 -07:00
Tao Bao f13b38ca72 Merge "Fixing the Mac SDK build"
am: 0b66e96da5

Change-Id: I2979bf2260a5e254b6247061baa01d1ae8eb1e9e
2018-08-15 18:44:36 -07:00
Tao Bao f83d9f6b71 Merge "tests: Add the missing tests in applypatch_modes_test.cpp." 2018-08-16 01:16:57 +00:00
Tao Bao 0b66e96da5 Merge "Fixing the Mac SDK build" 2018-08-16 01:10:49 +00:00
Tianjie Xu 2c2c032967 Merge "Further compress the recovery animation file" am: c8e0292b61
am: 5c1b333bde

Change-Id: I97430342f56eba6dc0fa860f8c0fa5725e5ec763
2018-08-15 17:06:53 -07:00
Tianjie Xu 5c1b333bde Merge "Further compress the recovery animation file"
am: c8e0292b61

Change-Id: I3776285237eb48cb72619117b7a9414b34eee0e0
2018-08-15 16:43:00 -07:00
Andreas Huber 435dfac15c Fixing the Mac SDK build
recovery_host_test is now excluded from darwin targets as its
dependency libimgdiff is.

Change-Id: I6aa085125109ed2218572df97f35289b71c354ab
2018-08-15 16:11:25 -07:00
Tao Bao 26b645447f tests: Add the missing tests in applypatch_modes_test.cpp.
This file was somehow missed when converting from Android.mk to
Android.bp. This CL addresses the issue by picking up all the .cpp files
in the test source dir.

Test: Run recovery_{unit,component}_test on marlin. Check the reported
      number of tests (94 for unit test and 157 for component test).
Change-Id: I50435b07fcb8602ef7b3f7e7d3a69e10b6a5932d
2018-08-15 15:34:46 -07:00
Tianjie Xu c8e0292b61 Merge "Further compress the recovery animation file" 2018-08-15 22:30:55 +00:00
Tianjie Xu e45f359e9c Further compress the recovery animation file
The res/images/loop.*png can be further compressed with "pngquant
--quality 0-10"; and the difference is not noticeable to humans
under recovery. And This reduces the animation pictures under res-xxxhdpi
from 2.7M to 1.2M.

Note that the *_text.png files can't be compressed this way because they
requires lossless compression to keep the embedded locales intact.

Bug: 112494634
Test: Run recovery graphic tests.
Change-Id: I2cefaea8e037cb09cb4e4735d1b86e82da9e6875
2018-08-15 19:07:08 +00:00
Tao Bao 6a9fb19b0f Merge "tests: Move to Android.bp." am: b1ff1bc43b
am: 6956957499

Change-Id: Ib3861fa4d73cc5c07c2c866efc2a06d38678e89e
2018-08-15 11:08:00 -07:00
Tao Bao 6956957499 Merge "tests: Move to Android.bp."
am: b1ff1bc43b

Change-Id: I3d964a6f4d60b031209a02625b2fdee5d2c75a6b
2018-08-15 11:04:59 -07:00
Tao Bao b1ff1bc43b Merge "tests: Move to Android.bp." 2018-08-15 17:56:19 +00:00
Tao Bao ddcb99b801 Merge "Track the change to update_engine_sideload path." am: 97de9c3d3e
am: 07c78fe446

Change-Id: I4b0658d1fb7680bac5f48929146b753c14713974
2018-08-15 02:24:44 -07:00
Tao Bao 07c78fe446 Merge "Track the change to update_engine_sideload path."
am: 97de9c3d3e

Change-Id: I7b16e7b90ad473581216dda7f991245d7a71525d
2018-08-14 22:25:44 -07:00
Tao Bao ef5e38fef0 tests: Move to Android.bp.
Also separate libupdater_defaults out to be shareable.

It turns out the `data` property in `cc_test` doesn't follow symlinks as
LOCAL_TEST_DATA does in Android.mk. This CL creates a filegroup in
top-level Android.bp in order to pick up the testdata for ResourcesTest.

Test: `mmma -j bootable/recovery` with aosp_marlin-userdebug
Test: Run recovery_{unit,component,manual}_test on marlin.
Test: Run recovery_host_test.
Change-Id: I4532ab25aeb83c0b0baa8051d5fe34ba7b910a35
2018-08-14 21:46:45 -07:00
Tao Bao 97de9c3d3e Merge "Track the change to update_engine_sideload path." 2018-08-15 01:46:31 +00:00
Hridya Valsaraju b51ba3c8fa Merge "Add fastboot mode to recovery" am: 19a5316412
am: b0851cf8c4

Change-Id: I5bfe707e176d742f6ab1bd86b7c5fb65ce4fdc33
2018-08-14 16:04:35 -07:00
Yifan Hong fa82f9c4e1 Merge "recovery uses IHealth::getService" am: ce2f0d85fb
am: c7c56f0e90

Change-Id: Ib96bc483a80a35a0b405c82cf623dfe7c2157ff4
2018-08-14 15:57:47 -07:00
Hridya Valsaraju b0851cf8c4 Merge "Add fastboot mode to recovery"
am: 19a5316412

Change-Id: I115017c90c8ee4a7b28a2742462d157585b1edaa
2018-08-14 15:55:00 -07:00
Yifan Hong c7c56f0e90 Merge "recovery uses IHealth::getService"
am: ce2f0d85fb

Change-Id: Ic22bf13545f1261f288dc47df9ee123913ad8028
2018-08-14 15:51:08 -07:00
Treehugger Robot 19a5316412 Merge "Add fastboot mode to recovery" 2018-08-14 21:25:50 +00:00
Yifan Hong ce2f0d85fb Merge "recovery uses IHealth::getService" 2018-08-14 21:06:58 +00:00
Tao Bao 2cc9bbb1ec Track the change to update_engine_sideload path.
Bug: 112494634
Test: Build and boot into recovery image on taimen. Verify that
      `Apply updates from ADB` keeps working.
Test: Run recovery_component_test on marlin.

Change-Id: I9ee8834053fda79a4fd77bfa83eab3cc51a90dff
2018-08-14 12:34:46 -07:00
Tao Bao 4862807054 Merge "updater: Move libupdater to Soong." am: c205dd9d43
am: d1386d8385

Change-Id: Ia5c3eb61af9cf7583dabb82c151867b26dee052f
2018-08-14 10:15:36 -07:00
Tao Bao 7a3f191964 Merge "recovery: Drop the dependency on libcrypto_utils.so and libsparse.so." am: 19d002d33f
am: 3eceebf7eb

Change-Id: I5385c97a363906d06dae4ec26f1b2c82ee78eeb9
2018-08-14 10:13:48 -07:00
Tao Bao d1386d8385 Merge "updater: Move libupdater to Soong."
am: c205dd9d43

Change-Id: I00ba7327c02eaae9e1d9262dc6b4ea03179e1e9f
2018-08-14 10:02:27 -07:00
Tao Bao 3eceebf7eb Merge "recovery: Drop the dependency on libcrypto_utils.so and libsparse.so."
am: 19d002d33f

Change-Id: Ied2c8510c24e8e1d698beefbc36a84bea26aa5aa
2018-08-14 10:01:43 -07:00
Tianjie Xu 2fa62f2c9c Merge "Add the hash_tree_info class in Command" am: c0195801dc
am: 9b64295f3e

Change-Id: Iefc9c9f99ced49e30152a0efd04e049124a320fb
2018-08-14 09:52:57 -07:00
Tianjie Xu 9b64295f3e Merge "Add the hash_tree_info class in Command"
am: c0195801dc

Change-Id: I32500b2045271d498d3a67b85e5ec0a51ac8da0c
2018-08-14 09:48:57 -07:00
Tao Bao c205dd9d43 Merge "updater: Move libupdater to Soong." 2018-08-14 16:43:15 +00:00
Tao Bao 19d002d33f Merge "recovery: Drop the dependency on libcrypto_utils.so and libsparse.so." 2018-08-14 16:42:37 +00:00
Tianjie Xu c0195801dc Merge "Add the hash_tree_info class in Command" 2018-08-14 16:33:10 +00:00
Tao Bao b0f132e244 recovery: Drop the dependency on libcrypto_utils.so and libsparse.so.
They're only needed in past when we statically linked libs that had
dependencies on them. Dropping them doesn't affect the recovery image
size, as there're still other users of the libs. But this would avoid
the false dependencies on them.

Test: `mmma -j bootable/recovery`
Change-Id: Ib43cc42221edde9efea1f12357cfc2f2232ec520
2018-08-13 23:02:17 -07:00
Hridya Valsaraju 20c81b308d Add fastboot mode to recovery
Add a fastboot mode to recovery that can be
entered with command line args or with the ui.

Add usb property triggers to switch between
fastboot and adb configurations.

Allow switching between fastboot and adb through
usb commands by opening a unix socket. adbd/fastbootd
writes to this socket, which interrupts the ui and
switches to the new mode.

Test: Use fastboot mode
Bug: 78793464
Change-Id: I7891bb84427ec734a21a872036629b95ab3fb13c
2018-08-13 21:18:18 -07:00
Tianjie Xu 8f64bf635f Add the hash_tree_info class in Command
Add hash_tree_info to represent the hash tree computation arguments in
the transfer commands 'compute_hash_tree'. Also add its parsing code in
the Command class.

Bug: 25170618
Test: unit tests pass
Change-Id: Ie8607968377968e8fb3e58d1af0b8ca315e145be
2018-08-13 17:27:30 -07:00