#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

#227 in Science

Download history 89/week @ 2024-11-19 185/week @ 2024-11-26 203/week @ 2024-12-03 315/week @ 2024-12-10 117/week @ 2024-12-17 8/week @ 2024-12-24 51/week @ 2024-12-31 17/week @ 2025-01-07 78/week @ 2025-01-14 23/week @ 2025-01-21 1/week @ 2025-01-28 213/week @ 2025-02-04

325 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
~21K SLoC