Tool to convert Android sparse images to raw images https://github.com/anestisb/android-simg2img
Go to file
Anestis Bechtsoudis 2807b363d4
Merge pull request #26 from okaze/patch-5
cleanup duplicate defined
2020-06-19 19:02:43 +04:00
android-base Android-10 Support 2019-11-05 11:33:57 +02:00
include/sparse Android-10 Support 2019-11-05 11:33:57 +02:00
.clang-format clang-format styling matching upstream 2019-11-05 11:50:49 +02:00
.gitignore Port from AOSP upstream 2015-12-19 13:42:46 +02:00
append2simg.cpp Update append2simg.cpp 2020-05-28 23:31:05 +08:00
backed_block.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
backed_block.h Android-10 Support 2019-11-05 11:33:57 +02:00
defs.h Android-10 Support 2019-11-05 11:33:57 +02:00
img2simg.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
Makefile Explicitly request inttypes formatting macros 2020-04-28 18:24:46 +04:00
output_file.cpp clang-format styling matching upstream 2019-11-05 11:50:49 +02:00
output_file.h Android-10 Support 2019-11-05 11:33:57 +02:00
OWNERS Android-10 Support 2019-11-05 11:33:57 +02:00
README.md Added zlib dependency installation instructions for Ubuntu & Fedora 2018-02-15 09:33:31 +05:30
simg2img.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
simg2simg.cpp clang-format styling matching upstream 2019-11-05 11:50:49 +02:00
simg_dump.py Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_crc32.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_crc32.h Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_defs.h Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_err.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_file.h Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_format.h Android-10 Support 2019-11-05 11:33:57 +02:00
sparse_read.cpp Android-10 Support 2019-11-05 11:33:57 +02:00
sparse.cpp clang-format styling matching upstream 2019-11-05 11:50:49 +02:00

simg2img

Tool to convert Android sparse images to raw images.

Since image tools are not part of Android SDK, this standalone port of AOSP libsparse aims to avoid complex building chains.

Usage

$ make
$ simg2img /path/to/Android/images/system.img /output/path/system.raw.img
$ file /path/to/Android/images/system.img
system.img: Android sparse image, version: 1.0, Total of 262144 4096-byte output blocks in 1620 input chunks.
$ file /output/path/system.raw.img
system.raw.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)

Windows

If you want to build simg2img on Windows you'll need to install MinGW and also zlib and libasprintf (go to MinGW Libraries in the installer and check mingw32-libz and mingw32-libasprintf). Once you've done that run the following command to build simg2img:

CFLAGS=-DUSE_MINGW LDFLAGS=-lasprintf mingw32-make

Linux

If zlib.h is missing then install it using

Ubuntu: sudo apt-get install libz-dev

Fedora: sudo dnf install libz-devel