Start · Check your phone · Guide · Fix a problem · How it works
Made by Shivraj · Telegram @Shivraj_editx · GitHub
| The phone that runs spft (the host) | The device you want to fix (the target) |
|---|---|
| Rooted (Magisk, KernelSU, APatch) | A MediaTek (MTK) chip. Not Qualcomm, Exynos or Unisoc. |
| Android 8 or newer, with a 64-bit kernel | The exact firmware for your model, unzipped, with a ..._scatter.txt file |
| An OTG adapter and a data USB cable | Switched off when you connect it |
| About 3 GB free space, and internet for the install | A battery as full as you can get it |
Not sure about your phone? Check it first. It installs nothing. All the details are in the Guide.
Download them from these links, not from Google Play. Open each app once after you install it.
| App | What it is for | Get it |
|---|---|---|
| Termux | The terminal where you type spft |
F-Droid or GitHub |
| Termux:X11 | The screen the tool is shown on | GitHub nightly: the file termux-x11-universal-debug.apk |
| Termux:API (optional) | Only for other Termux tools. spft works without it. | F-Droid or GitHub |
Important
Termux and Termux:API must come from the same place (both F-Droid, or both GitHub). They are signed with different keys. More rules: Guide, section 2.
Open Termux, paste this one line and press Enter:
pkg update -y && pkg install -y git && git clone https://github.com/shivrajtode/spft ~/spft && bash ~/spft/install.sh
- At the very start your root app asks: press Allow for Termux, quickly. (KernelSU and APatch may show no window: switch Termux on in their Superuser list before you start.)
- The first time it takes 15 to 30 minutes and downloads a few hundred MB. Keep Termux open and the phone charging. A quiet screen is not a hang: what you will see.
- Stopped half way? Run
bash ~/spft/install.shagain. It only does what is still missing.
Why two commands, and not only git clone?
git clone only copies files. Git never runs a program from a repository (that would be unsafe), so the install is one more command, install.sh. The line above does both for you.
When you see done. Start SP Flash Tool with: spft, type:
spft
SP Flash Tool opens on the Termux:X11 screen, fitted to your display. Next: flash your device without errors.
Can this phone be the host? Find out without installing anything. In Termux paste:
bash <(curl -fsSL https://raw.githubusercontent.com/shivrajtode/spft/main/check.sh)
It downloads a few small files into a temporary folder, tests the phone, and deletes them again. Your root app may ask: press Allow for Termux. (If it says curl: command not found, run pkg install curl first.)
The check ends with a Result: whether spft can run on this device, and what to keep in mind. More about the check, with the output of a tablet that cannot flash.
spft sets up all of this for you. Termux is where you type, Debian is a small Linux system inside your phone, box64 lets it run SP Flash Tool (made for x86_64 PCs), and Termux:X11 shows the tool's window. The details (folders, settings, tests) are in How it works.
| Command | What it does |
|---|---|
spft |
Start SP Flash Tool |
spft stop |
Force-stop everything of spft and clear the caches. Never while it flashes. |
spft check |
Test the phone and the setup, with a hint for every problem |
spft update |
Get the newest spft and apply it |
spft tool |
Install or change SP Flash Tool, for example when its download fails |
spft uninstall |
Delete the Debian system and the downloads. Asks first. |
spft help |
Show all commands |
All commands and screen options: Guide.
|
Guide Every step in order: your files, flashing without errors, Android 12 and newer. |
Fix a problem Error codes ( 1013, 2005, 5054, ...), a black screen, a device that is not found.
|
How it works Folders, settings and tests, for the curious. |
Still stuck? Open an issue at https://github.com/shivrajtode/spft/issues and paste the output of spft check.
Warning
Flashing the wrong firmware, or interrupting a flash, can permanently damage a device. You use this at your own risk.
- Tested on a Samsung Galaxy J7 Max (Android 8, 32-bit Android on a 64-bit kernel) with SP Flash Tool v5.2228. The install, the commands and the download logic are also covered by automatic tests that use stand-in programs (
bash tests/run_all.sh). Other devices should work if they meet the requirements. Please report what you find. - Devices with secure boot (they ask for an Auth file, or report errors like
S_AUTHorSTATUS_BROM_CMD_SEND_DA_FAIL) usually cannot be flashed with SP Flash Tool alone. mtkclient can work around this on many of them. - SP Flash Tool belongs to MediaTek. It is not part of this repository and is downloaded when you install.
Made by Shivraj: Telegram @Shivraj_editx, GitHub shivrajtode.
And Special thanx💖 to my friend Kaif Telegram @mkr_infinity for recommending spflashtool linux version and giving some guide about it.
Thanks to Termux, Termux:X11, box64, Debian, mtkclient, and the Hovatek forum for its SP Flash Tool guide and error code list.
License: MIT (this repository only, not SP Flash Tool).