xpirt / img2sdat

Convert sparse EXT4 image to sparse Android data image
MIT License
153 stars 98 forks source link

Allow importing as a module. Added prefix argument to allow building … #16

Closed superr closed 6 years ago

superr commented 6 years ago

…prefix.new.dat. Added argument parsing when run as a script to allow mixing options. Fixed directories not being created when outdir argument is provided causing a crash.

Usage as a script is different, and the README has been updated:

./img2sdat vendor.img -o tmp -v 4 -p vendor

The default prefix is "system" if -p is not used.

Usage as a module:

import img2sdat

img2sdat.main(INPUT_IMAGE, OUTDIR='.', VERSION=None, PREFIX='system')

Looks like this also fixes issue #12 and #13 :)

superr commented 6 years ago

Sorry for closing it. I thought I missed something but the error was in my command, not the tool :)

xpirt commented 6 years ago

Looks good.

Merged.