A web-based tool for extracting, replacing, and repacking Unisoc / Spreadtrum logo.bin firmware images. All frame processing runs locally in the browser — no file uploads to any server.
- Load
logo.binvia drag-and-drop or file picker - Preview all embedded frames in a responsive grid
- Replace any frame with a custom image (auto-resized to original resolution)
- Download the patched
logo.binready to flash - Extract all frames as individual PNG files
| Property | Value |
|---|---|
| Container | GZ-compressed multi-frame BMP |
| Color depth | 24bpp (BGR) |
| Row order | Bottom-up |
| Tested device | Unisoc SC9863A / SC7731E series |
| Offset | Size | Type | Description |
|---|---|---|---|
| 0x00 | 2B | u8[2] |
Magic bytes 47 5A ("GZ") |
| 0x02 | 4B | uint32 LE |
Frame count (typically 2–15) |
| 0x06 | 18B | — | Reserved, all zeros |
| 0x18 | 4B × N | uint32 LE |
Compressed byte size for each frame |
| 0x18 + (N × 4) | variable | — | Concatenated gzip-compressed BMP payloads |
Each frame is a standard gzip stream containing a raw 24bpp bottom-up BMP. The gzip header includes an embedded filename (1.bmp, 2.bmp, …) set by the firmware packer. The decompressed BMP uses the standard 54-byte header followed by unpadded BGR pixel rows aligned to a 4-byte boundary.
- Node.js >= 18.0.0
- npm >= 9.0.0
git clone https://github.com/lenzarchive/logo-bin-tool
cd logo-bin-tool
npm installBefore starting the server, compile the CSS and copy the icon bundle:
npm run buildThis runs two steps:
build:css— compilessrc/css/input.cssthrough Tailwind CSS intopublic/css/style.cssbuild:icons— copies the Lucide UMD bundle fromnode_modulesintopublic/js/vendor/lucide.js
Watches for CSS changes and restarts the server on file changes:
npm run devnpm run build
npm startThe server listens on http://localhost:3000 by default. Set the PORT environment variable to change it.
logo-bin-tool/
├── server.js # Express entry point
├── package.json
├── tailwind.config.js
├── postcss.config.js
├── README.md
├── scripts/
│ └── copyIcons.js # Copies Lucide bundle to public
├── src/
│ ├── css/
│ │ └── input.css # Tailwind directives + component styles
│ ├── routes/
│ │ └── api.js # REST API endpoints (server-side processing)
│ ├── services/
│ │ └── logoBin.js # Core parse and repack logic
│ └── utils/
│ └── bmp.js # BMP header utilities
└── public/
├── index.html
├── css/
│ └── style.css # Compiled Tailwind output (generated)
└── js/
├── vendor/
│ └── lucide.js # Lucide UMD bundle (generated)
├── app.js # Application controller
├── parser.js # logo.bin parser (browser, uses pako)
├── bmp.js # BMP writer (browser)
└── ui.js # UI helpers and logging
All endpoints accept multipart/form-data.
Parses a logo.bin and returns frame metadata.
Body: bin (file)
Response:
{
"success": true,
"frameCount": 5,
"frames": [
{ "index": 0, "width": 720, "height": 1612, "bpp": 24, "compressedSize": 17997, "decompressedSize": 3481976 }
]
}Returns the raw BMP data for a single frame.
Body: bin (file)
Response: image/bmp binary
Replaces a frame and returns the patched logo.bin.
Body: bin (file), image (file), frameIndex (integer)
Response: application/octet-stream — logo_new.bin
- File size of the repacked
logo.binmay differ from the original due to gzip compression variance. Verify your device's logo partition is large enough before flashing. - Always keep a backup of the original
logo.binbefore flashing. - Tested against Android 11 Unisoc firmware. Behavior on other versions may vary.
This project is licensed under the MIT License. See LICENSE for the full license text.
Use at your own risk.
This tool is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
The author(s) shall not be held liable for any claim, damages, or other liability — whether arising from contract, tort, or otherwise — including but not limited to:
- Bricked or damaged devices resulting from flashing a patched
logo.bin - Data loss or corruption of firmware partitions
- Incompatibility with specific device models or firmware versions
- Any indirect, incidental, or consequential damages
You are solely responsible for verifying compatibility, keeping a backup of your original logo.bin, and ensuring your device's logo partition is large enough before flashing. Always proceed with caution on production or personal devices.