xpirt / img2sdat

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

Magic value error? #15

Closed bestmjh47 closed 6 years ago

bestmjh47 commented 6 years ago

./img2sdat.py system.img img2sdat binary - version: 1.6

        1. Android Lollipop 5.0
        2. Android Lollipop 5.1
        3. Android Marshmallow 6.0
        4. Android Nougat 7.0/7.1/8.0

Choose system version: 4 Traceback (most recent call last): File "./img2sdat.py", line 89, in main(sys.argv) File "./img2sdat.py", line 79, in main image = sparse_img.SparseImage(INPUT_IMAGE, tempfile.mkstemp()[1], '0') File "/home/123/Desktop/unpack/pack/sparse_img.py", line 52, in init raise ValueError("Magic should be 0xED26FF3A but is 0x%08X" % (magic,)) ValueError: Magic should be 0xED26FF3A but is 0x00000000

But this system.img is not corrupted(can be mounted) and it was generated by sdat2img.py which is your work. It was just extracted from lineage-14.1's system.new.dat and has nothing special things like encryption or something. Why this 'magic value' thing happens?

xpirt commented 6 years ago

You need to convert the ext4 image to a sparse android image format.

More info: https://forum.xda-developers.com/android/software-hacking/how-to-conver-lollipop-dat-files-to-t2978952

Closed.