Commit Graph

3649 Commits

Author SHA1 Message Date
Treehugger Robot
85501ae6e5 Merge "Add test to target_lib.py." am: f73c0f6138 am: 7a75be2c8b
Original change: https://android-review.googlesource.com/c/platform/development/+/1795808

Change-Id: I1358d1b24ed898cca973d5338df9cf157e8074b0
2021-08-17 17:53:28 +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
7c66bb6542 Merge "Fix a bug where small manifest isn't read" am: 62582263a2 am: 6750cd8b02 am: d5764b5753 am: b6debb366b
Original change: https://android-review.googlesource.com/c/platform/development/+/1792911

Change-Id: I4c5299137aa29476784277a6f437fb420f3a63bc
2021-08-12 19:02:08 +00:00
Treehugger Robot
76559b2f42 Merge "Add test to ota_interface.ProcessManagement." am: 4a5ee938da am: 85e6dea009 am: 3a894fb3c2 am: ebc318c424
Original change: https://android-review.googlesource.com/c/platform/development/+/1793173

Change-Id: Ie6c7923a1e76c3c60119364b4e07c5a903ec5548
2021-08-12 18:55:39 +00:00
Kelvin Zhang
d5764b5753 Merge "Fix a bug where small manifest isn't read" am: 62582263a2 am: 6750cd8b02
Original change: https://android-review.googlesource.com/c/platform/development/+/1792911

Change-Id: If724cf9d9bad6143f0534b5cf5512b5b9f5a23be
2021-08-12 18:32:03 +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
3a894fb3c2 Merge "Add test to ota_interface.ProcessManagement." am: 4a5ee938da am: 85e6dea009
Original change: https://android-review.googlesource.com/c/platform/development/+/1793173

Change-Id: Iae4640fecea1f175dcc730c701c9cc26ded68f46
2021-08-12 17:15:09 +00:00
Treehugger Robot
e6a368c75f Merge "Add test to ota_interface.JobInfo." am: ba7d668e84 am: 42f7ba7bc8 am: 307faa3b5f am: 4535d298e4
Original change: https://android-review.googlesource.com/c/platform/development/+/1793172

Change-Id: I06465fd059ee4d88cea3a01b19edbb575abd3176
2021-08-12 15:21:04 +00:00
Treehugger Robot
307faa3b5f Merge "Add test to ota_interface.JobInfo." am: ba7d668e84 am: 42f7ba7bc8
Original change: https://android-review.googlesource.com/c/platform/development/+/1793172

Change-Id: Ia252d6871d21fcf010fe10db477ceb8f99d6be06
2021-08-12 14:24:21 +00:00
Treehugger Robot
4537095627 Merge changes I8449eea7,I24666871 am: 5d8768f2ca am: 303ca2baa8 am: 4bb39c56da am: 28af1c725d
Original change: https://android-review.googlesource.com/c/platform/development/+/1793171

Change-Id: I81e3fd1198482b50508403673a7006121a622907
2021-08-12 01:54:12 +00: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
b2a999a3b3 Merge "Remove security vulnerability" am: 5f35ae5858 am: 966db3f188 am: 47bb7481cb am: 7c128d370d
Original change: https://android-review.googlesource.com/c/platform/development/+/1783572

Change-Id: I3cfded1c87b580d68e034ae36c1a69cf892c40d9
2021-08-09 21:29:03 +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
dee472fe75 Merge changes Ib6be1671,I08c5ab16 am: 1ca6a33b31 am: 967df69e84 am: 59259d215e am: 7c343e3963
Original change: https://android-review.googlesource.com/c/platform/development/+/1790887

Change-Id: Ia9a6e01d56f01e77291412c6514e52b8501f8cf5
2021-08-09 20:14:31 +00:00
Treehugger Robot
8de63e0471 Merge "Add support for non-A/B OTA package in OTA_analysis." am: cda807f661 am: d8c5ba7abf am: 7c9b9303c3 am: 833dfb8243
Original change: https://android-review.googlesource.com/c/platform/development/+/1784649

Change-Id: I2b9ee93bdd573911cb6bab2f4bce04391fd1f8ce
2021-08-09 20:14:13 +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
Nataniel Borges
c1ef16bdd7 [DO NOT MERGE] Full - Compatibilize winscope with master am: f230a13f30
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/15405632

Change-Id: Ibcb4d582e1becc78a228b934f0f2591c97b3ddf4
2021-07-30 14:54:34 +00:00
Kelvin Zhang
630328e5f0 Merge "Support docker for ota generator" am: 091a8fb955 am: d2f6d63acd am: 7c43b85a08
Original change: https://android-review.googlesource.com/c/platform/development/+/1780768

Change-Id: Ifcd34220ce47ffaba25c8fa91f33dc11ad63ac6a
2021-07-29 13:34:18 +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
562c9f6ba8 Merge "Speed up the payload.bin read in process." am: 1a86d98b6e am: 261de8cf63 am: d60a7bf334
Original change: https://android-review.googlesource.com/c/platform/development/+/1777971

