Commit Graph

3570 Commits

Author SHA1 Message Date
Colin Cross
f6d57ace26 Remove checked in mkstubs .idea directory
Bug: 210509169
Test: treehugger
Change-Id: Ia8cdae9a518abf4107928075447498edfe20d5c4
2021-12-13 20:14:31 -08:00
Dan Willemsen
17df46e334 Add Android.bp-based definitions for host sdk-repos
So that these can be built independently from the large sdk zip. The old
Make-based implementation created this as part of the large sdk zip,
then extracted it from that zip file.

This topic only adds the new definitions under a different filename,
full replacement will come in a follow-on CL.

Once we fully transitions to this mechanism, we'll be able to turn down
most modules on Macs, only building these and their dependencies.

Bug: 187222815
Change-Id: If6be8dd573a323ef8b343bc86116ffa3d43922a5
2021-10-12 20:45:15 -07:00
Rob Seymour
7264da3b42 Merge "Extend gerrit query to handle all changes in a topic." am: 8c58225807
Original change: https://android-review.googlesource.com/c/platform/development/+/1828152

Change-Id: I75c72015208ec6a5c003bf64a78ad29e103295a7
2021-09-23 21:33:06 +00:00
Rob Seymour
8c58225807 Merge "Extend gerrit query to handle all changes in a topic." 2021-09-23 21:18:04 +00:00
Rob Seymour
7f265b92fa Extend gerrit query to handle all changes in a topic.
Handle _more_changes property to download all changes in a query
Add multiple print formats (JSON, oneline) to gerrit.py  CLI

Bug: 200079625
Test: gerrit.py
Test: gerrit.py --verbose
Test: gerrit.py --start 10 --limits 10
Test: gerrity.py --start 50000 // Validate bad start index
Test: repo_review.py  // Validate Change Lists: returned
Test: repo_patch.py   // Validate patch created for all changes
Test: repo_pull.py bash // Validate commands exists for all changes
Change-Id: I532eb2f709aff29cf9c8ff7fc428d53b5c607101
2021-09-23 19:26:13 +00:00
Kelvin Zhang
8834603a01 Merge changes Ic5fdefe2,I32cbd027,I464d846c,Ie9ef8e2b,Ib7b02d5c am: e6ae7c629b
Original change: https://android-review.googlesource.com/c/platform/development/+/1815621

Change-Id: I18cc97ec071980725514785aafdd7927821410b8
2021-09-01 14:34:23 +00:00
Kelvin Zhang
b1da09b852 Merge "Cancel polling task after component unmount" am: 3862d22d0e
Original change: https://android-review.googlesource.com/c/platform/development/+/1815616

Change-Id: If897bc469c04123262e67807e05f74fdc5a50ac0
2021-09-01 14:34:12 +00:00
Kelvin Zhang
5e1f196247 Merge "Remove noop try catch statements" am: 401c6d5d23
Original change: https://android-review.googlesource.com/c/platform/development/+/1815095

Change-Id: I6c5c988fb833d75cf03359267db6bbce049319fa
2021-09-01 14:34:06 +00:00
Kelvin Zhang
6e0c8c6c37 API Service should return json data directly
Change-Id: Ic5fdefe23443733c3c7e0ae8f351c39117326794
2021-08-31 20:06:57 -07:00
Kelvin Zhang
985259187a Merge "Skip non-zip files when refreshing build library" am: 2d4909a1cb
Original change: https://android-review.googlesource.com/c/platform/development/+/1811897

Change-Id: I376dbf4d7cf672a7d64419b6cfae634b5b66c91e
2021-09-01 00:37:19 +00:00
Kelvin Zhang
fd50cb8be1 Rename path to db_path
Change-Id: I32cbd02722a81b54f55df092bc762463df939a9d
2021-08-31 17:28:43 -07:00
Kelvin Zhang
d7ebc10c0d Cancel polling task after component unmount
Test: th
Change-Id: I0d9058bd24236ea1e22bf91f98b2dbadc83cf8d3
2021-08-31 17:28:42 -07:00
Kelvin Zhang
694daa581f Remove noop try catch statements
Test: th
Change-Id: I5c6fcd5cdd602207e3befc3ff92137d39968c546
2021-08-31 17:28:42 -07:00
Kelvin Zhang
fd33874a47 Ignore vscode files in docker
Change-Id: I464d846c86a6c98c4be2e1993014a799ffc5d7b1
2021-08-31 17:28:42 -07:00
Kelvin Zhang
9b854aa4bf Return error in json
Test: th
Change-Id: Ie9ef8e2bac6447bdc1bf40dcb2b5731b57b47f77
2021-08-31 17:28:42 -07:00
Kelvin Zhang
2ea0bfceb0 Delegate choice of output file path to 1 place in code
Test: th
Change-Id: Ib7b02d5ce4335594b6ca625d850e7176dbdb4f8e
2021-08-31 17:28:42 -07:00
Treehugger Robot
cb2bd4fb80 Merge "Stop hardcoding a keypath in OTA generator" am: f1a77506eb
Original change: https://android-review.googlesource.com/c/platform/development/+/1811896

