Commit Graph

7159 Commits

Author SHA1 Message Date
android-build-team Robot 84ca8048c5 release-request-8c6f0e6c-413f-4241-b3dc-c159fdcc7655-for-git_pi-release-4273687 snap-temp-L51400000093075386
Change-Id: Ib9e24a7a6c2a488f7e204f62e26b7f5fe97487cd
2017-08-15 08:10:39 +00:00
Tianjie Xu 4de77886e4 Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8 am: 96b490acec am: bfd3123a6a
am: cc41fc4384

Change-Id: I92156cbe77678253265feea4288ac96bfed486d9
2017-08-14 17:42:27 +00:00
Tianjie Xu cc41fc4384 Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8 am: 96b490acec
am: bfd3123a6a

Change-Id: I63526e65325b53afd630343a6a55bbca39f1b74f
2017-08-14 17:38:30 +00:00
Tianjie Xu bfd3123a6a Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062 am: 5bde1d9ef8
am: 96b490acec

Change-Id: I9656f313d5d3746ac9c9ecd98311b88d8754b3e1
2017-08-14 17:34:57 +00:00
Tianjie Xu 96b490acec Merge "Add a new PatchChunk class in imgdiff" am: 11214d9062
am: 5bde1d9ef8

Change-Id: Iccd45b9c2673237a0e8775d9527eb35f0aa2b869
2017-08-14 17:31:26 +00:00
Tianjie Xu 5bde1d9ef8 Merge "Add a new PatchChunk class in imgdiff"
am: 11214d9062

Change-Id: Ic2d4b218b36ace3dd1d49be1d17adeaf2d37b108
2017-08-14 17:26:56 +00:00
Tianjie Xu 11214d9062 Merge "Add a new PatchChunk class in imgdiff" 2017-08-14 17:21:16 +00:00
Tao Bao f2be3bd74a wear_ui: Expose menu_unusable_rows via Makefile var.
This variable is useful on small screens (e.g. on watches) to handle
long menus. We should have better way to handle this value smartly.
Prior to that, expose the value to be overridable by using the generic
wearable UI module (librecovery_ui_wear).

Bug: 64307776
Test: Define the variable, build and boot into recovery image and check
      the UI menu.
Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e
(cherry picked from commit eea3af3f91)
2017-08-13 11:24:56 -07:00
Tao Bao 016120f395 Allow customizing WearRecoveryUI via Makefile variables.
With the following Makefile variables, we can reduce the work of writing
(copy/pasting) device-specific WearRecoveryUI classes.

The list of Makefile variables (the ones useful for Wear devices):
- TARGET_RECOVERY_UI_MARGIN_HEIGHT (default: 0)
- TARGET_RECOVERY_UI_MARGIN_WIDTH (default: 0)
  Specify the margin space that we don't want to display texts. They
  replace the former outer_width and outer_height.

- TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD (default: 50)
- TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD (default: 90)
  Specify the sensitivity of recognizing a swipe. Devices give absolute
  positions, so for some devices we need to adjust the thresholds.

- TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE
  Specify the progress bar vertical position, which should be adjusted
  to the actual height of a device. It replaces the former
  progress_bar_y.

- TARGET_RECOVERY_UI_ANIMATION_FPS (default: 30)
  Specify the animation FPS if using device-specific animation images.
  It replaces the former animation_fps.

Devices can specify "TARGET_RECOVERY_UI_LIB := librecovery_ui_wear",
with optionally defined Makefile vars above, in BoardConfig.mk to
customize their WearRecoveryUI.

Also remove the obsolete wear_touch.{cpp,h}, which has been merged into
ui.cpp in commit 5f8dd9951d.

Bug: 64307776
Test: Change the device BoardConfig.mk and test recovery image.
Change-Id: Id0fb2d4e3977ab5ddd31e71f9535470cab70e41b
(cherry picked from commit 0470ceea38)
2017-08-13 11:24:33 -07:00
android-build-team Robot f02be7d57a release-request-631994b2-37c0-4d03-8caa-bfd01530db29-for-git_pi-release-4269836 snap-temp-L23500000092503827
Change-Id: Id836cdf1bb8604695d72dac52bc50d0805a97843
2017-08-13 08:07:36 +00:00
Tianjie Xu d82a2ed50b Add a new PatchChunk class in imgdiff
This way we can keep the input images const when calling
genetatepatches().

Test: recovery component test; diff and patch on chrome.apk; generate
recovery-from-boot.p for angler.
Change-Id: I65b5689b88f6719c6ede46bb82def0c4caeb8a61
2017-08-12 22:07:43 -07:00
Bill Yi 616256e739 Import translations. DO NOT MERGE
Change-Id: I99a2cf060c75a70b3baf3c22d538fbfa08828474
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-12 06:53:13 -07:00
Tao Bao eea3af3f91 wear_ui: Expose menu_unusable_rows via Makefile var.
This variable is useful on small screens (e.g. on watches) to handle
long menus. We should have better way to handle this value smartly.
Prior to that, expose the value to be overridable by using the generic
wearable UI module (librecovery_ui_wear).

