Add Sony LZ4 compressed SIN image support - #47
Open
rsa9000 wants to merge 2 commits into
Open
Conversation
Sony device firmware images in SIN format are basically the same sparse images, augmented with a custom chunk type, 0xCAC5 [1]. Such chunk contains a raw LZ4-compressed block. See few more notes in the code comment. Implement this vendor-specific chunk type support to be capable to convert SIN-images into RAW-images in a regular way. Use liblz4 [2] to decompress the chunk data. Creating SIN-images with LZ4-compression is not yet supported. 1. https://xdaforums.com/t/tool-unsin-sin-v3-v4-v5-unpacker-v2-0.3128106/post-75983550 2. https://github.com/lz4/lz4 Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Mention SIN images support in a new section 'Vendor extensions' and extend the dependencies list with liblz4 for both Windows and Linux platforms. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Troubleshooting a firmware issue I've noticed that Sony images cannot be handled by
simg2imgutility:The issue is that Sony augmented sparse format with a new chunk type - 0xCAC5 carrying LZ4 compressed data [1]. Proposed solution implements such chunk support using liblz4. With these changes applied I can convert all the available images from sparse to raw: