{"id":43513140,"url":"https://github.com/c-hidery/sfd_tool","last_synced_at":"2026-05-23T06:08:58.697Z","repository":{"id":316743905,"uuid":"1064651952","full_name":"C-Hidery/sfd_tool","owner":"C-Hidery","description":"Spreadtrum Firmware Dumper","archived":false,"fork":false,"pushed_at":"2026-04-24T12:24:47.000Z","size":2687,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-24T14:39:06.024Z","etag":null,"topics":["device-flash","sprd","spreadtrum","unisoc"],"latest_commit_sha":null,"homepage":"","language":"C++","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/C-Hidery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-26T10:52:59.000Z","updated_at":"2026-04-24T12:24:08.000Z","dependencies_parsed_at":"2025-09-26T13:25:54.792Z","dependency_job_id":"2d9fe614-81a1-4b60-88c1-7c893a896660","html_url":"https://github.com/C-Hidery/sfd_tool","commit_stats":null,"previous_names":["c-hidery/sfd_tool"],"tags_count":134,"template":false,"template_full_name":null,"purl":"pkg:github/C-Hidery/sfd_tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Hidery%2Fsfd_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Hidery%2Fsfd_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Hidery%2Fsfd_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Hidery%2Fsfd_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/C-Hidery","download_url":"https://codeload.github.com/C-Hidery/sfd_tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Hidery%2Fsfd_tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32527138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["device-flash","sprd","spreadtrum","unisoc"],"created_at":"2026-02-03T13:14:21.731Z","updated_at":"2026-05-23T06:08:58.670Z","avatar_url":"https://github.com/C-Hidery.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SFD Tool\n\nSFD Tool is a cross‑platform GUI and CLI tool for working with Spreadtrum/UNISOC devices.\nIt focuses on **safe partition backup/restore, PAC flashing, and advanced maintenance\noperations**, with first‑class support for modern 64‑bit platforms.\n\n\u003e NOTE: This README is a high‑level English overview. The **Chinese user guide**\n\u003e in [docs/USER_GUIDE_ZH.md](docs/USER_GUIDE_ZH.md) is the canonical, most\n\u003e detailed end‑user documentation.\n\n![Logo](icon.png)\n\n![License](https://img.shields.io/github/license/C-Hidery/sfd_tool)\n\n[中文文档](README_ZH.md)\n\n## Introduction\n\n\nThis is the modified version of tool 'spreadtrum_flash'\n\nsfd_tool is a maintenance release for spreadtrum_flash\n\n**(This version adds GTK3 graphical interface)**\n\n[spreadtrum_flash](https://github.com/TomKing062/spreadtrum_flash)\n\n---\n\nRun this before making:\n\n``` bash\nsudo apt update\n# Ubuntu/Debian\nsudo apt install libusb-1.0-0-dev gcc g++ libgtk-3-dev pkg-config make cmake\n# Fedora/RHEL\nsudo dnf install gcc-c++ gtk3-devel libusb1-devel libusb1 pkgconf-pkg-config make cmake\n# macOS\nbrew install libusb gtk+3 pkg-config make cmake\n# Android(Termux)\npkg install x11-repo\npkg install termux-api libusb clang git pkg-config gtk3 glib pango libcairo gdk-pixbuf at-spi2-core xorgproto xorg-util-macros make cmake\n```\n\nThen make:\n``` bash\nmake\n# Termux\nmake termux\n# Locate\nmake locates\n```\n\nUse on Termux(No GUI):\n\n``` bash\n# Search OTG device\ntermux-usb -l\n# example\n#[\n#  \"/dev/bus/usb/xxx/xxx\"\n#]\n# Authorize OTG device\ntermux-usb -r /dev/bus/usb/xxx/xxx\n# Run(example)\ntermux-usb -e './sfd_tool --no-gui --usb-fd' /dev/bus/usb/xxx/xxx\n```\n\n**WARN : You may must run tool as root to connect to device correctly!**\n\n---\n\n***Modified CLI commands:***\n\n    part_table [FILE PATH]\n\n**This command is equivalent to the `partition_list` command.**\n\n    exec_addr [BINARY FILE] [ADDR]\n    \n**Modified, you need to provide file path and address**\n\n    exec \u003cADDR\u003e\n\n**Modified, you need to provide FDL1 address when you execute FDL1**\n\n    read_spec [PART NAME] [OFFSET] [SIZE] [FILE]\n\n**Modified, equivalent to the `read_part` command, then `read_part` is equivalent to the `r`**\n\n    --no-fdl\n\n**New option, execute it if you want to connect to device without FDL1/2(Only Sprd4 Mode).**\n\n    cptable\n    \n**New command, use it to get partition table through compatibility method(FDL2 only)**\n\n    --no-gui\n\n**New parameter, open sfd_tool without GUI**\n\n    dis_avb_tos\n\n**New Command, use with caution.**\n\n    --tool-mode\n\n**New parameter, you can use some commands that DO NOT need device connection, use `exit` to exit tool**\n\n## WARNING - DISABLE VERITY \u0026 AVB\n\n**Command:** `dis_avb_tos` / `verity 0`\n\nThis command will **DISABLE** Android's DM-verity and AVB security verification mechanisms on your device.\n\n## CONSEQUENCES\n\n- Your device will have **NO system integrity protection**\n- The following apps will **STOP WORKING**:\n  - Banking apps and Google Pay\n  - Apps using fingerprint/password for payments (WeChat Pay, Alipay, etc.)\n  - Netflix HD streaming and some DRM-protected content\n  - Games with anti-cheat protection (PUBG, Genshin Impact, etc.)\n- Malware can easily modify your system without any warning\n- Your device becomes significantly more vulnerable to data theft\n\n## BEFORE CONTINUING\n\n- For  `dis_avb_tos` , SFD Tool has automatically backed up your `trustos` partition (see `trustos-orig.bin`)\n- **Keep this backup safe** - you will need it for recovery\n\n## TO RESTORE\n\nFor `verity 0`, Use command: `verity 1`\nFor  `dis_avb_tos`, flash back `trustos-orig.bin`\n\n## Features\n\n- **Cross‑platform GUI** (GTK3)\n  - Tabs for Connect, Partition Operation, PAC Flash, Manual Operation,\n    Advanced Operation, Advanced Settings, Debug Options, Log, and About.\n- **Partition backup and restore**\n  - Read/write individual partitions.\n  - Block‑size‑aware backup/restore pipeline to avoid alignment issues.\n  - **Restore from folder**: batch restore multiple partitions from a folder\n    of images (see user guide for details).\n- **PAC firmware flashing**\n  - Inspect PAC contents and flash selected partitions.\n- **Manual low‑level operations**\n  - Read/write by address, execute code at arbitrary addresses, etc.\n- **Advanced maintenance tools**\n  - AVB and boot‑chain related operations.\n  - Other expert‑only functions for debugging and recovery.\n- **CLI mode**\n  - Run without GUI using `--no-gui`.\n  - Rich command set for scripting and headless environments.\n- **Internationalisation (i18n)**\n  - Translated UI (e.g. `zh_CN`, `en_US`), using gettext `.po`/`.mo` files.\n\n## Supported platforms \u0026 binaries\n\nSFD Tool is primarily tested and released for:\n\n- **Windows 10/11 x64/x86**\n- **Linux x86_64** (e.g. Debian/Ubuntu, RPM‑based distros)\n- **macOS** (recent versions)\n- **Termux / Android** (CLI only, via `--no-gui`)\n\nPrebuilt binaries and packages are provided on GitHub Releases, typically including:\n\n- Windows x64/x86 executables (LibUSB(x64) and/or SPRD(x86) driver builds).\n- `.deb` packages for popular Debian/Ubuntu versions.\n- `.rpm` packages for RPM‑based distributions.\n- macOS `.dmg` application bundles.\n\n\nFor exact platforms and artifact names, refer to the latest release page and\n[.github/workflows/build.yml](.github/workflows/build.yml).\n\n## Building from source (CMake)\n\nSFD Tool uses **CMake** as the primary build system. The legacy Makefile is\nkept only for reference.\n\nBasic out‑of‑source build (example):\n\n```bash\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build -j\n```\n\nOn Windows you can use a Visual Studio generator, on macOS and Linux Ninja or\nMakefiles. See:\n\n- [docs/cmake_EN.md](docs/cmake_EN.md) – English CMake/build guide.\n- [docs/cmake.md](docs/cmake.md) – Chinese CMake/build guide with more\n  details, including per‑user config and `ui_language`.\n\n## Running\n\n### GUI\n\nAfter building, run the GUI executable from your build directory, e.g.:\n\n```bash\n./build/sfd_tool\n```\n\nOn installed systems you can start SFD Tool from your desktop environment\n(menu entry created by the package) or by running `sfd_tool` from a terminal.\n\n### CLI mode\n\nFor headless and scripted environments you can run SFD Tool in CLI mode:\n\n```bash\nsfd_tool --no-gui --help\n```\n\nThis prints the full list of commands and options. Some examples:\n\n- List partition table.\n- Read a specific region to a file.\n- Execute code at a given address.\n- Use `--no-fdl` or similar flags for special boot modes.\n\nFor the authoritative CLI reference, see:\n\n- Inline help: `sfd_tool --help`\n- Manpage (on Linux): `man sfd-tool`\n\n## Configuration \u0026 language\n\nSFD Tool stores per‑user configuration (UI language, recent paths, etc.) in a\nJSON config file in the user’s home directory (location varies by platform).\n\nKey points:\n\n- `ui_language` can be set to `auto`, `zh_CN`, `en_US`, etc.\n- On first run the tool may migrate legacy config files from the project root\n  into the per‑user location.\n\nSee [docs/cmake.md](docs/cmake.md) for details.\n\n## Documentation map\n\n- **Chinese user guide (canonical for end users)**\n  - [docs/USER_GUIDE_ZH.md](docs/USER_GUIDE_ZH.md)\n- **Project overview (English)**\n  - This README\n  - [README_ZH.md](README_ZH.md) – Chinese overview\n- **Architecture \u0026 development**\n  - [ARCHITECTURE.md](ARCHITECTURE.md)\n- **Build \u0026 configuration**\n  - [docs/cmake_EN.md](docs/cmake_EN.md)\n  - [docs/cmake.md](docs/cmake.md)\n- **Release \u0026 CI (maintainers)**\n  - [docs/RELEASE_GUIDE_ZH.md](docs/RELEASE_GUIDE_ZH.md)\n  - CI workflow: [.github/workflows/build.yml](.github/workflows/build.yml)\n- **Changelog**\n  - [docs/VERSION_LOG.md](docs/VERSION_LOG.md) – shown in the About tab.\n\n## Safety and disclaimer\n\nWorking with device partitions and bootloaders is inherently risky. Incorrect\noperations can brick a device and may lead to data loss.\n\n- Always back up critical partitions before flashing or using advanced tools.\n- Do not use functions you do not fully understand.\n- Read the warnings in the user guide and on the Advanced Operation tab.\n\nSFD Tool is distributed under the terms of the GPL. See the repository for\nlicense details.\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=C-Hidery%2Fsfd_tool\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=C-Hidery/sfd_tool\u0026type=date\u0026theme=dark\u0026legend=top-left\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=C-Hidery/sfd_tool\u0026type=date\u0026legend=top-left\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=C-Hidery/sfd_tool\u0026type=date\u0026legend=top-left\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hidery%2Fsfd_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-hidery%2Fsfd_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hidery%2Fsfd_tool/lists"}