Bug: 64307776
Test: Define the variable, build and boot into recovery image and check
      the UI menu.
Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e
2017-08-11 13:53:58 -07:00
David Zeuthen 57eeb9b70a update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76 am: db9ec51c39
am: 5cb56fbf76

Change-Id: I2cf483c1f99d042a34b477ecf949cff35f0450c4
2017-08-10 21:28:21 +00:00
David Zeuthen 5cb56fbf76 update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76
am: db9ec51c39

Change-Id: I74ed15e22a3f78d673e838515cf989863575044e
2017-08-10 21:11:40 +00:00
David Zeuthen db9ec51c39 update_verifier: Support androidboot.veritymode being empty or 'disabled'.
am: 3222dc0d76

Change-Id: I31ce6bf1e82269a45e3d49bda961359f7dd8bab9
2017-08-10 21:00:09 +00:00
David Zeuthen dd9939fc9b update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76 am: 9cf2e9798f
am: da7c1e4492

Change-Id: If52ddeb0189abe8e83bfac418f1a6661c351df8f
2017-08-10 21:00:09 +00:00
David Zeuthen da7c1e4492 update_verifier: Support androidboot.veritymode being empty or 'disabled'. am: 3222dc0d76
am: 9cf2e9798f

Change-Id: I4af28a7b975393f9f789c200577d9bd83d1902c1
2017-08-10 20:56:39 +00:00
David Zeuthen 9cf2e9798f update_verifier: Support androidboot.veritymode being empty or 'disabled'.
am: 3222dc0d76

Change-Id: I20dc5fce9e5adf002acf0e918d843c681286a8fc
2017-08-10 20:53:08 +00:00
Tao Bao c3c85bd889 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4 am: 5156e24ccf am: 37b9d108a9
am: 0bbd31b865

Change-Id: Ib0248c92d2f0bf267134e1b0b1f8bce842e7f3f9
2017-08-10 16:44:55 +00:00
Tao Bao 0bbd31b865 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4 am: 5156e24ccf
am: 37b9d108a9

Change-Id: I99ce9776fc0597d93315295a7a81600231efa3ed
2017-08-10 16:41:23 +00:00
Tao Bao 37b9d108a9 Merge "update_verifier: verify blocks in parallel" am: 0459799ea8 am: 1fa82a2af4
am: 5156e24ccf

Change-Id: I84945b9ef0d8ae985e5200c2e5dec95ce4da2b9d
2017-08-10 16:37:22 +00:00
Tao Bao 5156e24ccf Merge "update_verifier: verify blocks in parallel" am: 0459799ea8
am: 1fa82a2af4

Change-Id: Ieeabe5fc76d25a4c22164c0e61d3a93b046cd8c7
2017-08-10 16:33:23 +00:00
Tao Bao 0470ceea38 Allow customizing WearRecoveryUI via Makefile variables.
With the following Makefile variables, we can reduce the work of writing
(copy/pasting) device-specific WearRecoveryUI classes.

The list of Makefile variables (the ones useful for Wear devices):
- TARGET_RECOVERY_UI_MARGIN_HEIGHT (default: 0)
- TARGET_RECOVERY_UI_MARGIN_WIDTH (default: 0)
  Specify the margin space that we don't want to display texts. They
  replace the former outer_width and outer_height.

- TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD (default: 50)
- TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD (default: 90)
  Specify the sensitivity of recognizing a swipe. Devices give absolute
  positions, so for some devices we need to adjust the thresholds.

- TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE
  Specify the progress bar vertical position, which should be adjusted
  to the actual height of a device. It replaces the former
  progress_bar_y.

- TARGET_RECOVERY_UI_ANIMATION_FPS (default: 30)
  Specify the animation FPS if using device-specific animation images.
  It replaces the former animation_fps.

Devices can specify "TARGET_RECOVERY_UI_LIB := librecovery_ui_wear",
with optionally defined Makefile vars above, in BoardConfig.mk to
customize their WearRecoveryUI.

Also remove the obsolete wear_touch.{cpp,h}, which has been merged into
ui.cpp in commit 5f8dd9951d.

Bug: 64307776
Test: Change the device BoardConfig.mk and test recovery image.
Change-Id: Id0fb2d4e3977ab5ddd31e71f9535470cab70e41b
2017-08-10 09:31:17 -07:00
Tao Bao 1fa82a2af4 Merge "update_verifier: verify blocks in parallel"
am: 0459799ea8

