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
102 lines
2.0 KiB
Vue
102 lines
2.0 KiB
Vue
<template>
|
|
<h4> {{ partition.partitionName }} </h4>
|
|
<p v-if="partition.estimateCowSize">
|
|
<strong> Estimate COW Size: </strong> {{ partition.estimateCowSize }} Bytes
|
|
</p>
|
|
<div
|
|
class="toggle"
|
|
@click="toggle('showInfo')"
|
|
>
|
|
<h4> Partition Infos </h4>
|
|
<ul v-if="showInfo">
|
|
<li v-if="partition.oldPartitionInfo">
|
|
<strong>
|
|
Old Partition Size:
|
|
</strong>
|
|
{{ partition.oldPartitionInfo.size }} Bytes
|
|
</li>
|
|
<li v-if="partition.oldPartitionInfo">
|
|
<strong>
|
|
Old Partition Hash:
|
|
</strong>
|
|
{{ octToHex(partition.oldPartitionInfo.hash, false, 16) }}
|
|
</li>
|
|
<li>
|
|
<strong>
|
|
New Partition Size:
|
|
</strong>
|
|
{{ partition.newPartitionInfo.size }} Bytes
|
|
</li>
|
|
<li v-if="partition.newPartitionInfo.hash">
|
|
<strong>
|
|
New Partition Hash:
|
|
</strong>
|
|
{{ octToHex(partition.newPartitionInfo.hash, false, 16) }}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div
|
|
class="toggle"
|
|
@click="toggle('showOPs')"
|
|
>
|
|
<h4> Total Operations: {{ partition.operations.length }} </h4>
|
|
<ul
|
|
v-if="showOPs"
|
|
>
|
|
<li
|
|
v-for="operation in partition.operations"
|
|
:key="operation.dataSha256Hash"
|
|
>
|
|
<OperationDetail
|
|
:operation="operation"
|
|
:mapType="opType.mapType"
|
|
/>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { OpType, octToHex } from '@/services/payload.js'
|
|
import OperationDetail from '@/components/OperationDetail.vue'
|
|
|
|
export default {
|
|
components: {
|
|
OperationDetail,
|
|
},
|
|
props: {
|
|
partition: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
showOPs: false,
|
|
showInfo: false,
|
|
opType: null,
|
|
}
|
|
},
|
|
created() {
|
|
this.opType = new OpType()
|
|
},
|
|
methods: {
|
|
toggle(key) {
|
|
this[key] = !this[key]
|
|
},
|
|
octToHex: octToHex,
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.toggle {
|
|
display: block;
|
|
cursor: pointer;
|
|
color: #762ace;
|
|
}
|
|
|
|
li {
|
|
list-style-type: none;
|
|
}
|
|
</style> |