diff --git a/tools/ota_analysis/src/components/PayloadComposition.vue b/tools/ota_analysis/src/components/PayloadComposition.vue
index 5557c734c..376ff9b6a 100644
--- a/tools/ota_analysis/src/components/PayloadComposition.vue
+++ b/tools/ota_analysis/src/components/PayloadComposition.vue
@@ -35,6 +35,7 @@
Analyse COW Merge Operations
+
+ This function is only supported in A/B OTA
+
\ No newline at end of file
diff --git a/tools/ota_analysis/src/services/map_parser.js b/tools/ota_analysis/src/services/map_parser.js
index 37b1d1822..6bc16d0d0 100644
--- a/tools/ota_analysis/src/services/map_parser.js
+++ b/tools/ota_analysis/src/services/map_parser.js
@@ -115,5 +115,8 @@ function InsertMap(map, name, left, right) {
function queryMap(map, left, right) {
// Assuming the consecutive blocks belong to the same file
// Only the start block is queried here.
+ if (!map[left]) {
+ return 'unknown'
+ }
return map[left]
}
\ No newline at end of file
diff --git a/tools/ota_analysis/src/services/payload_nonab.js b/tools/ota_analysis/src/services/payload_nonab.js
index 5f43401a1..dd0769a7b 100644
--- a/tools/ota_analysis/src/services/payload_nonab.js
+++ b/tools/ota_analysis/src/services/payload_nonab.js
@@ -53,15 +53,20 @@ export class PayloadNonAB extends chromeos_update_engine.DeltaArchiveManifest{
* zero [rangeset] : fill zeros
* new [rangeset] : fill with new data from
* erase [rangeset] : mark given blocks as empty
- * move <...>
- * bsdiff <...>
- * imgdiff <...> :
+ * move <...>
+ * bsdiff <...>
+ * imgdiff <...> :
* Read the source blocks and apply (not for move op) to the target blocks
* stash : load the given source range to memory
* free : free the given
* format:
* [rangeset]: <# of pairs>, , , ...
* : a hex number with length of 40
+ * <...>: We expect to parse the remainder of the parameter tokens as one of:
+ * (loads data from source image only)
+ * - <[stash_id:stash_range] ...> (loads data from stashes only)
+ * <[stash_id:stash_range] ...>
+ * (loads data from both source image and stashes)
*/
partition.operations = new Array()
let newDataSize = await this.sizeNewData(partition.partitionName)
@@ -87,14 +92,17 @@ export class PayloadNonAB extends chromeos_update_engine.DeltaArchiveManifest{
op.dstExtents = elements.slice(1).reduce(parseRange, [])
break
case 'move':
+ op.dstExtents = parseRange([], elements[2])
break
case 'bsdiff':
op.dataOffset = parseInt(elements[1])
op.dataLength = parseInt(elements[2])
+ op.dstExtents = parseRange([], elements[5])
break
case 'imgdiff':
op.dataOffset = parseInt(elements[1])
op.dataLength = parseInt(elements[2])
+ op.dstExtents = parseRange([], elements[5])
break
case 'stash':
break