ota-dump

Crates.ioota-dump
lib.rsota-dump
version0.1.6
sourcesrc
created_at2021-09-21 20:52:05.3805
updated_at2022-09-02 18:21:18.924438
descriptionA tool to dump manifest of Android's OTA package
homepage
repository
max_upload_size
id454608
size84,783
Kelvin Zhang (zhangxp1998)

documentation

README

Rust learning project

update_metadata.proto is copied from aosp

Android's OTA file is simply a .zip archive. Most of the information is stored in payload.bin entry inside it. Format of payload.bin is defined at system/update_engine/update_metadata.proto.

This tool locates payload.bin inside OTA's zip file and parses the format according to definition in update_metadata.proto.

Install

  1. Install rust via https://www.rust-lang.org/learn/get-started
  2. cargo install ota-dump

Usage

ota-dump <path to android OTA.zip>

Examples

  • ota-dump coral_ota.zip

    Dump the entire OTA manifest in json format. Dumped object has type DeltaArchiveManifest. This object is huge so it's best to save it to a file or pipe to other CLI tools such as jq

  • ota-dump cf_x86_dm_verity.zip | jq '.partitions[].partition_name'

    will list partitions included in this update.

  • ota-dump cf_x86_dm_verity.zip | jq '{name: .partitions[].partition_name, size: .partitions[].new_partition_info.size}'

    List partitions included and size of partitions after OTA update.

  • ota-dump cf_x86_dm_verity.zip | jq 'del(.partitions[].operations)|del(.partitions[].merge_operations)'

    Dump the manifest without operation list without list of operations. The output will be much smaller.

Commit count: 0

cargo fmt