Commit Graph

5015 Commits

Author SHA1 Message Date
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 4bf7032066 update_verifier: verify blocks in parallel
am: bd9664b5a0

Change-Id: Iebaa6b6589ad9bee9eb8b89101f41bccf749212f
2017-08-10 02:45:24 +00: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 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
David Zeuthen 1a0929cc8a 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.
Bug: 64315394
Change-Id: I8310849e347248f4a96158838310f688ecef4211
2017-08-08 12:48:43 -04:00
Bill Yi 87363d0f89 Import translations. DO NOT MERGE am: 5c2bc51bf2 -s ours
am: 5fec07da3d  -s ours

Change-Id: I27768afdbce3ff82568046731771f66f7b20d481
2017-08-06 05:38:55 +00:00
Bill Yi 5fec07da3d Import translations. DO NOT MERGE
am: 5c2bc51bf2  -s ours

Change-Id: Ia5c7cb1a9aee05f47c4a5b281ca1a199e2506248
2017-08-06 05:31:54 +00:00
Bill Yi 5c2bc51bf2 Import translations. DO NOT MERGE
Change-Id: Ia215c30c6912ffa1e3270543f6ff4fc27f4260e4
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-05 18:24:07 -07:00
Tao Bao 73bdee16f9 ui: Check for bootreason=recovery_ui. am: 937e884ca1
am: 92d98c276d

Change-Id: Ic7fcf8aa918d1c47f17edc54ba12013be558e057
2017-08-04 03:55:17 +00:00
Tao Bao 92d98c276d ui: Check for bootreason=recovery_ui.
am: 937e884ca1

Change-Id: I577b7e4230e06bc862022f19297e3b00a4a77345
2017-08-04 03:49:17 +00:00
Tao Bao 5ac17d1633 Merge "ui: Check for bootreason=recovery_ui." am: f49cc02e86 am: 7c0b8a4322 am: 7f5b514411 am: 99f78994cb
am: 6ec170d867

Change-Id: I8cd8e422b81ff44620bf0ae901b032a28bed2eec
2017-08-03 22:27:28 +00:00
Tao Bao 6ec170d867 Merge "ui: Check for bootreason=recovery_ui." am: f49cc02e86 am: 7c0b8a4322 am: 7f5b514411
am: 99f78994cb

Change-Id: I1cf65cc463c11a8b59f560dfc03b3bc87ea3b68b
2017-08-03 22:21:23 +00:00
Tao Bao 99f78994cb Merge "ui: Check for bootreason=recovery_ui." am: f49cc02e86 am: 7c0b8a4322
am: 7f5b514411

Change-Id: I63473a830b0736da5e4f16febf0ee826d870ab40
2017-08-03 22:10:26 +00:00
Tao Bao 7f5b514411 Merge "ui: Check for bootreason=recovery_ui." am: f49cc02e86
am: 7c0b8a4322

Change-Id: I47386ad9e8c1dabaaa981f77d84abb8cf24557d6
2017-08-03 22:05:27 +00:00
Tao Bao 7c0b8a4322 Merge "ui: Check for bootreason=recovery_ui."
am: f49cc02e86

Change-Id: I75d4f38e9842b24e01027523fa765feca8c8cc25
2017-08-03 21:59:51 +00:00
Tao Bao 937e884ca1 ui: Check for bootreason=recovery_ui.
Some wear bootloaders are passing bootreason=recovery_ui when booting
into recovery from fastboot, or via 'adb reboot recovery'. Allow turning
on text mode with a swipe for such a bootreason. Since we will turn on
text mode automatically for debuggable builds, this bootreason mainly
handles the case for user builds.

Note this change only applies to devices that allow touch screen inputs.

Bug: 36169090
Bug: 64307776
Test: Build and boot into user build recovery image. Toggle on text mode
      with a swipe.
Change-Id: I55f19aed7b210352f8370de19935b4772cc12095
(cherry picked from commit 046aae29d9)
2017-08-03 14:52:06 -07:00
Tao Bao f49cc02e86 Merge "ui: Check for bootreason=recovery_ui." 2017-08-03 21:49:24 +00:00
Tao Bao 4d91ada15d ui: Move the support for touch inputs into RecoveryUI. am: af9f8b4d97
am: 74098080e0

