Commit Graph

7179 Commits

Author SHA1 Message Date
Tao Bao d5f00a0224 Merge "tests: Remove obsolete testdata files." am: f720da5317 am: e9f568e5e5
am: 2618f6a14f

Change-Id: Ib20bd16894411eb74c5df61c194c3fdd584d13cc
2018-11-05 12:37:58 -08:00
Tao Bao 2618f6a14f Merge "tests: Remove obsolete testdata files." am: f720da5317
am: e9f568e5e5

Change-Id: I7de210eb8643049cc9befde01d67d91d4cd09cc4
2018-11-05 12:30:11 -08:00
Tao Bao e9f568e5e5 Merge "tests: Remove obsolete testdata files."
am: f720da5317

Change-Id: I436b49a2275e125c3f7d8962c4b4105623c960bc
2018-11-05 12:25:38 -08:00
Tao Bao f720da5317 Merge "tests: Remove obsolete testdata files." 2018-11-05 20:09:03 +00:00
Tao Bao 81ef508bd8 tests: Remove obsolete testdata files.
testdata/jarsigned.zip and testdata/unsigned.zip became dead since
commit 432918603f ("Refactor existing
tests to use gtest").

testdata/patch.bsdiff became dead when applypatch/applypatch.sh was
deleted (commit c3ef089dfa).

Test: Run recovery_unit_test and recovery_component_test.
Change-Id: Ie1a7f8850878593fcb7d4554759a539271ffb207
2018-11-05 09:10:11 -08:00
Tianjie Xu 59d0c1df0a Merge "Make the text image readable under recovery" am: d84922216c am: d50aa4f4ee
am: 69067f1946

Change-Id: I3ed6dc0ce70a8b859bd703cd7a322ee899f8e647
2018-11-04 23:06:54 -08:00
Tianjie Xu 69067f1946 Merge "Make the text image readable under recovery" am: d84922216c
am: d50aa4f4ee

Change-Id: Ibb747b3b9248c246a991caf0e80e13449787a602
2018-11-04 22:57:19 -08:00
Tianjie Xu d50aa4f4ee Merge "Make the text image readable under recovery"
am: d84922216c

Change-Id: Ie503be8af3d70e0c7cfa1646b47e35832c34e717
2018-11-04 22:52:47 -08:00
Tianjie Xu d84922216c Merge "Make the text image readable under recovery" 2018-11-05 06:41:55 +00:00
Tao Bao 9b21c7df08 Merge "minui: Use android::base::unique_fd in MinuiBackendFbdev." am: f2a9152408 am: f0cf952082
am: adbdb9ee25

Change-Id: I977fca1590ac32948db55f7d6139dfa16911c2fa
2018-11-02 15:31:28 -07:00
Tao Bao adbdb9ee25 Merge "minui: Use android::base::unique_fd in MinuiBackendFbdev." am: f2a9152408
am: f0cf952082

Change-Id: I3a9e992985f357a844780fcbf6e8a742e42e51b1
2018-11-02 15:26:24 -07:00
Tao Bao f0cf952082 Merge "minui: Use android::base::unique_fd in MinuiBackendFbdev."
am: f2a9152408

Change-Id: Ib53ef3c08f14f815769cd4cb72ba0303183abc1f
2018-11-02 15:17:20 -07:00
Treehugger Robot f2a9152408 Merge "minui: Use android::base::unique_fd in MinuiBackendFbdev." 2018-11-02 22:09:39 +00:00
Tao Bao f65d48bb5a minui: Use android::base::unique_fd in MinuiBackendFbdev.
Test: mmma -j bootable/recovery
Test: `Run graphics test` on taimen.
Change-Id: I5b25cafbd0107943606a87f0619242cf950174ac
2018-11-02 09:35:08 -07:00
Tao Bao 35b01a2023 Merge "minui: Add GRSurface::Clone()." am: 948790fa4c am: 24b89ffd25
am: 7c103b8846

Change-Id: Iff7874490ab6735761528e4d6b9c7598395c49f0
2018-11-01 19:43:59 -07:00
Tao Bao 7c103b8846 Merge "minui: Add GRSurface::Clone()." am: 948790fa4c
am: 24b89ffd25

Change-Id: I889882310398dd6968d0034c55d6562802ccc616
2018-11-01 19:39:57 -07:00
Tao Bao 24b89ffd25 Merge "minui: Add GRSurface::Clone()."
am: 948790fa4c

Change-Id: Iac2cf81268c8aa0c03e1fcad56b0569d978e35e9
2018-11-01 19:34:50 -07:00
Tao Bao 948790fa4c Merge "minui: Add GRSurface::Clone()." 2018-11-02 02:11:10 +00:00
Tianjie Xu 22dd019aa5 Make the text image readable under recovery
Encode the width, height and locale of the localized image as pixels so
that recovery can locate the correct range of the image from a
concatenated png file.

Also address a few todoes including wrapping the CJK text, making a
catch-all type for all languages.

Test: view the generated image under locale test
Change-Id: Icd3997eb4e992e76ef72526787d64c406f606970
2018-11-01 15:57:31 -07:00
Tao Bao 63b59dcead minui: Add GRSurface::Clone().
Clone() allows duplicating the image that's stored in the GRSurface.

Test: Run recovery_unit_test.
Change-Id: Ia50d507c6200f2de5f17143775de805247a60e1f
2018-11-01 12:14:46 -07:00
Tao Bao deaf2662d7 Merge changes I69ce001a,I14514017,I8e67cda7 am: d2e1c0a981 am: 082adef0e0
am: 492e87a40b

Change-Id: I451ae3ec1b79024ec083b190cc95791237382576
2018-11-01 12:03:27 -07:00
Tao Bao 492e87a40b Merge changes I69ce001a,I14514017,I8e67cda7 am: d2e1c0a981
am: 082adef0e0

Change-Id: I48425fa094de82a02d91172468b7415504faf72c
2018-11-01 11:59:30 -07:00
Tao Bao 082adef0e0 Merge changes I69ce001a,I14514017,I8e67cda7
am: d2e1c0a981

Change-Id: I65d3bb9a16efa3f983872a9982481d4947b5f6c7
2018-11-01 11:53:30 -07:00
Tao Bao d2e1c0a981 Merge changes I69ce001a,I14514017,I8e67cda7
* changes:
  minui: Remove the default and copy ctors for GRSurface.
  minui: Refactor GRSurfaceAdf.
  minui: Refactor GRSurfaceFbdev.
2018-11-01 18:37:33 +00:00
Tianjie Xu 23354167e8 Merge "Refactor the code to check the metadata" am: cbdcfc0038 am: 6ba8eb5248
am: ed7cbc2200

Change-Id: I0e0a62a123f0d391a2b3a7e88d5e119074ea3405
2018-11-01 10:50:13 -07:00
Tianjie Xu ed7cbc2200 Merge "Refactor the code to check the metadata" am: cbdcfc0038
am: 6ba8eb5248

Change-Id: I3a1a4c25e8ed9c7fb771a69577cf1bd226ea1d19
2018-11-01 10:45:08 -07:00
Tianjie Xu 6ba8eb5248 Merge "Refactor the code to check the metadata"
am: cbdcfc0038

Change-Id: I0b7d8a94a1e3d107a9e503c48363344209483b94
2018-11-01 10:41:04 -07:00
Tao Bao e601ca2db8 Merge "tests: Use FRIEND_TEST in ScreenRecoveryUITest." am: 4ba20f1031 am: 9533329773
am: f3db36e0af

Change-Id: Id1690497e2f8422ca1f6c9a4d98ad0554aff188e
2018-11-01 10:41:03 -07:00
Tianjie Xu cbdcfc0038 Merge "Refactor the code to check the metadata" 2018-11-01 17:38:18 +00:00
Tao Bao f3db36e0af Merge "tests: Use FRIEND_TEST in ScreenRecoveryUITest." am: 4ba20f1031
am: 9533329773

Change-Id: Ifa6717fb8ecee65554e7af27c13f8aeef3bb002c
2018-11-01 10:32:58 -07:00
Tao Bao 9533329773 Merge "tests: Use FRIEND_TEST in ScreenRecoveryUITest."
am: 4ba20f1031

Change-Id: Iac05758ba00aa6fb05d18427642d198e602be7b3
2018-11-01 10:28:56 -07:00
Tao Bao 4ba20f1031 Merge "tests: Use FRIEND_TEST in ScreenRecoveryUITest." 2018-11-01 17:19:16 +00:00
Tao Bao 929e481e71 tests: Use FRIEND_TEST in ScreenRecoveryUITest.
Test: Run recovery_unit_test on marlin.
Change-Id: I93ec6df8c056b2c485200822f18db0b852595242
2018-10-31 23:09:49 -07:00
Tao Bao fa13898752 Merge "minui: Add a protected GRSurface ctor." am: 287d5dc618 am: 6e0ce63c4b
am: 60965c1537

Change-Id: I0c990ec1373220fb221d50ac9fba98d7aaf81e15
2018-10-31 20:37:38 -07:00
Tao Bao 60965c1537 Merge "minui: Add a protected GRSurface ctor." am: 287d5dc618
am: 6e0ce63c4b

Change-Id: I5196faa651a60319b292e4ba10283a6b3222b82b
2018-10-31 20:33:09 -07:00
Tao Bao 6e0ce63c4b Merge "minui: Add a protected GRSurface ctor."
am: 287d5dc618

Change-Id: I6abee6e2e1654eb5406fcb41b6daee6d314c898a
2018-10-31 20:28:35 -07:00
Tao Bao 710bc535f4 minui: Remove the default and copy ctors for GRSurface.
As well as all the derived classes. Instances must be created with
Create(). A default copy ctor would mess up the ownership of the
mapped or allocated buffer in these classes, so that has been explicitly
removed.

Test: mmma -j bootable/recovery
Test: Run recovery_unit_test on marlin.
Test: `Run graphics test` on blueline.
Change-Id: I69ce001a9ec9e3ac851edb6ec4d3fa11f4aaea08
2018-10-31 20:28:29 -07:00
Tao Bao 1b18cf56e2 minui: Refactor GRSurfaceAdf.
Test: mmma -j bootable/recovery
Change-Id: I14514017aace4b7043a9db1f5a93ec130a6f89c4
2018-10-31 20:28:29 -07:00
Tao Bao 4a22b28bea minui: Refactor GRSurfaceFbdev.
- Adds Create() that returns a GRSurfaceFbdev instance.
- Moves away from using the copy ctor (precisely assignment operator) of
  GRSurfaceFbdev.
- Moves the GRSurfaceFbdev deallocation code into GRSurfaceFbdev's dtor.
- Manages MinuiBackendFbdev::gr_framebuffer with std::unique_ptr.

Test: mmma -j bootable/recovery
Test: `Run graphics test` on taimen.
Change-Id: I8e67cda7bc3a2feec0790124d035caa36fb58a89
2018-10-31 20:28:29 -07:00
Tao Bao 287d5dc618 Merge "minui: Add a protected GRSurface ctor." 2018-11-01 03:18:41 +00:00
David Anderson 1f9cf242ab Merge "recovery: Fix mounting /system with dynamic partitions." am: 023807fcf7 am: e3f6814451
am: fd23585aa5

Change-Id: Icc0f888be17e0eb1d3d88928b92a9b327b4cabb1
2018-10-31 14:48:28 -07:00
David Anderson fd23585aa5 Merge "recovery: Fix mounting /system with dynamic partitions." am: 023807fcf7
am: e3f6814451

Change-Id: I90b1fba26ecfb0a6405a0e80291ce7a7b05d1ad5
2018-10-31 14:31:59 -07:00
David Anderson e3f6814451 Merge "recovery: Fix mounting /system with dynamic partitions."
am: 023807fcf7

Change-Id: I6c73435e685a94ab36e872c6abd479ece3ca1af9
2018-10-31 13:50:17 -07:00
David Anderson 023807fcf7 Merge "recovery: Fix mounting /system with dynamic partitions." 2018-10-31 20:38:46 +00:00
Tao Bao 44820ac1e3 minui: Add a protected GRSurface ctor.
This prepares for the removal of the default and copy ctors, by making
GRSurface::Create() as the only way to get GRSurface instances.

Test: mmma -j bootable/recovery
Test: Run recovery_unit_test on marlin.
Change-Id: I0c34c3f3967e252deb020907c83acbac8a8f36b9
2018-10-31 11:19:28 -07:00
Tianjie Xu 93b5bf261c Refactor the code to check the metadata
The two functions check_wipe_package() and check_newer_ab_build() were
using the same flow; and checked the same device properties against the
metadata file in the package. These properties include: ota_type,
pre-device, and serial number.

Therefore, we can consolidate the checks to a single function; and
continue to check the fingerprint and timestamp only for AB updates.

This change also addresses the need to accept multiple serial number in
the wipe package.

Bug: 118401208
Test: unit tests pass
Change-Id: Ia6bc48fb6effcae059a2ff2cf71764b4136b4c00
2018-10-31 11:03:58 -07:00
Bill Yi df115ad537 Import translations. DO NOT MERGE
Change-Id: Icfe0dc21567e74da70cc7b2f1229815bceeac958
Auto-generated-cl: translation import
2018-10-30 19:01:50 -07:00
David Anderson 2b2f423ef6 recovery: Fix mounting /system with dynamic partitions.
When using dynamic partitions, the blk_device field in fstab_rec must be
translated to a /dev/block/dm-N node with
fs_mgr_update_logical_partition. However, init will not have created
these nodes to begin with since CreateLogicalPartitions is not called in
recovery. This patch addresses both issues.

Note that flashing system through fastbootd will not work while /system is
mounted.

Bug: 118634720
Test: manual test
Change-Id: I06c83309d09eab6b65245b1ed10c51d05398f23e
2018-10-30 13:47:59 -07:00
Tianjie Xu 3dc4ccbdea Merge "Add description for the new translation" am: d84d570d8c am: 3616e28bd1
am: fe93cdf6ef

Change-Id: I893ab7db1544878fa3e3e5c3bc2a8428bb476beb
2018-10-29 20:15:50 -07:00
Tianjie Xu fe93cdf6ef Merge "Add description for the new translation" am: d84d570d8c
am: 3616e28bd1

Change-Id: I2dbd86a58ec2a0860e4730b90f5cac3b464e75cc
2018-10-29 20:11:48 -07:00