Change-Id: I1fb1e796e10ed5b31a210375c1707721735fa856
2021-08-30 18:33:13 +00:00
Kelvin Zhang
4993e35acf Skip non-zip files when refreshing build library
Test: th
Change-Id: I16631183c40136c4603f20e2ea07664123338da4
2021-08-27 10:53:50 -07:00
Kelvin Zhang
157e46b183 Stop hardcoding a keypath in OTA generator
Test: th
Change-Id: I6f55a36e4559d635bd6cf24fa0b4891ccd2ab9f8
2021-08-27 10:53:23 -07:00
Treehugger Robot
4976675e9a Merge "Add support for reuse configuration in OTA generator." am: 097e8c0a15
Original change: https://android-review.googlesource.com/c/platform/development/+/1802616

Change-Id: Idb3bc4cbff66d8bd9c410cf5225bb9c1f7dac04a
2021-08-19 21:01:12 +00:00
Treehugger Robot
097e8c0a15 Merge "Add support for reuse configuration in OTA generator." 2021-08-19 20:45:53 +00:00
Treehugger Robot
e3d4db13a7 Merge "Fix a bug that may cause the ota generation fail." am: 54f24641bc
Original change: https://android-review.googlesource.com/c/platform/development/+/1801907

Change-Id: I9f74bd1fd9422116d4fe6726b4d34585c5f84cdf
2021-08-19 16:51:53 +00:00
lishutong
1ec526c9a0 Add support for reuse configuration in OTA generator.
Use vuex to store the otaConfig, now the history configurations can be
reused in the job detail page. Also the targetBuilds, incrementalSources
are not stored in vuex as well. Once the targetBuilds are chosen, it
will not lose the states when switching the tab between singleOTA,
batchOTA and chainOTA.

Test: npm run test:unit
Change-Id: I563ac0c79fd0cedd5e71e8722b956545f6624551
2021-08-19 16:34:09 +00:00
lishutong
e8c8d88b8c Fix a bug that may cause the ota generation fail.
The extra space in args['extra'] may cause the ota generation fail.

Test: python test_ota_interface.py -v
Change-Id: Iac6d06a89c52ab7554e54c08e5e04496b3da730a
2021-08-19 15:32:38 +00:00
Treehugger Robot
5b72622eba Merge "Add test to the MapParser class in OTA_analyzer." am: 571c6e4ecb
Original change: https://android-review.googlesource.com/c/platform/development/+/1800267

Change-Id: I12f9c1334b7e1b042b745a383a5facd20eb71d96
2021-08-18 19:11:55 +00:00
lishutong
fce8266b7e Add test to the MapParser class in OTA_analyzer.
Add unit test to the MapParser class in map_parser.js. Please refer to
this CL for the original class definition:

https://android-review.googlesource.com/c/platform/development/+/1760909

Test: npm run test:unit
Change-Id: I2d640e9c5e27c0a012e32b4be09348034b67b235
2021-08-18 16:06:32 +00:00
Xin Li
4e9b8886c5 Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master 2021-08-17 18:14:19 +00:00
lishutong
54071681c8 Add test to target_lib.py.
Add test to two classes: BuildInfo and TargetLib. BuildInfo is a
dataclass which can store and parse Android Build informations from an
OTA package. TargetLib is a database interface which can be used to
store and extract BuildInfo.

Please refer to this CL for more details of these two classes:
https://android-review.googlesource.com/c/platform/development/+/1735315

