Hi,
I've tried dissecting this bin with the latest commit of the tools but it fails as follows:
% python3 bk7231tools.py dissect_dump -e -O dump_extract_dir dump_calex_rgbcct_bulb.bin
RBL containers:
0x10f9a: bootloader - [encoding_algorithm=NONE, size=0xe470]
Traceback (most recent call last):
File "/Users/testuser/Downloads/bk7231tools/bk7231tools.py", line 279, in <module>
args.handler(args)
File "/Users/testuser/Downloads/bk7231tools/bk7231tools.py", line 188, in dissect_dump_file
containers = __carve_and_write_rbl_containers(dumpfile=dumpfile, layout=layout,
File "/Users/testuser/Downloads/bk7231tools/bk7231tools.py", line 89, in __carve_and_write_rbl_containers
fsout.write(__decrypt_code_partition(partition, container.payload))
File "/Users/testuser/Downloads/bk7231tools/bk7231tools.py", line 51, in __decrypt_code_partition
return cipher.decrypt(payload, partition.mapped_address)
File "/Users/testuser/Downloads/bk7231tools/bk7231tools/crypto/code.py", line 70, in decrypt
return self.encrypt(data, stream_start_offset=stream_start_offset)
File "/Users/testuser/Downloads/bk7231tools/bk7231tools/crypto/code.py", line 59, in encrypt
raise ValueError(f"Given data length {len(data)} is not a multiple of block length {self.BLOCK_LENGTH_BYTES}")
ValueError: Given data length 58480 is not a multiple of block length 32
With an older version of this tool (before commit 470817c ) everything runs ok
Hi, I've tried dissecting this bin with the latest commit of the tools but it fails as follows:
With an older version of this tool (before commit 470817c ) everything runs ok