Change-Id: I2b0859351eae1fe3d5e5b88d8f229b4dfb11d2f6
2021-07-29 02:17:16 +00: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
6030866ba7 Merge "Fix a compatibility issue: getBigUint64." am: 74232e7a3f am: 2daf325668 am: 97c97755ba
Original change: https://android-review.googlesource.com/c/platform/development/+/1781348

Change-Id: Ib2e718f45ed0087ddd7b990fd7c1d8ede1fb62a5
2021-07-28 22:29:40 +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
Treehugger Robot
f3510f9a09 Merge changes I36beff43,Iab7275b9 am: 503e12a866 am: 4d21078ab9 am: e71ef39842
Original change: https://android-review.googlesource.com/c/platform/development/+/1781347

Change-Id: I2ec3798e17b285a94a6462f8ff32e1f2c6d924af
2021-07-28 20:34:48 +00:00
Treehugger Robot
7d4570f234 Merge "Add prebuild and postbuild info to OTA_analysis." am: afcbcc7149 am: 2b8dd5e2b4 am: 49da6642eb
Original change: https://android-review.googlesource.com/c/platform/development/+/1779885

Change-Id: Ice2dc514981ea936f4773bfa398922dec025bdcc
2021-07-28 20:34: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
Treehugger Robot
49da6642eb Merge "Add prebuild and postbuild info to OTA_analysis." am: afcbcc7149 am: 2b8dd5e2b4
Original change: https://android-review.googlesource.com/c/platform/development/+/1779885

Change-Id: I12447e612c6e8191feadf72482a9edf8aefadd1b
2021-07-28 20:10:43 +00:00
lishutong
30f991bf6e Fix a bug: redirect to homepage for some url.
In a single page application, the url sometimes does not correspond to
the actual resources on the server. Thus, it might cause 404 when users
refresh the page. By redirecting this kind of url back to the homepage,
the proper page can be rendered. If the url does not exist, the front
end will redirect to a Not Found page.

Test: mannual tested.
Change-Id: I36beff436a450ae7fcabe9172df9c7cc217d7305
2021-07-28 18:14:35 +00:00
lishutong
c4b3dd1aef Fix a bug: multiple flags in ota generator.
Previously, when multiple extra flags are set, the subprocess.run
can start generation properly. Now this is fixed.

Test: mannual tested.
Change-Id: Iab7275b9058a088d1fafd8c445c7f0775626c1ba
2021-07-28 17:51:31 +00:00
lishutong
ad6b75df3d Add prebuild and postbuild info to OTA_analysis.
The metadata file in ota package contains prebuild and postbuild info,
now the basic info section will display those.

Test: mannual tested.
Change-Id: I264fe656ff6fab42d5161100c04210ab9a94c7a0
2021-07-28 17:51:29 +00:00
Nataniel Borges
f230a13f30 [DO NOT MERGE] Full - Compatibilize winscope with master
Bug: 194813677
Test: none
Change-Id: Ie55429dcb746f597f80dfdaa68cbef19f5820005
2021-07-28 07:30:10 +00:00
Treehugger Robot
5749a89bc8 Merge changes I5801bcc3,Ib2290546 am: 1584123dbb am: 9bca36aeee am: 235a534f1b
Original change: https://android-review.googlesource.com/c/platform/development/+/1779346

Change-Id: I88595702a3dbba37e1b2f861c63bbae34aeb61b7
2021-07-27 14:42:25 +00:00
Treehugger Robot
235a534f1b Merge changes I5801bcc3,Ib2290546 am: 1584123dbb am: 9bca36aeee
Original change: https://android-review.googlesource.com/c/platform/development/+/1779346

Change-Id: I158327aac40b17d516c7a721dadd788e85ae63d9
2021-07-27 14:23:45 +00:00
lishutong
2232234d48 Remove the look behind regex for Safari.
The lookbehind/lookahead regular expression is not supported in safari
yet. (https://caniuse.com/js-regexp-lookbehind) Removed it for
compatibility reason.

Test: manual tested.
Change-Id: I5801bcc389b20df31175adbb8a841eb1d31703aa
2021-07-27 03:40:33 +00:00
lishutong
a3c85492cc Change the url to lowercase.
Test: mannual tested.
Change-Id: Ib22905462aa47aeaa700407fe5b90e3261d0b3a3
2021-07-27 03:33:48 +00:00
Treehugger Robot
c0188deceb Merge "Add a demo page in OTA_analyzer." am: ceadd4cff1 am: 4c11f8c6e0 am: 0a461d9383
Original change: https://android-review.googlesource.com/c/platform/development/+/1778765

Change-Id: I3c5b262dc3622c0c83835dd9c9f8e73d4b1455bf
2021-07-26 21:32:55 +00:00