Test: python test_target_lib.py -v
Change-Id: I3b2143af7f3708207b6c53744d903d3dcee92d55
2021-08-17 15:31:28 +00:00
Xin Li
f631d20429 Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: I815ef03c93bec8be2340dc340d840895f47ecafe
Change-Id: I2f6316055af5cb77c66ff2a741a2d37db3d1691a
2021-08-14 06:31:09 +00:00
Kelvin Zhang
c05d0bd37c Fix a bug where small manifest isn't read
If a single read request contains the entire manifest, we will return
right after prefixLength is computed, and the UI just hangs there.

Test: load a small OTA pkg
Change-Id: Idb93fdba103f9c6e7b14974b45d1aecdb2ae9168
2021-08-12 10:32:07 -07:00
Treehugger Robot
4bb39c56da Merge changes I8449eea7,I24666871 am: 5d8768f2ca am: 303ca2baa8
Original change: https://android-review.googlesource.com/c/platform/development/+/1793171

Change-Id: I815ef03c93bec8be2340dc340d840895f47ecafe
2021-08-12 01:16:26 +00:00
lishutong
70026190c6 Add test to ota_interface.ProcessManagement.
The ProcessManagement helps initiate OTA generation processes and
monitor those processes. Add some test and comments to this class.
Please refer to:
https://android-review.googlesource.com/c/platform/development/+/1736940
for more details.

Test: python test_ota_interface.py -v
Change-Id: Ib22fca4c5a670f8b55db8a4175fef16d92eaceaf
2021-08-12 00:44:42 +00:00
lishutong
1e82f06150 Add test to ota_interface.JobInfo.
Add testcases for ota_interface.JobInfo, which is used as object to
store task information and serve/read data to/from database.
Refer to:
https://android-review.googlesource.com/c/platform/development/+/1736940
for more details.

Test: python test_ota_interface.py -v
Change-Id: I74dcb16390078bd9258da490e21cb2b73dd78e81
2021-08-11 20:45:23 +00:00
lishutong
ec3b42deea Fix a small bug when initialize a ota generation.
The os.path.join() will bring in an unwanted backslash.

Test: Tested by starting a new OTA generation process by calling
ota_interface.ota_generate directly.
Test: python test_ota_interface.py -v

Change-Id: I8449eea79303f5aff5188176538eca1291101dff
2021-08-11 20:24:55 +00:00
lishutong
400253b224 Add jest to dependency.
Jest is a JavaScript test framework. Test-utils is used to test vue
components.

No-Typo-Check: auto-generated artifacts

Test: npm run test.
Change-Id: I2466687120b96a3a393299d127c6d7e1f15204e7
2021-08-11 20:24:55 +00:00
Scott Lobdell
47bb7481cb Merge "Remove security vulnerability" am: 5f35ae5858 am: 966db3f188
Original change: https://android-review.googlesource.com/c/platform/development/+/1783572

Change-Id: I2436d03d3c49bc5aae053822f5548b8241c24738
2021-08-09 21:04:44 +00:00
Scott Lobdell
5f35ae5858 Merge "Remove security vulnerability" 2021-08-09 20:32:01 +00:00
Treehugger Robot
59259d215e Merge changes Ib6be1671,I08c5ab16 am: 1ca6a33b31 am: 967df69e84
Original change: https://android-review.googlesource.com/c/platform/development/+/1790887

Change-Id: I43a2f60567c797b134ef1e2bae394eb303c0c156
2021-08-09 19:42:04 +00:00
Treehugger Robot
7c9b9303c3 Merge "Add support for non-A/B OTA package in OTA_analysis." am: cda807f661 am: d8c5ba7abf
Original change: https://android-review.googlesource.com/c/platform/development/+/1784649

Change-Id: Ia596d71f59c1e874abc42bed35098e15580b1f14
2021-08-09 19:41:59 +00:00
lishutong
b9b565edb6 Add hint when user is using non-A/B OTA.
Disable the 'Analyse COW operation' button and add a tooltip 'This is
only supported in A/B OTA'.

Test: tested by non-A/B OTA package.
Change-Id: Ib6be1671f9106ee7e332cd2d0937c666a912a26e
2021-08-09 16:26:16 +00:00
lishutong
a00eafc419 Add support for move, bsdiff, imgdiff to OTA analyzer.
Now the OTA analyzer could properly parse the installation operations
like move, bsdiff, imgdiff in non-A/B packages. It still cannot properly
parse the stash and free operations. Which means any operation involve
stash-id cannot be parsed properly.

