arlept / mtklogo

A Command Line Interface with a thin reusable library which lets you hack an MTK "LOGO" image
MIT License
16 stars 4 forks source link

error: failed to fill whole buffer #1

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello. I got this error when I tried to repack logo.bin. I am using my MacBook with macOS 10.15.7. Please help.

$ mtklogo repack logo/* -o new-logo.bin
            _    _     _
           | |  | |   | |
 _ __ ___  | |_ | | __| |  ___    __ _   ___
| '_ ` _ \ | __|| |/ /| | / _ \  / _` | / _ \
| | | | | || |_ |   < | || (_) || (_| || (_) |
|_| |_| |_| \__||_|\_\|_| \___/  \__, | \___/
                                  __/ |
                                 |___/
repack 63 files into new-logo.bin stripping alpha: false.
file logo/logo_000_bgrabe.png is slot 0 in bgrabe format.
file logo/logo_001_bgrabe.png is slot 1 in bgrabe format.
file logo/logo_002_bgrabe.png is slot 2 in bgrabe format.
file logo/logo_003_bgrabe.png is slot 3 in bgrabe format.
file logo/logo_004_bgrabe.png is slot 4 in bgrabe format.
file logo/logo_005_bgrabe.png is slot 5 in bgrabe format.
file logo/logo_006_bgrabe.png is slot 6 in bgrabe format.
file logo/logo_007_bgrabe.png is slot 7 in bgrabe format.
file logo/logo_008_bgrabe.png is slot 8 in bgrabe format.
file logo/logo_009_bgrabe.png is slot 9 in bgrabe format.
file logo/logo_010_bgrabe.png is slot 10 in bgrabe format.
file logo/logo_011_bgrabe.png is slot 11 in bgrabe format.
file logo/logo_012_bgrabe.png is slot 12 in bgrabe format.
file logo/logo_013_bgrabe.png is slot 13 in bgrabe format.
file logo/logo_014_bgrabe.png is slot 14 in bgrabe format.
file logo/logo_015_bgrabe.png is slot 15 in bgrabe format.
file logo/logo_016_bgrabe.png is slot 16 in bgrabe format.
file logo/logo_017_bgrabe.png is slot 17 in bgrabe format.
file logo/logo_018_bgrabe.png is slot 18 in bgrabe format.
file logo/logo_019_bgrabe.png is slot 19 in bgrabe format.
file logo/logo_020_bgrabe.png is slot 20 in bgrabe format.
file logo/logo_021_bgrabe.png is slot 21 in bgrabe format.
file logo/logo_022_bgrabe.png is slot 22 in bgrabe format.
file logo/logo_023_bgrabe.png is slot 23 in bgrabe format.
file logo/logo_024_bgrabe.png is slot 24 in bgrabe format.
file logo/logo_025_bgrabe.png is slot 25 in bgrabe format.
file logo/logo_026_bgrabe.png is slot 26 in bgrabe format.
file logo/logo_027_bgrabe.png is slot 27 in bgrabe format.
file logo/logo_028_bgrabe.png is slot 28 in bgrabe format.
file logo/logo_029_bgrabe.png is slot 29 in bgrabe format.
file logo/logo_030_bgrabe.png is slot 30 in bgrabe format.
file logo/logo_031_bgrabe.png is slot 31 in bgrabe format.
file logo/logo_032_bgrabe.png is slot 32 in bgrabe format.
file logo/logo_033_bgrabe.png is slot 33 in bgrabe format.
file logo/logo_034_bgrabe.png is slot 34 in bgrabe format.
file logo/logo_035_bgrabe.png is slot 35 in bgrabe format.
file logo/logo_036_bgrabe.png is slot 36 in bgrabe format.
file logo/logo_037_bgrabe.png is slot 37 in bgrabe format.
file logo/logo_038_bgrabe.png is slot 38 in bgrabe format.
file logo/logo_039_bgrabe.png is slot 39 in bgrabe format.
file logo/logo_040_bgrabe.png is slot 40 in bgrabe format.
file logo/logo_041_bgrabe.png is slot 41 in bgrabe format.
file logo/logo_042_bgrabe.png is slot 42 in bgrabe format.
file logo/logo_043_bgrabe.png is slot 43 in bgrabe format.
file logo/logo_044_bgrabe.png is slot 44 in bgrabe format.
file logo/logo_045_bgrabe.png is slot 45 in bgrabe format.
file logo/logo_046_bgrabe.png is slot 46 in bgrabe format.
file logo/logo_047_bgrabe.png is slot 47 in bgrabe format.
file logo/logo_048_bgrabe.png is slot 48 in bgrabe format.
file logo/logo_049_bgrabe.png is slot 49 in bgrabe format.
file logo/logo_050_bgrabe.png is slot 50 in bgrabe format.
file logo/logo_051_bgrabe.png is slot 51 in bgrabe format.
file logo/logo_052_bgrabe.png is slot 52 in bgrabe format.
file logo/logo_053_bgrabe.png is slot 53 in bgrabe format.
file logo/logo_054_bgrabe.png is slot 54 in bgrabe format.
file logo/logo_055_bgrabe.png is slot 55 in bgrabe format.
file logo/logo_056_bgrabe.png is slot 56 in bgrabe format.
file logo/logo_057_bgrabe.png is slot 57 in bgrabe format.
file logo/logo_058_bgrabe.png is slot 58 in bgrabe format.
file logo/logo_059_bgrabe.png is slot 59 in bgrabe format.
file logo/logo_060_bgrabe.png is slot 60 in bgrabe format.
file logo/logo_061_bgrabe.png is slot 61 in bgrabe format.
file logo/logo_062_bgrabe.png is slot 62 in bgrabe format.
error: failed to fill whole buffer
ghost commented 3 years ago

I tried to add flag -z to unpack as raw z format, and repack them... And it works, why?

$ mtklogo unpack -z logo.bin -o logo2
            _    _     _
           | |  | |   | |
 _ __ ___  | |_ | | __| |  ___    __ _   ___
| '_ ` _ \ | __|| |/ /| | / _ \  / _` | / _ \
| | | | | || |_ |   < | || (_) || (_| || (_) |
|_| |_| |_| \__||_|\_\|_| \___/  \__, | \___/
                                  __/ |
                                 |___/
unpack file logo.bin with profile default, color mode bgrabe, flip orientation: false to directory logo2.
logo image has 63 slots
storing slot 0 (14349 bytes) to logo2/logo_000_raw.z as raw zip .
storing slot 1 (1110762 bytes) to logo2/logo_001_raw.z as raw zip .
storing slot 2 (7200 bytes) to logo2/logo_002_raw.z as raw zip .
storing slot 3 (6240 bytes) to logo2/logo_003_raw.z as raw zip .
storing slot 4 (234 bytes) to logo2/logo_004_raw.z as raw zip .
storing slot 5 (118 bytes) to logo2/logo_005_raw.z as raw zip .
storing slot 6 (223 bytes) to logo2/logo_006_raw.z as raw zip .
storing slot 7 (263 bytes) to logo2/logo_007_raw.z as raw zip .
storing slot 8 (163 bytes) to logo2/logo_008_raw.z as raw zip .
storing slot 9 (239 bytes) to logo2/logo_009_raw.z as raw zip .
storing slot 10 (271 bytes) to logo2/logo_010_raw.z as raw zip .
storing slot 11 (167 bytes) to logo2/logo_011_raw.z as raw zip .
storing slot 12 (552 bytes) to logo2/logo_012_raw.z as raw zip .
storing slot 13 (550 bytes) to logo2/logo_013_raw.z as raw zip .
storing slot 14 (310 bytes) to logo2/logo_014_raw.z as raw zip .
storing slot 15 (17 bytes) to logo2/logo_015_raw.z as raw zip .
storing slot 16 (17 bytes) to logo2/logo_016_raw.z as raw zip .
storing slot 17 (17 bytes) to logo2/logo_017_raw.z as raw zip .
storing slot 18 (17 bytes) to logo2/logo_018_raw.z as raw zip .
storing slot 19 (17 bytes) to logo2/logo_019_raw.z as raw zip .
storing slot 20 (17 bytes) to logo2/logo_020_raw.z as raw zip .
storing slot 21 (17 bytes) to logo2/logo_021_raw.z as raw zip .
storing slot 22 (17 bytes) to logo2/logo_022_raw.z as raw zip .
storing slot 23 (17 bytes) to logo2/logo_023_raw.z as raw zip .
storing slot 24 (17 bytes) to logo2/logo_024_raw.z as raw zip .
storing slot 25 (6486 bytes) to logo2/logo_025_raw.z as raw zip .
storing slot 26 (6486 bytes) to logo2/logo_026_raw.z as raw zip .
storing slot 27 (6486 bytes) to logo2/logo_027_raw.z as raw zip .
storing slot 28 (6486 bytes) to logo2/logo_028_raw.z as raw zip .
storing slot 29 (6623 bytes) to logo2/logo_029_raw.z as raw zip .
storing slot 30 (6486 bytes) to logo2/logo_030_raw.z as raw zip .
storing slot 31 (6486 bytes) to logo2/logo_031_raw.z as raw zip .
storing slot 32 (6486 bytes) to logo2/logo_032_raw.z as raw zip .
storing slot 33 (6486 bytes) to logo2/logo_033_raw.z as raw zip .
storing slot 34 (6486 bytes) to logo2/logo_034_raw.z as raw zip .
storing slot 35 (6353 bytes) to logo2/logo_035_raw.z as raw zip .
storing slot 36 (17 bytes) to logo2/logo_036_raw.z as raw zip .
storing slot 37 (8627 bytes) to logo2/logo_037_raw.z as raw zip .
storing slot 38 (14349 bytes) to logo2/logo_038_raw.z as raw zip .
storing slot 39 (6370 bytes) to logo2/logo_039_raw.z as raw zip .
storing slot 40 (5752 bytes) to logo2/logo_040_raw.z as raw zip .
storing slot 41 (5752 bytes) to logo2/logo_041_raw.z as raw zip .
storing slot 42 (200558 bytes) to logo2/logo_042_raw.z as raw zip .
storing slot 43 (157019 bytes) to logo2/logo_043_raw.z as raw zip .
storing slot 44 (198543 bytes) to logo2/logo_044_raw.z as raw zip .
storing slot 45 (201685 bytes) to logo2/logo_045_raw.z as raw zip .
storing slot 46 (184105 bytes) to logo2/logo_046_raw.z as raw zip .
storing slot 47 (210007 bytes) to logo2/logo_047_raw.z as raw zip .
storing slot 48 (187413 bytes) to logo2/logo_048_raw.z as raw zip .
storing slot 49 (1864 bytes) to logo2/logo_049_raw.z as raw zip .
storing slot 50 (913 bytes) to logo2/logo_050_raw.z as raw zip .
storing slot 51 (1489 bytes) to logo2/logo_051_raw.z as raw zip .
storing slot 52 (1651 bytes) to logo2/logo_052_raw.z as raw zip .
storing slot 53 (1540 bytes) to logo2/logo_053_raw.z as raw zip .
storing slot 54 (1581 bytes) to logo2/logo_054_raw.z as raw zip .
storing slot 55 (1803 bytes) to logo2/logo_055_raw.z as raw zip .
storing slot 56 (1140 bytes) to logo2/logo_056_raw.z as raw zip .
storing slot 57 (1983 bytes) to logo2/logo_057_raw.z as raw zip .
storing slot 58 (1859 bytes) to logo2/logo_058_raw.z as raw zip .
storing slot 59 (2431 bytes) to logo2/logo_059_raw.z as raw zip .
storing slot 60 (240331 bytes) to logo2/logo_060_raw.z as raw zip .
storing slot 61 (15189 bytes) to logo2/logo_061_raw.z as raw zip .
storing slot 62 (19294 bytes) to logo2/logo_062_raw.z as raw zip .
$ mtklogo repack logo2/* -o logo-new.bin
            _    _     _
           | |  | |   | |
 _ __ ___  | |_ | | __| |  ___    __ _   ___
| '_ ` _ \ | __|| |/ /| | / _ \  / _` | / _ \
| | | | | || |_ |   < | || (_) || (_| || (_) |
|_| |_| |_| \__||_|\_\|_| \___/  \__, | \___/
                                  __/ |
                                 |___/
repack 63 files into logo-new.bin stripping alpha: false.
file logo2/logo_000_raw.z is slot 0 in raw z format.
file logo2/logo_001_raw.z is slot 1 in raw z format.
file logo2/logo_002_raw.z is slot 2 in raw z format.
file logo2/logo_003_raw.z is slot 3 in raw z format.
file logo2/logo_004_raw.z is slot 4 in raw z format.
file logo2/logo_005_raw.z is slot 5 in raw z format.
file logo2/logo_006_raw.z is slot 6 in raw z format.
file logo2/logo_007_raw.z is slot 7 in raw z format.
file logo2/logo_008_raw.z is slot 8 in raw z format.
file logo2/logo_009_raw.z is slot 9 in raw z format.
file logo2/logo_010_raw.z is slot 10 in raw z format.
file logo2/logo_011_raw.z is slot 11 in raw z format.
file logo2/logo_012_raw.z is slot 12 in raw z format.
file logo2/logo_013_raw.z is slot 13 in raw z format.
file logo2/logo_014_raw.z is slot 14 in raw z format.
file logo2/logo_015_raw.z is slot 15 in raw z format.
file logo2/logo_016_raw.z is slot 16 in raw z format.
file logo2/logo_017_raw.z is slot 17 in raw z format.
file logo2/logo_018_raw.z is slot 18 in raw z format.
file logo2/logo_019_raw.z is slot 19 in raw z format.
file logo2/logo_020_raw.z is slot 20 in raw z format.
file logo2/logo_021_raw.z is slot 21 in raw z format.
file logo2/logo_022_raw.z is slot 22 in raw z format.
file logo2/logo_023_raw.z is slot 23 in raw z format.
file logo2/logo_024_raw.z is slot 24 in raw z format.
file logo2/logo_025_raw.z is slot 25 in raw z format.
file logo2/logo_026_raw.z is slot 26 in raw z format.
file logo2/logo_027_raw.z is slot 27 in raw z format.
file logo2/logo_028_raw.z is slot 28 in raw z format.
file logo2/logo_029_raw.z is slot 29 in raw z format.
file logo2/logo_030_raw.z is slot 30 in raw z format.
file logo2/logo_031_raw.z is slot 31 in raw z format.
file logo2/logo_032_raw.z is slot 32 in raw z format.
file logo2/logo_033_raw.z is slot 33 in raw z format.
file logo2/logo_034_raw.z is slot 34 in raw z format.
file logo2/logo_035_raw.z is slot 35 in raw z format.
file logo2/logo_036_raw.z is slot 36 in raw z format.
file logo2/logo_037_raw.z is slot 37 in raw z format.
file logo2/logo_038_raw.z is slot 38 in raw z format.
file logo2/logo_039_raw.z is slot 39 in raw z format.
file logo2/logo_040_raw.z is slot 40 in raw z format.
file logo2/logo_041_raw.z is slot 41 in raw z format.
file logo2/logo_042_raw.z is slot 42 in raw z format.
file logo2/logo_043_raw.z is slot 43 in raw z format.
file logo2/logo_044_raw.z is slot 44 in raw z format.
file logo2/logo_045_raw.z is slot 45 in raw z format.
file logo2/logo_046_raw.z is slot 46 in raw z format.
file logo2/logo_047_raw.z is slot 47 in raw z format.
file logo2/logo_048_raw.z is slot 48 in raw z format.
file logo2/logo_049_raw.z is slot 49 in raw z format.
file logo2/logo_050_raw.z is slot 50 in raw z format.
file logo2/logo_051_raw.z is slot 51 in raw z format.
file logo2/logo_052_raw.z is slot 52 in raw z format.
file logo2/logo_053_raw.z is slot 53 in raw z format.
file logo2/logo_054_raw.z is slot 54 in raw z format.
file logo2/logo_055_raw.z is slot 55 in raw z format.
file logo2/logo_056_raw.z is slot 56 in raw z format.
file logo2/logo_057_raw.z is slot 57 in raw z format.
file logo2/logo_058_raw.z is slot 58 in raw z format.
file logo2/logo_059_raw.z is slot 59 in raw z format.
file logo2/logo_060_raw.z is slot 60 in raw z format.
file logo2/logo_061_raw.z is slot 61 in raw z format.
file logo2/logo_062_raw.z is slot 62 in raw z format.
successfully repacked 63 logos to logo-new.bin