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
This commit is contained in:
@@ -34,7 +34,7 @@ export function operatedBlockStatistics(partitions) {
|
||||
let /** OpType */ opType = new OpType()
|
||||
for (let partition of partitions) {
|
||||
for (let operation of partition.operations) {
|
||||
let operationType = opType.mapType.get(operation.type)
|
||||
let operationType = opType.mapType.getWithDefault(operation.type)
|
||||
addNumberToMap(
|
||||
operatedBlocks,
|
||||
operationType,
|
||||
@@ -50,7 +50,7 @@ export function mergeOperationStatistics(partitions, blockSize) {
|
||||
let /** Number */ totalBlocks = 0
|
||||
for (let partition of partitions) {
|
||||
for (let operation of partition.mergeOperations) {
|
||||
let operationType = opType.mapType.get(operation.type)
|
||||
let operationType = opType.mapType.getWithDefault(operation.type)
|
||||
addNumberToMap(
|
||||
mergeOperations,
|
||||
operationType,
|
||||
@@ -79,7 +79,7 @@ export function operatedPayloadStatistics(partitions) {
|
||||
let /** OpType */ opType = new OpType()
|
||||
for (let partition of partitions) {
|
||||
for (let operation of partition.operations) {
|
||||
let operationType = opType.mapType.get(operation.type)
|
||||
let operationType = opType.mapType.getWithDefault(operation.type)
|
||||
addNumberToMap(
|
||||
operatedBlocks,
|
||||
operationType,
|
||||
|
||||
Reference in New Issue
Block a user