Commit Graph

3 Commits

Author SHA1 Message Date
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
lishutong
9a06a92a35 Add support to analyse the disk usage by file extensions.
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
2021-07-09 18:25:23 +00:00
lishutong
9a5b57e68d Seperate the ota_analysis from OTAgui.
The default entry point is /analyseOTA in production enviroment. This is
for the deployment on android.github.io/.

Test: Mannual tested.
Change-Id: Ic77277024b34b67b9964be8cf4f1592cebf5c5e8
2021-07-08 16:05:13 +00:00