Change-Id: I09c351bc81724428cc7af397e0baf5eac6cbdb46
2017-08-03 21:33:07 +00:00
Tao Bao 74098080e0 ui: Move the support for touch inputs into RecoveryUI.
am: af9f8b4d97

Change-Id: Ib205b133663f63b4a7413adf9ac584092c3396a3
2017-08-03 21:19:19 +00:00
Tao Bao 593ea648ff Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068 am: 14d829b02c am: 30886cb817
am: f589396b0e

Change-Id: I0d9ad1d35ea7973272e7fc6a9852a3f36c3fbfa2
2017-08-03 19:02:21 +00:00
Tianjie Xu e7e656a25b Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b am: e500bc3e15 am: 12cd28fb9c
am: 6eae2f7023

Change-Id: Iaa24195286b770fad16446e9f4fe4c7e80e9dcb2
2017-08-03 19:01:41 +00:00
Tao Bao f589396b0e Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068 am: 14d829b02c
am: 30886cb817

Change-Id: Ib18bcf5bf9165e93afef26070eb5c19949d47a4e
2017-08-03 18:49:09 +00:00
Tianjie Xu 6eae2f7023 Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b am: e500bc3e15
am: 12cd28fb9c

Change-Id: Id9b37ba12cfc534f9b59eac78bf1476e6f7a72a3
2017-08-03 18:48:45 +00:00
Tao Bao 046aae29d9 ui: Check for bootreason=recovery_ui.
Some wear bootloaders are passing bootreason=recovery_ui when booting
into recovery from fastboot, or via 'adb reboot recovery'. Allow turning
on text mode with a swipe for such a bootreason. Since we will turn on
text mode automatically for debuggable builds, this bootreason mainly
handles the case for user builds.

Note this change only applies to devices that allow touch screen inputs.

Bug: 36169090
Test: Build and boot into user build recovery image. Toggle on text mode
      with a swipe.
Change-Id: I55f19aed7b210352f8370de19935b4772cc12095
2017-08-03 11:37:37 -07:00
Tao Bao 30886cb817 Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773 am: 5daa000068
am: 14d829b02c

Change-Id: Icc07c0788a2d0fdcdb09957c7e80d2c208374e41
2017-08-03 18:35:40 +00:00
Tianjie Xu 12cd28fb9c Merge "Refactor the imgdiff" am: f411f3dcfb am: 6c1a6c389b
am: e500bc3e15

Change-Id: Ibee36f11ef600685881bb2f652216196f323ed8d
2017-08-03 18:35:23 +00:00
Tao Bao 14d829b02c Merge "ui: Move the support for touch inputs into RecoveryUI." am: faa5b1f773
am: 5daa000068

Change-Id: I5cec1eef0e5f0e648e630117b6332e1a4059f4f2
2017-08-03 18:29:38 +00:00
Tianjie Xu e500bc3e15 Merge "Refactor the imgdiff" am: f411f3dcfb
am: 6c1a6c389b

Change-Id: Ifc13d6c9fad007909f49192a8e34d37083c0a682
2017-08-03 18:29:25 +00:00
Tao Bao 5daa000068 Merge "ui: Move the support for touch inputs into RecoveryUI."
am: faa5b1f773

Change-Id: Id81f4dca012f5af9000409e93c76a176f4f5b4d3
2017-08-03 18:24:22 +00:00
Tianjie Xu 6c1a6c389b Merge "Refactor the imgdiff"
am: f411f3dcfb

Change-Id: I2b99c2f0f0c117451db80324670590f96fbbb1da
2017-08-03 18:24:08 +00:00
Tao Bao faa5b1f773 Merge "ui: Move the support for touch inputs into RecoveryUI." 2017-08-03 18:18:27 +00:00
Tianjie Xu f411f3dcfb Merge "Refactor the imgdiff" 2017-08-03 18:12:23 +00:00
Tao Bao af9f8b4d97 ui: Move the support for touch inputs into RecoveryUI.
- Added detection for EV_ABS events in minui/events.cpp, if it's
  allowed;
- Added listening and processing touch inputs in ui.cpp;
- Fixed an issue in recognizing swipe with multi-touch protocol A;
- Changed the logic in RecoveryUI::ProcessKey() to be swipe-aware. It
  now allows turning on text mode with <power> + <swipe-up>.

The last change also fixed an issue on devices with protocol A: prior
to this CL, user may accidentally toggle the text mode during an OTA.
Because it was considered as a single-button device, a long tap that
sent BTN_TOUCH event would turn on text mode.