Test: tested by a non-A/B incremental OTA package.
Change-Id: I08c5ab162e8ed62ea3313ec53b4fa4577a28799a
2021-08-09 16:16:15 +00:00
lishutong
5bf9ad0eed Add support for non-A/B OTA package in OTA_analysis.
The non-A/B OTA package has a very different file system compared with
an OTA package. However, our OTA_analysis tool is based on the
update_metadata.proto. What we do here is try to convert the non-A/B OTA
package information, into a standard update_metadata.proto formated
manifest. The format and how the conversion works can be found in this
document:
https://docs.google.com/document/d/e/2PACX-1vRwMRodq4TCvTPEmlU6KL9vPSeFmEJjVXzq4PHhrB8tGy6oHFDJGCk3bIDA5Uv-4UEP0stLarBlhl2c/pub

In this CL, most of the information is successfully parsed, except
installation ops like stash, free, bsdiff, imgdiff, move. (anything
related to stash is not yet implemented)

Test: test by selecting a non-A/B OTA package.
Change-Id: I298f238395478422daece47cedbaa52a976d9f4c
2021-08-09 16:16:14 +00:00
Scott Lobdell
ff697a3f3a Remove security vulnerability
Bug: 193812251
Change-Id: I891cbf808791696566b01115e997cc29cba3e3e8
2021-08-02 19:31:45 +00:00
Kelvin Zhang
7c43b85a08 Merge "Support docker for ota generator" am: 091a8fb955 am: d2f6d63acd
Original change: https://android-review.googlesource.com/c/platform/development/+/1780768

Change-Id: Ie625a23636a1c9a58d31ac37bbe2f285d00ef671
2021-07-29 13:22:08 +00:00
Kelvin Zhang
d689350756 Support docker for ota generator
Test: docker run -it -p 8000:8000 -v target:/app/target -v
output:/app/output zhangxp1998/test:latest

Change-Id: Ife050e6a8c85f2d40aff82a752b19f27c2ab23c5
2021-07-28 22:44:34 -04:00
Treehugger Robot
d60a7bf334 Merge "Speed up the payload.bin read in process." am: 1a86d98b6e am: 261de8cf63
Original change: https://android-review.googlesource.com/c/platform/development/+/1777971

Change-Id: Id3330ed4f450df68740ff88feff51c35e37ab1c1
2021-07-29 02:03:36 +00:00
Kelvin Zhang
e5eb5c9d38 Speed up the payload.bin read in process.
A 700MiB OTA package now takes only 100ms to read in, compared with
7000ms previously. That's 70x faster.

When parsing the update_metadata in payload.bin, the entire file has to
be read in previously, because zip.js does not support partial read-in.
In fact, only a small portion of the payload.bin is update_metadata.
Reading the entire payload.bin not only slows down the process but also
occupy excessive memory.

The new class OTAPayloadBlobWriter (inherited from zip.Writer) will read
in the metadata (header, manifest, signature) and throw an StopIteration
exception when finished.

Test: open a large OTA package
Change-Id: Iebf8045325dae9a118d9d8ea5674872aa7c280c4
2021-07-28 23:38:51 +00:00
Treehugger Robot
97c97755ba Merge "Fix a compatibility issue: getBigUint64." am: 74232e7a3f am: 2daf325668
Original change: https://android-review.googlesource.com/c/platform/development/+/1781348

Change-Id: I7ac345518e30dcc8cb7929e89518ab6b160b3442
2021-07-28 22:15:34 +00:00
lishutong
ff2b99cd89 Fix a compatibility issue: getBigUint64.
The method getBigUint64 is not supported by safari until version 15:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getBigUint64
This CL mannual reload this method.

Test: Mannual tested.
Change-Id: I1d967eda93f9f628fb7f0f5d9f90efb92429ed5e
2021-07-28 20:31:37 +00:00
Treehugger Robot
e71ef39842 Merge changes I36beff43,Iab7275b9 am: 503e12a866 am: 4d21078ab9
Original change: https://android-review.googlesource.com/c/platform/development/+/1781347

Change-Id: Ibc02cc4e8879b290f5826f691a21f8bf400cb291
2021-07-28 20:10:50 +00:00