Commit Graph

6994 Commits

Author SHA1 Message Date
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
Tao Bao 0d84eaf474 Merge "uncrypt: fix ioctl direction for F2FS_IOC_GET_PIN_FILE" am: b5564f37be am: c9649eba5c
am: 6abcee3efe

Change-Id: Ia9190fbdc83e5ba2132b31b0ffb44da1ff804970
2018-10-15 22:07:53 -07:00
Tao Bao 6abcee3efe Merge "uncrypt: fix ioctl direction for F2FS_IOC_GET_PIN_FILE" am: b5564f37be
am: c9649eba5c

Change-Id: Ie6bc5830efa045b061f95f8bf537e9a12304cc72
2018-10-15 21:27:35 -07:00
Tao Bao c9649eba5c Merge "uncrypt: fix ioctl direction for F2FS_IOC_GET_PIN_FILE"
am: b5564f37be

Change-Id: Iaceefb7360147954b4dd3a2eef1a0c8095236c8b
2018-10-15 18:28:38 -07:00
Tao Bao b5564f37be Merge "uncrypt: fix ioctl direction for F2FS_IOC_GET_PIN_FILE" 2018-10-16 01:03:43 +00:00
Tianjie Xu e6b68dea3a Merge "Implement the graphic menus" am: 06b1a89d72 am: 14177116ca
am: d8009938a3

Change-Id: I610c56a17bccf14bbf8acd62e6424d56bd9181c3
2018-10-13 19:10:52 -07:00
Tianjie Xu d8009938a3 Merge "Implement the graphic menus" am: 06b1a89d72
am: 14177116ca

Change-Id: I12b1d7386f8dda5dba7605ee7a597c31ae4d883b
2018-10-13 19:03:17 -07:00
Tianjie Xu 14177116ca Merge "Implement the graphic menus"
am: 06b1a89d72

Change-Id: Ia4dfbaa5847dd717801080927fdd39e8596b812e
2018-10-13 18:56:15 -07:00
Tianjie Xu 06b1a89d72 Merge "Implement the graphic menus" 2018-10-14 01:47:49 +00:00
Tianjie Xu a5a1b7544a Merge "Use a host java program to generate the background text" am: e4e929ce53 am: a74581a635
am: 962da673ff

Change-Id: Ifcc6c2c569e4e3c75cbf3a5e5dc4c9dd836ec890
2018-10-12 22:43:20 -07:00
Tianjie Xu 962da673ff Merge "Use a host java program to generate the background text" am: e4e929ce53
am: a74581a635

Change-Id: I281541e88d0157935ee75eb8e7f1ffdbf3cca0f1
2018-10-12 22:37:00 -07:00
Tianjie Xu a74581a635 Merge "Use a host java program to generate the background text"
am: e4e929ce53

Change-Id: Ia2487ed1871da48781820ce5fa6a1ceced06b4e9
2018-10-12 22:30:07 -07:00
Tianjie Xu e4e929ce53 Merge "Use a host java program to generate the background text" 2018-10-13 05:17:58 +00:00
Tianjie Xu 66dbf63080 Implement the graphic menus
As we plan to show localized rescue party dialogs under recovery mode
with pre-generated images, it becomes necessary to show the menu headers
and items with images.

This cl converts the menu class to a interface and derived TextMenu &
GraphicMenu classes. And the GraphicMenu uses GRSurfaces* as the menu header
and a list of GRSurfaces* as menu items.

Moreover, factor out the Draw* functions in the ScreenUI into a separate
DrawInterface. Therefore, the Menu class can access these draw functions and
use them to implement the DrawHeaders & DrawItems neatly.

Bug: 74397117
Test: unittests pass, boot into recovery and check menu
Change-Id: I95cee30f3e5eb666eb6fbcdfc873a7260fc177c1
2018-10-12 17:18:50 -07:00
Tianjie Xu 721f6792b4 Use a host java program to generate the background text
This program uses java.awt.Graphics2D to generate the background text
files used under recovery mode. And thus we don't need to do the manual
work by running emulators with different dpi.

The program takes the following parameters:
1. imageWidth: The number of pixels per line; and the text strings will be
   wrapped accordingly.
2. textName: The description of the text string, e.g. "recovery_erasing",
   "recovery_installing_security"
