#header #chunk #file-header #sparse #image #android #parser

android-sparse-image

Low-level Android sparse image parsing headers

3 releases

0.1.2 Dec 7, 2024
0.1.1 Nov 28, 2024
0.1.0 Nov 24, 2024

#187 in Science

Download history 99/week @ 2024-11-20 177/week @ 2024-11-27 246/week @ 2024-12-04 324/week @ 2024-12-11 63/week @ 2024-12-18 15/week @ 2024-12-25

650 downloads per month
Used in fastboot-protocol

MIT/Apache

27KB
595 lines

Lowlevel android sparse image parsing helpers

An android space image is a sparse representation of a potential output file. The format consist of a [FileHeader] followed by a number of [ChunkHeader]s and their associated data

Sparse image
File header
Chunk 0 header
Chunk 0 data
Chunk 1 header
Chunk 1 data
....
Chunk N header
Chunk N data

The size of data in a chunk depends on the [ChunkType] and can be determined with ChunkHeader::data_size

Dependencies

~0.5–1MB
~22K SLoC