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
118 lines
2.5 KiB
Vue
118 lines
2.5 KiB
Vue
<template>
|
|
<h3>Basic infos</h3>
|
|
<div
|
|
v-if="zipFile"
|
|
v-bind="$attrs"
|
|
>
|
|
<ul class="align">
|
|
<li><strong> File name </strong> {{ zipFile.name }}</li>
|
|
<li><strong> File size </strong> {{ zipFile.size }} Bytes</li>
|
|
<li>
|
|
<strong> File last modified date </strong>
|
|
{{ zipFile.lastModifiedDate }}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div
|
|
v-if="payload && payload.metadata"
|
|
v-bind="$attrs"
|
|
>
|
|
<ul class="align">
|
|
<li
|
|
v-for="formatter in MetadataFormat"
|
|
:key="formatter.name"
|
|
>
|
|
<strong> {{ formatter.name }} </strong>
|
|
<p class="wrap">
|
|
{{ String(payload[formatter.key]) }}
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div v-if="payload && payload.manifest">
|
|
<ul class="align">
|
|
<li>
|
|
<strong> Incremental </strong>
|
|
<!-- Check if the first partition is incremental or not -->
|
|
<span v-if="payload.preBuild">
|
|
✅
|
|
</span>
|
|
<span v-else> ❌ </span>
|
|
</li>
|
|
<li>
|
|
<strong> Partial </strong>
|
|
<span v-if="payload.manifest.partialUpdate"> ✅ </span>
|
|
<span v-else> ❌ </span>
|
|
</li>
|
|
<li>
|
|
<strong> A/B update </strong>
|
|
<span v-if="!payload.manifest.nonAB">
|
|
✅
|
|
</span>
|
|
<span v-else> ❌ </span>
|
|
</li>
|
|
<li>
|
|
<strong> VAB </strong>
|
|
<span v-if="payload.manifest.dynamicPartitionMetadata.snapshotEnabled">
|
|
✅
|
|
</span>
|
|
<span v-else> ❌ </span>
|
|
</li>
|
|
<li>
|
|
<strong> VABC </strong>
|
|
<span v-if="payload.manifest.dynamicPartitionMetadata.vabcEnabled">
|
|
✅
|
|
</span>
|
|
<span v-else> ❌ </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { Payload, MetadataFormat } from '@/services/payload.js'
|
|
|
|
export default {
|
|
props: {
|
|
zipFile: {
|
|
type: File,
|
|
required: true,
|
|
},
|
|
payload: {
|
|
type: Payload,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
MetadataFormat
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.align strong {
|
|
display: inline-block;
|
|
width: 50%;
|
|
position: relative;
|
|
padding-right: 10px; /* Ensures colon does not overlay the text */
|
|
text-align: right;
|
|
}
|
|
|
|
.align strong::after {
|
|
content: ':';
|
|
}
|
|
|
|
li {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.wrap {
|
|
width: 50%;
|
|
display: inline-block;
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
font-family: inherit;
|
|
}
|
|
</style> |