3. fontDirectory: The directory that contains all the support .ttf | .ttc
   files, e.g. $OUT/system/fonts/
4. resourceDirectory: The resource directory that contains all the translated
   strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/
5. outputFilename: Path to the generated image.

Bug: 74397117
Test: checks the generated png files
Change-Id: Ia5506a0a4f5da1ebfd7090345eb246f44b265075
2018-10-12 15:46:32 -07:00
Tianjie Xu 2abdf36034 Merge "Add function to load the key from x509.pem file" am: ff89e0004f am: 3e4e6b3d68
am: 403356117f

Change-Id: I74d691139565289136b49c72f143726a1d4180ba
2018-10-12 13:52:00 -07:00
Tianjie Xu 403356117f Merge "Add function to load the key from x509.pem file" am: ff89e0004f
am: 3e4e6b3d68

Change-Id: I561b492224b311a09054329697e60111be35308b
2018-10-12 13:46:55 -07:00
Tianjie Xu 3e4e6b3d68 Merge "Add function to load the key from x509.pem file"
am: ff89e0004f

Change-Id: I65c130a44de44406fc53e7480c186859ba6ce048
2018-10-12 13:40:17 -07:00
Tianjie Xu ff89e0004f Merge "Add function to load the key from x509.pem file" 2018-10-12 20:24:48 +00:00
Tianjie Xu 8256698023 Add function to load the key from x509.pem file
We used to convert a pem certificate file to some intermediate plain
text format; and parse that format under recovery mode. This is
uncessary since the x509.pem can be directly parsed with openssl
functions.

Add the function to load the public key from one x509.pem file and
corresponding unit tests. And we will add more cls to extract the pem
files from otacert.zip later.

Bug: 116655889
Test: verify package with 5 supported certficate versions
Change-Id: Ibc6c696c534567f005db75143cc4ef8d4bdea6a0
2018-10-12 11:12:08 -07:00
Mark Salyzyn 28f34187b1 Merge "recovery: deprecate check for ro.build.system_root_image" am: a67e9424c3 am: 9320e18f5d
am: 0d9e379cd6

Change-Id: Ie7260bca94dd39ffd8fb41214767eb702b93cb22
2018-10-11 12:30:26 -07:00
Mark Salyzyn 0d9e379cd6 Merge "recovery: deprecate check for ro.build.system_root_image" am: a67e9424c3
am: 9320e18f5d

Change-Id: Ie4ac93e57b0dad4e52fd9172375c3a158f33ca3f
2018-10-11 12:26:21 -07:00
Mark Salyzyn 9320e18f5d Merge "recovery: deprecate check for ro.build.system_root_image"
am: a67e9424c3

Change-Id: If63275e0112889b25668ad29b0429b4b3c27dfb2
2018-10-11 12:22:18 -07:00
Treehugger Robot a67e9424c3 Merge "recovery: deprecate check for ro.build.system_root_image" 2018-10-11 19:04:29 +00:00
Mark Salyzyn fdea242a91 recovery: deprecate check for ro.build.system_root_image
If there is a "/system" in the fstab, then can not be a
system as root image.

Test: compile
Bug: 109821005
Change-Id: I2c852dcbdcf6de437d39039937799feeef949516
2018-10-11 09:04:56 -07:00
Tom Cherry 10db3854bb Merge "Use only signed/unsigned numbers with ParseInt/ParseUint respectively" am: 1a4d234daa am: 70f3689a70
am: 5deab15122

Change-Id: I6e1521a74e85a67a99e101093d2dc7eaeb16a3b0
2018-10-07 10:57:55 -07:00
Tom Cherry 5deab15122 Merge "Use only signed/unsigned numbers with ParseInt/ParseUint respectively" am: 1a4d234daa
am: 70f3689a70

Change-Id: I81b1e5607314be9ddfc4cf9c49648bb6f7fd2374
2018-10-07 10:50:55 -07:00
Tom Cherry 70f3689a70 Merge "Use only signed/unsigned numbers with ParseInt/ParseUint respectively"
am: 1a4d234daa

