Commit Graph

7159 Commits

Author SHA1 Message Date
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
Tianjie Xu e100c9f491 Merge "Add a function to construct the GRSurface in test"
am: ee9c65a38e

Change-Id: I77cdb9e53a1ac44ba9bd23bb408d3154e50f1778
2018-10-23 12:34:23 -07:00
Tianjie Xu ee9c65a38e Merge "Add a function to construct the GRSurface in test" 2018-10-23 19:22:12 +00:00
Tianjie Xu 1e10cc4297 Add a function to construct the GRSurface in test
This fixes the build error as the initializer list no longer work
without the proper constructor for c++ class.

Bug: 74397117
Test: unit tests pass
Change-Id: If3ff508a1a01ad5326413dab8e05bacae8a946c8
2018-10-23 12:10:46 -07:00
Tianjie Xu 04fe842e15 Merge "Add function to show localized rescue party menu" am: 06ccd00ef5 am: 8bac38a0d6
am: c512095e96

Change-Id: I377869ef0519cf7d8157b657523c482b09dfc283
2018-10-23 11:44:34 -07:00
Tianjie Xu c512095e96 Merge "Add function to show localized rescue party menu" am: 06ccd00ef5
am: 8bac38a0d6

Change-Id: I56e05c2694acade00b64023e2f6d38898ca92a6a
2018-10-23 11:37:50 -07:00
Tianjie Xu 8bac38a0d6 Merge "Add function to show localized rescue party menu"
am: 06ccd00ef5

Change-Id: I2d92732da1fdcdcf535272437c7398519872c6a9
2018-10-23 11:34:34 -07:00
Tianjie Xu 06ccd00ef5 Merge "Add function to show localized rescue party menu" 2018-10-23 18:16:23 +00:00
Tao Bao 65815b6d3a ui: Add constness to Draw- functions.
These functions take the given GRSurface instances as inputs, which
shouldn't be altered.

Test: mmma -j bootable/recovery
Test: Run recovery_unit_test.
Test: `Run graphics test` on marlin.
Change-Id: I51bf408e85faae2b497d4f148ab1dec22dd16c93
2018-10-23 10:56:54 -07:00
Tao Bao bf95fa4cdc Merge "minui: Move GRSurface into a class." am: 66a576b79c am: 040335059e
am: ccaf187c41

Change-Id: Id988b6e21dcb4a9ff96b4c92231b5ae3515bfb02
2018-10-23 10:33:11 -07:00
Tao Bao ccaf187c41 Merge "minui: Move GRSurface into a class." am: 66a576b79c
am: 040335059e

Change-Id: If7464673e719728b98128fb7c2e4bfe3e6cb80e2
2018-10-23 10:30:10 -07:00
Tao Bao 040335059e Merge "minui: Move GRSurface into a class."
am: 66a576b79c

Change-Id: I8b9a75bc1316fcce85ee4aaac9f294c026521b5c
2018-10-23 10:25:09 -07:00
Tao Bao 66a576b79c Merge "minui: Move GRSurface into a class." 2018-10-23 17:06:35 +00:00
Tianjie Xu 57255d8aa0 Merge "Recovery now expects public keys in zipfile" am: bfc7d43c00 am: 9008b2c7df
am: 10c9282e07

Change-Id: I7954d85378ff4616c1127dfe2b3e82b0d69b4e5e
2018-10-22 20:00:21 -07:00
Tianjie Xu 10c9282e07 Merge "Recovery now expects public keys in zipfile" am: bfc7d43c00
am: 9008b2c7df

Change-Id: I8dc25a45464c6f8ddfbd910fbe651f3a2a5211b9
2018-10-22 19:56:00 -07:00
Tianjie Xu 9008b2c7df Merge "Recovery now expects public keys in zipfile"
am: bfc7d43c00

Change-Id: Iafcfe9a2497803c794327ee5c8bf9b6e1a8e5e8f
2018-10-22 19:51:25 -07:00
Tianjie Xu bfc7d43c00 Merge "Recovery now expects public keys in zipfile" 2018-10-23 02:40:55 +00:00
Tao Bao 92bdb5a389 minui: Move GRSurface into a class.
This CL adds GRSurface::Create() and dtor for managing the allocated
memory in GRSurface class. It also adds GRSurface::data() that hides the
underlying implementation, with both of const and non-const overloads.
This allows `const GRSurface&` to be more useful - previously it only
ensured a const member variable of `data`, instead of a read-only buffer
it points to.

