{"id":22754521,"url":"https://github.com/taligentx/flstweak","last_synced_at":"2026-03-09T15:03:57.703Z","repository":{"id":267182752,"uuid":"900470102","full_name":"taligentx/FLSTweak","owner":"taligentx","description":"Parse, replace, and extract data from Winner Micro .fls firmware files","archived":false,"fork":false,"pushed_at":"2025-01-29T12:41:09.000Z","size":692,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:54:18.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taligentx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-08T21:03:47.000Z","updated_at":"2025-03-02T02:28:51.000Z","dependencies_parsed_at":"2025-01-16T16:02:38.570Z","dependency_job_id":"1616e8bd-bbc6-4e94-8639-6b5c6d4f85e3","html_url":"https://github.com/taligentx/FLSTweak","commit_stats":null,"previous_names":["taligentx/flstweak"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/taligentx/FLSTweak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taligentx%2FFLSTweak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taligentx%2FFLSTweak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taligentx%2FFLSTweak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taligentx%2FFLSTweak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taligentx","download_url":"https://codeload.github.com/taligentx/FLSTweak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taligentx%2FFLSTweak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30299882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T06:17:32.923Z","updated_at":"2026-03-09T15:03:57.670Z","avatar_url":"https://github.com/taligentx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FLSTweak\nThis tool parses .fls firmware files for [Winner Micro](http://www.winnermicro.com/en/) microcontrollers, including the W60x series (W600, W601) and W80x series (W800, W801, W806). This includes decoding and presenting header information, verifying data integrity, replacing data (including updating header checksums), and extracting images to individual files for analysis.\n\nFor example, the [Zeeweii DSO3D12 oscilloscope](http://www.zeeweii.com/productinfo/dso3d12.html) uses the W806 chip and can be modified to improve the font quality and other UI elements. See the [ZeeTweak](https://github.com/taligentx/ZeeTweak) repo for firmware modifications that can be applied using FLSTweak.\n\n## Quick start\nThe .fls firmware file can contain multiple images, including the bootloader image (Secboot) and the runtime user image, each with a header specifying image properties and checksums for the image and the header itself. See the References section below for details.\n\nRun flstweak.py with the -h option to display help with all options:\n```\n$ python3 flstweak.py -h\nusage: flstweak.py [-h] [--replace REPLACE] [--output OUTPUT] [--extract] filename\n\nflstweak 2.0 - Parse, replace, and extract data from Winner Micro .fls firmware files.\n\npositional arguments:\n  filename           .fls firmware file to process\n\noptions:\n  -h, --help         show this help message and exit\n  --replace REPLACE  reference file (suffix: ref.bin) for replacement or directory for multiple replacements\n  --output OUTPUT    output file for modified firmware (default: filename_mod)\n  --extract          extracts images to individual files\n\n```\nRun flstweak.py with the firmware file to parse and display image info:\n```\n$ python3 flstweak.py hello_world.fls\nDetected firmware type: W80x\n\nImage 0:\n  Image attributes:\n    Type: Bootloader (0x0)\n    Encryption: False\n    Encryption private key #: 0\n    Signature: False\n    GZIP compression: False\n    Block erase: False\n    Always erase: False\n    Compression type: 0\n  Image address: 0x08002400\n  Image size: 25984\n  Header address: 0x08002000\n  OTA update address: 0x00000000\n  OTA update version: 0x00000000\n  Version: G03.00.00\n  Next image header address: 0x0800F000\n  Image checksum: 0x65C3A078 (verified)\n  Header checksum: 0x3F0A6E0A (verified)\n\nImage 1:\n  Image attributes:\n  (...)\n```\nOn Linux and macOS, the following will make the script directly executable:\n```\n$ chmod +x flstweak.py\n$ ./flstweak.py hello_world.fls\n```\n\n## Image data replacement\nThe `--replace` option allows for image data replacement by specifying a reference file (suffix: `ref.bin`) containing the image data to match or a directory containing multiple reference files. Each reference file should have a corresponding modified file (suffix: `mod.bin`) of the same size with the replacement data.\n\nIf the reference data is found, it will be replaced with the modified data and the header will be updated with the new image checksum and header checksum.\n```\n$ python3 flstweak.py hello_world.fls --replace data_ref.bin\nDetected firmware type: W80x\n\nImage 0:\n  (...)\n  Image checksum: original 0x7C67C28A, new 0x187EC376 (verified)\n  Header checksum: original 0x2857E698, new 0x9F17B19D (verified)\n  [Replace] Matched and replaced: data_ref\n```\n\nBy default, the modified firmware will be written as `filename_mod` and can be customized with the `--output` option.\n```\n[Output] Saved processed firmware as hello_world_mod.fls\n```\n\n* Notes\n  - The reference and mod files must contain a single block of contiguous data. The first matching data in the image will be replaced - for multiple occurances, run the same command on the produced `_mod.fls` file.\n  - Data replacement is currently not supported for W60x-series firmware.\n\n## Image extraction\nThe images can also be extracted to individual files for analysis with the `--extract` option, including stripping the header to only include the image data. Each image is written as `filename_imageX.img`, with `X` as the image number. If combined with `--replace`, both the original image and the modified image will be extracted to separate files.\n```\nImage 0:\n  (...)\n  [Extract] Saved image as hello_world_image0.img\n\nImage 1:\n  (...)\n  [Replace] Matched and replaced: data_ref\n  [Extract] Saved original image as hello_world_image1.img, modified image as hello_world_image1_mod.img\n```\n\n## Release notes\n* 2.0\n  - Support multiple replacements: `--replace` now directly accepts a reference filename or directory containing multiple reference files (removed `--ref` and `--mod` arguments)\n  - Zeeweii DSO3D12: updated example `mod.fls` file with measurement label changes, fixed `Normal` label\n* 1.1\n  - Zeeweii DSO3D12: Rendered new small font with all characters shifted down 1 pixel\n* 1.0\n  - Release after successful testing on the Zeeweii DSO3D12\n* 0.1\n  - Initial release\n\n## References\n  * [W80x series firmware format](https://doc.winnermicro.net/w800/en/latest/component_guides/firmware_format.html)\n  * [W60x series firmware format](http://www.winnermicro.com/en/upload/1/editor/1559640549130.pdf)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaligentx%2Fflstweak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaligentx%2Fflstweak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaligentx%2Fflstweak/lists"}