Change-Id: Ic8ce7a45de3a7501f7e1f758c7ddf56ff5d919e3
2017-08-10 16:30:03 +00:00
Tao Bao 0459799ea8 Merge "update_verifier: verify blocks in parallel" 2017-08-10 16:24:38 +00:00
android-build-team Robot 5a2732630e release-request-0b474cbb-ff20-424d-a570-a0a7b83a7705-for-git_pi-release-4262110 snap-temp-L42700000091449286
Change-Id: I043978b21821e896ca840dcd6a9749c8743c7ad4
2017-08-10 08:10:01 +00:00
Tao Bao 8bbcf6d75f Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad am: 43df6cfeee am: 46c13f3f05 am: 6f1c38c9ad
am: b5fa329795

Change-Id: Idd39efb798d72cb96235a1ba01e633dee7be1c92
2017-08-10 06:36:12 +00:00
Tao Bao b5fa329795 Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad am: 43df6cfeee am: 46c13f3f05
am: 6f1c38c9ad

Change-Id: I6e32f2653681816140d06cf3135d343937dd3bc4
2017-08-10 06:23:46 +00:00
Tao Bao 6f1c38c9ad Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad am: 43df6cfeee
am: 46c13f3f05

Change-Id: Iaa1bd4f403664a87153b9f6b647e04bc7798a33d
2017-08-10 06:10:14 +00:00
Tao Bao 46c13f3f05 Merge "tests: Add the missing dependency on libhidlbase." am: 05b2e982ad
am: 43df6cfeee

Change-Id: I1b6aec75eda5a289cc3cd6a72029d90d9ba4c433
2017-08-10 06:06:43 +00:00
Tao Bao 43df6cfeee Merge "tests: Add the missing dependency on libhidlbase."
am: 05b2e982ad

Change-Id: Ie08dca777af1d12a304aebf11f4df25680ff939a
2017-08-10 06:03:45 +00:00
Wei Wang 5226f4715d update_verifier: verify blocks in parallel
This CL is to change update_verifier to verify blocks in parallel to
maximize storage bandwidth, it also preallocate the buffer to avoid
vector allocation within reading loop.

Test:
care_map.txt:
system
16,0,517,556,32770,33084,98306,98620,163842,164156,229378,229692,294914,295228,483544,524288,524296
vendor
8,0,119,135,32770,32831,96150,98304,98306

With CL:
init: Service 'update_verifier_nonencrypted' (pid 711) exited with status 0 waiting took 2.978424 seconds

Without CL:
init: Service 'update_verifier_nonencrypted' (pid 695) exited with status 0 waiting took 4.466320 seconds

Bug: 63686531
Test: reboot with manual insert care_map.txt
Change-Id: Idf791865f15f6ff6cad89bf7ff230ee46c6adccc
(cherry picked from commit bd9664b5a0)
2017-08-09 22:59:16 -07:00
Tao Bao 05b2e982ad Merge "tests: Add the missing dependency on libhidlbase." 2017-08-10 05:58:49 +00:00
Tao Bao 3e2345e1fe tests: Add the missing dependency on libhidlbase.
It fails to build recovery_component_test with the following errors:

out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::hidl_string(android::hardware::hidl_string const&)'
out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::operator=(android::hardware::hidl_string
const&)'
out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::~hidl_string()'

libupdate_verifier includes <android/hardware/boot/1.0/IBootControl.h>,
which includes the 'types.h' above. In 'types.h', it defines struct
CommandResult that's using android::hardware::hidl_string.

Since libhidlbase doesn't have a static library target, remove
'LOCAL_FORCE_STATIC_EXECUTABLE := true', which isn't required for
running tests.

Test: mmma -j bootable/recovery
Bug: 64538692
Change-Id: Iaa7c08adc241128d787274fcaea9b363e7ff93f4
(cherry picked from commit 102016ce1f)
2017-08-09 22:57:13 -07:00
Wei Wang 9186bee3d1 Merge "tests: Add the missing dependency on libhidlbase." into oc-mr1-dev am: 1f4229ff95
am: 22cf0224fd

Change-Id: I7dfc82b7b3286711e13a70a773b488139a210d16
2017-08-10 03:30:03 +00:00
Wei Wang 2ae88bba70 update_verifier: verify blocks in parallel am: bd9664b5a0
am: 4bf7032066

Change-Id: Id1ed6e8d1903db2f879fc9c0bfa85caddcf8e248
2017-08-10 03:30:00 +00:00
Wei Wang 22cf0224fd Merge "tests: Add the missing dependency on libhidlbase." into oc-mr1-dev
am: 1f4229ff95

Change-Id: I80603def879d1837bdcd6ec48aeeef22b635fa00
2017-08-10 02:45:28 +00:00
Wei Wang 4bf7032066 update_verifier: verify blocks in parallel
am: bd9664b5a0