It also marks the parameters in gr_texticon() and gr_blit() as const, as
they're incoming source that shouldn't be altered. It corrects the type
of gr_draw, which is the sink to be painted on (an earlier attempt was
made in [1], but didn't get the full picture correctly).

[1] https://android-review.googlesource.com/c/platform/bootable/recovery/+/704757/

Test: mmma -j bootable/recovery
Test: recovery_unit_test on marlin
Test: Run graphics test on marlin (fbdev).
Test: Run graphics test on blueline (drm).
Change-Id: I7904df084cd6c08fa04a9da97d01b4b1a6e3a20c
2018-10-22 18:18:02 -07:00
Tianjie Xu b99e6069c1 Add function to show localized rescue party menu
Add a function in screenUI to display the pre-generated graphs for
rescue party. If these graphs are not valid, falls back to display
the old text strings.

Right now we haven't generated the localized graphs yet, so the UI
always shows the TextMenu.

Bug: 116655889
Test: check rescue party under recovery
Change-Id: I0558cb536b659cdc25c8b7946d3a39820935b003
2018-10-22 15:27:33 -07:00
Tianjie Xu e1d02fb9ff Recovery now expects public keys in zipfile
This is in line with the build system change which copies the recovery ota
install keys to a zipfile. And now recovery will parses and loads the public
keys from /res/otacerts.zip. The legacy load_keys functions will be
removed in later cls.

Bug: 116655889
Test: sideload an ota package
Change-Id: I95e91736ca9964df06d74aa292d672e2f9e442e8
2018-10-22 13:02:02 -07:00
Colin Cross 3d5a941b0b Merge "Fix instrumentation_for to refer to name of module" am: 24ead5672b am: 3463839772
am: 848a32afa9

Change-Id: I7507b2d5b974c17a388360a52b57aa7ee41de919
2018-10-19 01:10:45 -07:00
Colin Cross 848a32afa9 Merge "Fix instrumentation_for to refer to name of module" am: 24ead5672b
am: 3463839772

Change-Id: I52fca337bd9cf4e0e0cd1d0d52e3dfb0134c6a59
2018-10-19 01:05:42 -07:00
Colin Cross 3463839772 Merge "Fix instrumentation_for to refer to name of module"
am: 24ead5672b

Change-Id: I3e18013e7e5ab52bfdd708655a1a40ec7cfebb48
2018-10-19 00:56:44 -07:00
Treehugger Robot 24ead5672b Merge "Fix instrumentation_for to refer to name of module" 2018-10-19 07:47:13 +00:00
Tianjie Xu 18c5ac8e0d Merge "Load X509 keys from ziparchive" am: a39b2baf12 am: 81ef25aada
am: 93cf8bb309

Change-Id: I4c7a3bb3e71fa987839f8ef74df76a359c8b336d
2018-10-18 18:03:22 -07:00
Tianjie Xu 93cf8bb309 Merge "Load X509 keys from ziparchive" am: a39b2baf12
am: 81ef25aada

Change-Id: I556873f4ce2c68d6265070dc1dce2972760f9397
2018-10-18 17:59:17 -07:00
Tianjie Xu 81ef25aada Merge "Load X509 keys from ziparchive"
am: a39b2baf12

Change-Id: I59164b7da1db44e3d7e79e095334f16552d873a0
2018-10-18 17:55:38 -07:00
Tianjie Xu a39b2baf12 Merge "Load X509 keys from ziparchive" 2018-10-19 00:01:01 +00:00
Tianjie Xu 0dd9685311 Load X509 keys from ziparchive
Add a function to parse the zip archive and load the certificate from
all the zip entries with the suffix "x509.pem".

Bug: 116655889
Test: unittests pass
Change-Id: I93bf7aef7462c0623e89fc2d466d7af2d3a758bc
2018-10-18 11:42:01 -07:00
Colin Cross 88dcca91dd Fix instrumentation_for to refer to name of module
The instrumentation_for property takes the name a module, not the
name of a class.

Test: m checkbuild
Change-Id: I4671ed7b42696eb023052655c0ce7997d2b754f8
2018-10-17 15:14:31 -07:00