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
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
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
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
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
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
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
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
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
Please put an ota package and its target build as cf_x86_demo.zip and
cf_x86_target_file_demo into this directory: /public/files/
This OTA package and target build do not have to be complete - only the
manifest part in OTA package and .map files in target build are
necessary. The previous one can be generated using:
https://source.corp.google.com/android/vendor/google_tradefederation/contrib/src/com/google/android/tradefed/ota/util/PayloadUtil.java;l=196;bpv=1;bpt=1?q=PayloadUtil&sq=package:android
The following one can be generated by unzip and keep the .map files
only, zip again.
Add a demo page, now the user can view the complete function of
OTA_analyzer without uploading their own ota packages / android build.
Test: Mannual tested.
Change-Id: I7552e0222fc40e9a4b1aff9750f74cd3ed3f4feb
Add BasicInfo.vue to show some basic facts of the ota package,
including:
- is partial or not
- is incremental or not
- is VAB or not
- is VABC or not
Test: Mannual tested.
Change-Id: Ibc3e0a88ea03fc310b401ffe14c5b63d9e0f9452
When there are too many data entries, the pie chart is too crowded to
view. So we set a parameter in the class EchartsData called
maximumEntries, only the top <maximumEntries> will be shown and the rest
will be added to a single entry called 'other'.
Test: mannual tested.
Change-Id: I84bfadd3513c5827426d84ee7d5ad957b1ac5eab
An Android AB OTA-package provide installation operations by their
operation types, block adresses and payloads. One cannot know which file
is being operated by an installation operation unless checking the .map
file in the target build.
Now, the OTA_analysis tool can analyse which file is being operated and
do statistics over the the filename extensions when provided the target
build. This is done by building a hashtable according to the .map file
in the target build, and then query this hashtable by the operated
blocks, which is defined in the OTA package.
In the future, we can use segment tree instead of hashtable for better
query performance.
Test: Mannual tested, unit test will be added in a seperate CL.
Change-Id: I150677ff81c79813ff13bf96b6401dac01e4e17a
The default entry point is /analyseOTA in production enviroment. This is
for the deployment on android.github.io/.
Test: Mannual tested.
Change-Id: Ic77277024b34b67b9964be8cf4f1592cebf5c5e8
Package.json is for npm and update_metadata_pb.js is generated from
protobufjs.
No-Typo-Check: auto-generated artifacts
Test: Mannual tested.
Change-Id: Id4808a26fb9c5b18d3ae0680a97045bee5d650b0