Test: Allow detecting touch inputs. Swiping (up, down, enter) works on
      angler, angelfish, dorado respectively.
Bug: 36169090
Bug: 64307776
Change-Id: I4bc882b99114ce4ab414f8bdb8f4f7a525b8a8fd
(cherry picked from commit 5f8dd9951d)
2017-08-03 11:10:28 -07:00
Tianjie Xu 6b03ba7902 Refactor the imgdiff
This helps us to add a new mode to handle large APKs in the follow
up CL.

Changes include:
1. Create a new interface class 'Image'
1. Create subclasses 'ZipModeImage' and 'ImageModeImage' and move the
   related functions there.

Bug: 63542719
Test: recovery_component_test passes
Change-Id: I7729b0ba39b19a9c84811636a60dd0a0b1acc2f0
2017-08-02 14:29:45 -07:00
Tao Bao 5f8dd9951d ui: Move the support for touch inputs into RecoveryUI.
- Added detection for EV_ABS events in minui/events.cpp, if it's
  allowed;
- Added listening and processing touch inputs in ui.cpp;
- Fixed an issue in recognizing swipe with multi-touch protocol A;
- Changed the logic in RecoveryUI::ProcessKey() to be swipe-aware. It
  now allows turning on text mode with <power> + <swipe-up>.

The last change also fixed an issue on devices with protocol A: prior
to this CL, user may accidentally toggle the text mode during an OTA.
Because it was considered as a single-button device, a long tap that
sent BTN_TOUCH event would turn on text mode.

Test: Allow detecting touch inputs. Swiping (up, down, enter) works on
      angler, angelfish, dorado respectively.
Bug: 36169090
Change-Id: I4bc882b99114ce4ab414f8bdb8f4f7a525b8a8fd
2017-08-01 18:30:48 -07:00
Tianjie Xu a24121576f Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310 am: a09376ed90 am: 8b09001e47
am: fd0e740c61

Change-Id: I1a150ab61fd631252faa774455cd3aca83e8dd4c
2017-08-01 00:44:50 +00:00
Tianjie Xu fd0e740c61 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310 am: a09376ed90
am: 8b09001e47

Change-Id: Ib1c74e9295cf2c2f22a47135a24a884037a31555
2017-08-01 00:41:51 +00:00
Tianjie Xu 8b09001e47 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc am: fbd4b10310
am: a09376ed90

Change-Id: I67b2f4e91133239d4eb35524c7f0ed41f18de8dc
2017-08-01 00:38:21 +00:00
Tianjie Xu a09376ed90 Merge "Add implemention of SortedRangeSet" am: 64cba55fbc
am: fbd4b10310

Change-Id: I2c6bc65375be433e79db8861e3c5e936847c897e
2017-08-01 00:34:49 +00:00
Tianjie Xu fbd4b10310 Merge "Add implemention of SortedRangeSet"
am: 64cba55fbc

Change-Id: I2174e4f55c85fe57014b31625dbc2d06e41350be
2017-08-01 00:31:20 +00:00
Tianjie Xu 64cba55fbc Merge "Add implemention of SortedRangeSet" 2017-08-01 00:22:33 +00:00
Tianjie Xu b9e7fc7fa9 Add implemention of SortedRangeSet
This is useful in imgdiff to maintain the block ranges of
splitted source image.

Bug: 34220646
Test: mma && unit tests pass
Change-Id: I6427f2ea50f0e3b0aa3dd01880ec0206679b7429
2017-07-31 15:13:55 -07:00
Tao Bao 99d378fa02 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c am: 0863373376 am: 06db7363b0
am: cee984b929

Change-Id: Ia4fbd8f6bbfcc4fe51488b65cfe2b826564119f5
2017-07-31 00:28:14 +00:00
Tao Bao cee984b929 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c am: 0863373376
am: 06db7363b0

Change-Id: Ie474f91d9ab7b9c64c2fd9ecb1930a767ceb8e84
2017-07-31 00:25:13 +00:00
Tao Bao 06db7363b0 Merge "otautil: Clean up dirCreateHierarchy()." am: 610712101b am: 5507c3d63c
am: 0863373376

Change-Id: Ia2326bca2d8a1344fccd2838e2b376cb9a843a82
2017-07-31 00:21:43 +00:00