Commit graph

7338 commits

Author SHA1 Message Date
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
Tianjie Xu
3616e28bd1 Merge "Add description for the new translation"
am: d84d570d8c

Change-Id: Ifce87eca5a4d76d600eb9dd22ec0c805a1a3b37d
2018-10-29 20:07:43 -07:00
Tianjie Xu
d84d570d8c Merge "Add description for the new translation" 2018-10-30 03:00:47 +00:00
Tianjie Xu
4b6e26aa5f Merge "Switch to use commandline parser" am: fd27983b62 am: 188b4ec273
am: 0894b5d0bf

Change-Id: Ib8ea5db8384d0c186f6c73a860858177ddc804be
2018-10-29 15:39:33 -07:00
Tianjie Xu
0894b5d0bf Merge "Switch to use commandline parser" am: fd27983b62
am: 188b4ec273

Change-Id: I29a73a007ea5cc75333b0733b71b71cddb0e029d
2018-10-29 15:35:33 -07:00
Tianjie Xu
188b4ec273 Merge "Switch to use commandline parser"
am: fd27983b62

Change-Id: Ifb55a4e75ae7b13233af160f8ea85ceeac1527f3
2018-10-29 15:31:23 -07:00
Tianjie Xu
fd27983b62 Merge "Switch to use commandline parser" 2018-10-29 22:23:31 +00:00
Tianjie Xu
341df2c533 Merge "Clean up the zipfile creation in InstallTest" am: 41cb6a65ac am: 078034d300
am: d791648e90

Change-Id: Ife1196b6cb7c7b9f395c81929b57b31db78fd026
2018-10-29 15:13:25 -07:00
Tianjie Xu
d791648e90 Merge "Clean up the zipfile creation in InstallTest" am: 41cb6a65ac
am: 078034d300

Change-Id: I813e1b3f3b84171cf0e138a40ea3b6f803b3165f
2018-10-29 15:09:20 -07:00
Tianjie Xu
078034d300 Merge "Clean up the zipfile creation in InstallTest"
am: 41cb6a65ac

Change-Id: I71df7a03a79b36d003b6fa888e8c0ab5f26aaedc
2018-10-29 15:06:17 -07:00
Tianjie Xu
41cb6a65ac Merge "Clean up the zipfile creation in InstallTest" 2018-10-29 21:54:25 +00:00
Tianjie Xu
9f843e7751 Add description for the new translation
As we localize the wipe data menu under the recovery mode, some
additional strings need the new translation. The strings include
1. The menu header that prompts a data wipe
2. Try again description
3. Factory reset description
4. The menu header to confirm a data wipe
5. Cancel description

We will resue the "Factory reset description" in the confirmation menu;
and the image_generator tool will be moved to this directory in later
cls.

Bug: 74397117
Test: mma
Change-Id: I706b8677dba506b62e890f6b200e3eb3b11ce483
2018-10-29 14:43:44 -07:00
Tianjie Xu
f2fb49a3c4 Clean up the zipfile creation in InstallTest
Consolidate them into a static function.

Test: unit tests pass
Change-Id: If05b62215940b221fc499d779eedc5079f68a060
2018-10-29 12:04:13 -07:00
Tianjie Xu
aeec0b2076 Delete the dumpkey host tool
We used to dump the public key files into some text format; and parse
them under recovery. But now we have switched to read the certificates
directly from the zip files; and there's no caller of this dumpkey host
tool any more.

Bug: 116655889
Test: mma
Change-Id: I115592e2a894b3375495c81cb249d1bed1a5d973
2018-10-29 11:14:09 -07:00
Tianjie Xu
edfeb97f9f Switch to use commandline parser
The commandline parser adds some flexibility to the argument parsing. It
also makes the help message more descriptive.

Bug: 74397117
Test: generate a image, checks the help message
Change-Id: Ib238658a9a6fa8806f1b0dde419c8fb970e7cb37
2018-10-29 11:01:36 -07:00
Tianjie Xu
8787d4a1c8 Merge "Remove the load_keys function" am: 64ceace44f am: ac9d4ae1bf
am: 23b832fd1d

Change-Id: Ie9c793059b6e6763dd9af014624222b3faaf0e5b
2018-10-25 10:45:05 -07:00
Tianjie Xu
23b832fd1d Merge "Remove the load_keys function" am: 64ceace44f
am: ac9d4ae1bf

Change-Id: I20cf75d7b357466650d0fce4efeb91f0fe2176e8
2018-10-25 10:40:28 -07:00
Tianjie Xu
ac9d4ae1bf Merge "Remove the load_keys function"
am: 64ceace44f

Change-Id: I237dfde12e8597c36463ca31e487bf36b0d13ea1
2018-10-25 10:35:30 -07:00
Tianjie Xu
64ceace44f Merge "Remove the load_keys function" 2018-10-25 17:25:49 +00:00
Tianjie Xu
858fe12f39 Merge "Add sanity check when loading public keys for OTA package" am: 6793f61795 am: accb42d1b3
am: aa7d7f122a

Change-Id: I52cc32ffa3b6990f19e00e15cc9c7fc600b905ff
2018-10-24 21:22:35 -07:00
Tianjie Xu
aa7d7f122a Merge "Add sanity check when loading public keys for OTA package" am: 6793f61795
am: accb42d1b3

Change-Id: I7d66b01eeb8c25339c323d306fc7b8fc4980f9c9
2018-10-24 21:18:29 -07:00
Tianjie Xu
accb42d1b3 Merge "Add sanity check when loading public keys for OTA package"
am: 6793f61795