Change-Id: Iebaa6b6589ad9bee9eb8b89101f41bccf749212f
2017-08-10 02:45:24 +00:00
Wei Wang 1f4229ff95 Merge "tests: Add the missing dependency on libhidlbase." into oc-mr1-dev 2017-08-10 02:32:47 +00:00
Tao Bao 102016ce1f tests: Add the missing dependency on libhidlbase.
It fails to build recovery_component_test with the following errors:

out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::hidl_string(android::hardware::hidl_string const&)'
out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::operator=(android::hardware::hidl_string
const&)'
out/soong/.intermediates/hardware/interfaces/boot/1.0/android.hardware.boot@1.0_genc++_headers/gen/android/hardware/boot/1.0/types.h:14:
error: undefined reference to 'android::hardware::hidl_string::~hidl_string()'

libupdate_verifier includes <android/hardware/boot/1.0/IBootControl.h>,
which includes the 'types.h' above. In 'types.h', it defines struct
CommandResult that's using android::hardware::hidl_string.

Since libhidlbase doesn't have a static library target, remove
'LOCAL_FORCE_STATIC_EXECUTABLE := true', which isn't required for
running tests.

Test: mmma -j bootable/recovery
Bug: 64538692
Change-Id: Iaa7c08adc241128d787274fcaea9b363e7ff93f4
2017-08-09 16:41:48 -07:00
Wei Wang bd9664b5a0 update_verifier: verify blocks in parallel
This CL is to change update_verifier to verify blocks in parallel to
maximize storage bandwidth, it also preallocate the buffer to avoid
vector allocation within reading loop.

Test:
care_map.txt:
system
16,0,517,556,32770,33084,98306,98620,163842,164156,229378,229692,294914,295228,483544,524288,524296
vendor
8,0,119,135,32770,32831,96150,98304,98306

With CL:
init: Service 'update_verifier_nonencrypted' (pid 711) exited with status 0 waiting took 2.978424 seconds

Without CL:
init: Service 'update_verifier_nonencrypted' (pid 695) exited with status 0 waiting took 4.466320 seconds

Bug: 63686531
Test: reboot with manual insert care_map.txt
Change-Id: Idf791865f15f6ff6cad89bf7ff230ee46c6adccc
2017-08-09 19:57:17 +00:00
David Zeuthen 3222dc0d76 update_verifier: Support androidboot.veritymode being empty or 'disabled'.
Bootloaders using libavb will set androidboot.veritymode=disabled if
the "disable dm-verity" flag has been set. Additionally if the
"disable verification" flag is set androidboot.veritymode will not be
set at all. Handle both cases.

Without this fix we'll end up in a bootloop.

Test: Manually tested on a device using AVB.
(cherry-picked from commit 1a0929cc8a)
Bug: 64404283
Change-Id: I3adf93f8dfd528fe9b869a63afa775f5730a3f69
2017-08-09 14:23:20 -04:00
android-build-team Robot b32116ba2b release-request-999b130a-24cf-4106-967e-4713076535ff-for-git_pi-release-4257729 snap-temp-L14600000090822884
Change-Id: Ibe4cb51f21f5aba5b8de5e81e48665c37294d4f3
2017-08-09 08:12:04 +00:00
David Zeuthen 86ae1fb677 Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'." am: 399ce66534 am: bb8d04cd3c am: f2a8eba23c am: ade231287b
am: b266fbab19

Change-Id: I76e3c13de59217baa9ef2eb4c3b37abf3f23196b
2017-08-08 19:22:05 +00:00
David Zeuthen b266fbab19 Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'." am: 399ce66534 am: bb8d04cd3c am: f2a8eba23c
am: ade231287b

Change-Id: I2bba85188ae59d63f018b2b70b8e15c50e07de51
2017-08-08 19:18:34 +00:00
David Zeuthen ade231287b Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'." am: 399ce66534 am: bb8d04cd3c
am: f2a8eba23c

Change-Id: I22c644eb6bd995fecfd8ddcf9006386eb524dee9
2017-08-08 19:12:05 +00:00
David Zeuthen f2a8eba23c Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'." am: 399ce66534
am: bb8d04cd3c

Change-Id: I279d1398c83b4cd97525f56dc035c1719eb6f446
2017-08-08 19:08:35 +00:00
David Zeuthen bb8d04cd3c Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'."
am: 399ce66534

Change-Id: I6d2f6f15f9dc56963cd5c7750e67dbad0ee40994
2017-08-08 19:05:04 +00:00
Treehugger Robot 399ce66534 Merge "update_verifier: Support androidboot.veritymode being empty or 'disabled'." 2017-08-08 18:57:32 +00:00