Change-Id: I35a0d3de7dfafe382fbe203c3e7d74c1ea09ef26
2018-10-07 10:43:47 -07:00
Tom Cherry 1a4d234daa Merge "Use only signed/unsigned numbers with ParseInt/ParseUint respectively" 2018-10-07 17:31:34 +00:00
Tianjie Xu b803131b1c Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66-nyc-mr2-dev" into oc-dev am: 7f1b33e94c am: fc311bb706 am: 31e8b44c9e am: ad81bd64c2
am: edb3c69377

Change-Id: I6e14bd89de744560029346d18b2a2b1882f5cb95
2018-10-05 15:28:47 -07:00
Tianjie Xu 1686e4d31e Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66" into oc-dev am: 2c28ae3933 am: d142b28c2b am: a5860449c1 am: 3c46516f9e
am: 26d79bd03c

Change-Id: Ibc9b9c20f4ec1d35056bef47f98c9617bc42965a
2018-10-05 15:28:25 -07:00
Tianjie Xu da58cc8699 [automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: e830a51351 skipped: 244aba4412 skipped: 9216bccd16 skipped: 98acdb9fce skipped: bc42a6b0eb am: 35332d7c62 am: 6b13f89f15 am: 274945cb5b -s ours am: 71b2447163
am: 70d41c5181  -s ours

Change-Id: I1882cd594c7708753f88ca0bad6e026ec1cc498a
2018-10-05 15:27:35 -07:00
Tianjie Xu edb3c69377 Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66-nyc-mr2-dev" into oc-dev am: 7f1b33e94c am: fc311bb706 am: 31e8b44c9e
am: ad81bd64c2

Change-Id: Ib688e3650ec98e7ac8732b4b98ef732dda19ff9c
2018-10-05 15:24:28 -07:00
Tianjie Xu 26d79bd03c Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66" into oc-dev am: 2c28ae3933 am: d142b28c2b am: a5860449c1
am: 3c46516f9e

Change-Id: I814a8a8b52084dcbcfefa5960a827a3d43fb7f54
2018-10-05 15:24:08 -07:00
Tianjie Xu 70d41c5181 [automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: e830a51351 skipped: 244aba4412 skipped: 9216bccd16 skipped: 98acdb9fce skipped: bc42a6b0eb am: 35332d7c62 am: 6b13f89f15 am: 274945cb5b -s ours
am: 71b2447163

Change-Id: I4c58e2c29d3d791f91bfd1aee91b5571d8fe9de9
2018-10-05 15:23:45 -07:00
Tianjie Xu ad81bd64c2 Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66-nyc-mr2-dev" into oc-dev am: 7f1b33e94c am: fc311bb706
am: 31e8b44c9e

Change-Id: Ic5ced424323e58fe3f76651062f31ec158ae6805
2018-10-05 15:19:10 -07:00
Tianjie Xu 05e142c753 Merge "Compare the fingerprint before reading the partition" am: 81da8b12d2 am: 1cfe8098ba
am: 0f635dd33f

Change-Id: I63a8ef4992b0439f25f60fb3a700b08cd611fb08
2018-10-05 15:19:01 -07:00
Tianjie Xu 3c46516f9e Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66" into oc-dev am: 2c28ae3933 am: d142b28c2b
am: a5860449c1

Change-Id: Ic2735740442410b5246eef6de3481b933f725416
2018-10-05 15:18:52 -07:00
Tianjie Xu 71b2447163 [automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: e830a51351 skipped: 244aba4412 skipped: 9216bccd16 skipped: 98acdb9fce skipped: bc42a6b0eb am: 35332d7c62 am: 6b13f89f15
am: 274945cb5b  -s ours

Change-Id: Ic5569d0abf7674ca5bee1b3df01170e69b6a0c1d
2018-10-05 15:18:31 -07:00
Tianjie Xu 31e8b44c9e Merge changes from topic "am-88276146-0d74-467c-8b81-8d471d84ce66-nyc-mr2-dev" into oc-dev am: 7f1b33e94c
am: fc311bb706

Change-Id: I224a6d281299afecbd3503270771d6fe3bfa4fe5
2018-10-05 15:14:12 -07:00
Tianjie Xu 0f635dd33f Merge "Compare the fingerprint before reading the partition" am: 81da8b12d2
am: 1cfe8098ba

Change-Id: Ic85d382111f5d2d5c80f55d71b477a2083a394d4
2018-10-05 15:13:57 -07:00