Change-Id: I28ee367d213c619bebce0c5e138aa426c41b92df
2018-10-24 21:14:25 -07:00
Tianjie Xu
6793f61795 Merge "Add sanity check when loading public keys for OTA package" 2018-10-25 04:03:23 +00:00
Tao Bao
769159d404 Merge "minui: Cleanup GRSurfaceDrm and MinuiBackendDrm." am: c17c819693 am: b420e60596
am: 5ad1525e9d

Change-Id: I2d9b3c21a62231cc2ab52d062362308633776759
2018-10-24 19:36:21 -07:00
Tao Bao
5ad1525e9d Merge "minui: Cleanup GRSurfaceDrm and MinuiBackendDrm." am: c17c819693
am: b420e60596

Change-Id: I2b385ebc054ab61e15657910ba3cd878416cd7ed
2018-10-24 19:18:57 -07:00
Bill Yi
3e97b7f9e0 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: 0db98fa501 -s ours am: 5168a610d2 -s ours
am: 8f229086af  -s ours

Change-Id: Idcba5309fd29a40b9ca6975250811c08e7373c5c
2018-10-24 18:07:14 -07:00
Bill Yi
8f229086af [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: 0db98fa501 -s ours
am: 5168a610d2  -s ours

Change-Id: Ie3797c471077b6919295f46e3f448c77d8e7dda1
2018-10-24 18:04:31 -07:00
Tao Bao
b420e60596 Merge "minui: Cleanup GRSurfaceDrm and MinuiBackendDrm."
am: c17c819693

Change-Id: Id6a812f9af47810953cb9383af833c4deee2fe5d
2018-10-24 16:50:55 -07:00
Tianjie Xu
cbe93e6506 Remove the load_keys function
This function is used to parse the result of dumpKeys. It's no longer
needed as we are now parsing the public keys from the zipfile.

Bug: 116655889
Test: unit tests pass
Change-Id: I817906e451664058c644f4329ff499bbe4587ebb
2018-10-24 23:26:59 +00:00
Treehugger Robot
c17c819693 Merge "minui: Cleanup GRSurfaceDrm and MinuiBackendDrm." 2018-10-24 23:26:59 +00:00
Tianjie Xu
b5110de1b3 Add sanity check when loading public keys for OTA package
For RSA keys, check if it has a 2048 bits modulus, and its public
exponent is 3 or 65537. For EC keys, check if the field size is 256
bits for its curve.

Bug: 116655889
Test: unit tests pass
Change-Id: I5c00f4d2b61c98c434f0b49db232155d5d0770ec
2018-10-24 16:25:09 -07:00
Bill Yi
5168a610d2 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE
am: 0db98fa501  -s ours

Change-Id: Ifb938f704fad3f25822265c7cf6a13c8bcac3226
2018-10-24 15:37:43 -07:00
Bill Yi
0db98fa501 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: Iabf1575f1a51c31cd567f9a9374cea70f0263952
2018-10-24 14:45:09 -07:00
Bill Yi
f78d266a74 [automerger skipped] Merge pi-platform-release to stage-aosp-master - DO NOT MERGE am: b19931239d -s ours
am: 48663227a7  -s ours

Change-Id: I41530ce9be81551952a8608330bc23332d56e687
2018-10-24 09:47:24 -07:00
Tao Bao
d096d7e5a9 minui: Cleanup GRSurfaceDrm and MinuiBackendDrm.
This CL adds a dtor to GRSurfaceDrm that handles the resource
deallocation. It also manages MinuiBackendDrm::GRSurfaceDrms with smart
pointers.

Test: Build and boot into recovery on blueline. `Run graphics test`.
Change-Id: Iff7bbdddbc0b5ab16483d00870794fca9f832bd5
2018-10-24 09:38:34 -07:00
Bill Yi
48663227a7 [automerger skipped] Merge pi-platform-release to stage-aosp-master - DO NOT MERGE
am: b19931239d  -s ours

Change-Id: I80369f3dadcaf0e3c5fea708f26d5a68011001f8
2018-10-24 09:33:36 -07:00
Bill Yi
b19931239d Merge pi-platform-release to stage-aosp-master - DO NOT MERGE
Change-Id: I5154dd1b550aaa0bfd538fb722423daaa5794dce
2018-10-24 09:04:49 -07:00
Tao Bao
ea141413c2 Merge "ui: Add constness to Draw- functions." am: 47b650b588 am: a9e8c76fef
am: d5a8089917

Change-Id: I0394d14d8c34b8aea9dcb11e64b90ad972b420a0
2018-10-23 18:22:47 -07:00
Tao Bao
d5a8089917 Merge "ui: Add constness to Draw- functions." am: 47b650b588
am: a9e8c76fef

Change-Id: I16aee9bb96c0d3e381edc2e063b365472a7e357a
2018-10-23 18:19:23 -07:00
Tao Bao
a9e8c76fef Merge "ui: Add constness to Draw- functions."
am: 47b650b588

Change-Id: I9d02829d7c57491ec762dca9075c09aba6e67cd0
2018-10-23 18:14:39 -07:00
Treehugger Robot
47b650b588 Merge "ui: Add constness to Draw- functions." 2018-10-24 00:28:21 +00:00
Tianjie Xu
a23b567dcb Merge "Add a function to construct the GRSurface in test" am: ee9c65a38e am: e100c9f491
am: 8868416614

Change-Id: I266d5418e4a53d5f5b9954ee83758eb9c373f458
2018-10-23 12:42:30 -07:00
Tianjie Xu
8868416614 Merge "Add a function to construct the GRSurface in test" am: ee9c65a38e
am: e100c9f491

Change-Id: Ibd76868a5620ecd95fff882a4e4b0e58471b741e
2018-10-23 12:38:26 -07:00