Setup Termux for TWRP & Fastboot ROM No PC Flashing Guide
Part of TWRP guides, 2025 guides.
Yes, you can flash TWRP, fastboot ROMs and GSIs straight from the phone with no PC, using Termux. You install Termux plus Termux:API with the right versions for your Android release, grant storage and API permissions, then pull the tool from GitHub and run its commands one at a time. Miss any of those setup pieces and the flash tool opens and finds nothing.
The video starts muted so it does not blast at you — tap the speaker to hear it, or open it on YouTube.
This is the setup everything else leans on. Before you can flash anything from Termux, Termux itself has to be right: the correct version for your Android release, the right permissions, and the tool loaded from GitHub. Skip a piece and the flash script opens and finds nothing, which is a confusing way to fail because nothing looks broken.
Two things catch people every single time. First, the Play Protect warning during install — you have to pause protection for a minute or the APK simply refuses to install. Second, storage permission, which you grant once when Termux asks.
After that it is copy, paste, enter, one command at a time. Nothing clever. Just order.
What you need
- Termux — pick the APK that matches your Android version. The older build is the one for Android 13 and below.
- Termux:API — you need this alongside Termux, and both want their permissions granted.
- The Termux Root Recovery Tool from its GitHub page.
- Enough free storage on the phone for the ROM files.
- Patience for Play Protect complaining about an app that did not come from the store.
Step 1 - install Termux and Termux:API
Install both. If Play Protect blocks the install, pause protection for a moment, finish the install, then turn it back on. Fighting Play Protect instead of pausing it is the main reason people get stuck here before they have even run a command.
Step 2 - grant the permissions
Open Termux:API and accept what it asks for, including notification access. It is asking because the tool needs those pieces later. Deny them now and you will be back here wondering why a later step failed.
Step 3 - run the commands, one at a time
Open Termux and work through the commands on the GitHub page in order. Do not paste the block all at once. If something fails in a pasted block, the failure scrolls past you and you keep going on a broken setup. One line, enter, look at the result, next line.
The sequence starts with updating packages, then setting up storage, then installing the API package, git, and the Android tools. From there you clone the tool from GitHub, move into its folder, make its scripts executable, install the ADB helper, and run the flash script.
Step 4 - storage permission when it asks
The termux-setup-storage step is the one that gives Termux access to your files. Android will show you a permission prompt — accept it. If you skip this, the tool cannot see the ROM files sitting in your Downloads folder.
Step 5 - install the ADB helper
This is the last piece. The ADB helper is what lets the tool actually talk to a device over USB. Without it, everything else is set up correctly and still cannot reach a phone in recovery or bootloader mode.
Step 6 - run the flash script
Run it, and you are ready to start flashing ROMs and recoveries from the phone itself. No PC in the loop.
Where people get stuck
- Wrong Termux build for your Android version. The first command then errors out and nothing after it makes sense. Match the version to your release.
- Skipping Termux:API. This breaks the storage and notification bits the tool relies on, and the failure shows up later, far from the cause.
- Pasting everything at once. A failure gets buried in the scroll and you carry on building a broken setup.
Does this need root?
No. Termux itself does not need root for this setup, and neither does the install. Root is a separate decision you make later, on its own merits.
One honest note
The first time through this, give yourself a clear half hour and do not rush the command step. The commands are not hard — the trap is doing them fast. Read each result, then move on.
If the PC side of flashing is what you have been putting off, the free Rom Flasher tool on GitHub bundles the ADB and fastboot driver install into a couple of clicks so you are not stuck in Device Manager. It is free, and the link is in the downloads section.
Links / Downloads
- https://github.com/Ishu43642/Termux-Root-Recovery-Tool.git
- https://raw.githubusercontent.com/nohajc/termux-adb/master/install.sh
- Termux Root Recovery Tool — https://github.com/Ishu43642/Termux-Root-Recovery-Tool
- Rom Flasher tool (free) — https://github.com/romflasher3419-spec/rom-flasher-tool/releases/latest
- ADB & Fastboot Tool — https://tmearn.net/link/8kQcy
- ADB & Fastboot Driver — https://tmearn.net/link/PSM2
Use the file built for your exact model and region. A package for another variant is the quickest way to a phone that will not boot.
Full description from the video
Setting up Termux on Android so you can flash TWRP, fastboot ROMs and GSIs from the phone itself — the whole install, permissions and command list.
This is the video everything else leans on. Before you can flash anything from Termux, Termux itself has to be installed with the right version for your Android release, given storage and API permissions, and then loaded with the tool from GitHub. Skip any of those and the flash tool opens and finds nothing.
Two things trip people up every time. First, the Play Protect warning during install — you have to pause Play Protect for a minute, or the APK just refuses to install. Second, permission to storage, which you grant once when Termux asks. After that it's copy, paste, enter, one command at a time from the tool page. Nothing clever, just order.
🔧 What You Need
- Termux — pick the APK that matches your Android version, the older one for Android 13 and below
- Termux:API — you need this one alongside Termux, and both want their permissions
- The Termux Root Recovery Tool from its GitHub page
- A phone or tablet with enough free storage for the ROM files
- Patience for Play Protect complaining about an app from outside the store
📝 Steps
- Install Termux and Termux:API. If Play Protect blocks it, pause protection for a moment and continue.
- Open Termux:API and accept the permissions it asks for, including notification access.
- Open Termux and run the commands from the GitHub page one at a time, not all at once.
yes | pkg update && upgrade
termux-setup-storage
pkg install termux-api
yes | pkg install git
yes | pkg install android-tools
git clone https://github.com/Ishu43642/Termux-Root-Recovery-Tool.git
cd Termux-Root-Recovery-Tool
chmod -R +x .
curl -s https://raw.githubusercontent.com/nohajc/termux-adb/master/install.sh | bash
./flash.sh
- Grant storage permission when Termux asks — that's the termux-setup-storage step.
- Install the ADB helper at the end so the tool can talk to a device over USB.
- Run the flash script and you're ready to start flashing ROMs and recoveries.
⚠️ Where People Get Stuck
- Installing the wrong Termux build for the Android version and getting errors on the first command.
- Skipping Termux:API, which breaks the storage and notification bits the tool relies on.
- Pasting all the commands at once instead of one line at a time, so a failure gets buried.
❓ Common Questions
Does this need root? No. Termux itself doesn't need root for this setup.
Which Termux do I install? The version that matches your Android — newer builds for Android 14 and up.
Do I need a PC for this part? No, everything here happens on the device.
Common questions
Does Termux need root to flash ROMs?
No. Termux itself does not need root for this setup, and neither does the Termux Root Recovery Tool install. Root is a separate thing you can add later if you want it, but nothing in this guide depends on it.
Which Termux version should I install?
The one that matches your Android release. Newer builds are for Android 14 and up, and the older build is the one for Android 13 and below. Installing the wrong one is why the first command throws errors.
Why does my flash tool open and find nothing?
Almost always a missing piece of the setup. Check that you installed Termux:API, granted storage permission when asked, and installed the ADB helper at the end. The tool needs all three to see your files and talk to the device.
Do I need Termux:API as well as Termux?
Yes. Termux:API is a separate app and the tool depends on the storage and notification pieces it provides. Install both and grant both sets of permissions, including notification access.
Can I do this without a PC?
Yes, that is the point of this setup. Everything here happens on the device itself — install, permissions, the tool, and the flashing. You only need a PC if you would rather flash from a computer.
Before you flash
- Back up everything you would miss — unlocking and flashing usually wipe the phone.
- Check the file is built for your exact model and region.
- Keep a PC and a working cable around so a bootloop can be recovered.
Keep reading
TWRP on Xiaomi 11T Pro Flash Recovery With One Fastboot Command
TWRP on the Xiaomi 11T Pro — one fastboot command boots the recovery, then you make it stick from inside TWRP itself.
TWRPXiaomi 11T ProFlashXiaomi 11T Pro · 6 Nov 2022Root POCO X7 Pro With Magisk No TWRP Needed — Full Steps
Rooting the POCO X7 Pro with Magisk — no TWRP, no custom recovery, just a patched boot image and a couple of fastboot commands.
TWRPPOCO X7 ProInstallPOCO X7 Pro · 12 Oct 2025PixelExperience Plus on Mi Pad 5 Android 13 Sideload Guide
PixelExperience Plus on the Xiaomi Pad 5 — Android 13, sideloaded through recovery, with the command order that gets it booting the first time.
Pixel ExperienceXiaomi Pad 5FlashXiaomi Pad 5 · 10 Mar 2023LineageOS 20 Android 13 on Mi Pad 5 Fastboot Install Guide
LineageOS 20 with Android 13 on the Mi Pad 5 — a weekly test build, plus the fastboot install route it needs.
LineageOSXiaomi Pad 5FlashXiaomi Pad 5 · 19 Feb 2023Unlock Bootloader Xiaomi 11T Pro Mi Unlock Tool, Step by Step
Unlocking the bootloader on the Xiaomi 11T Pro with the Mi Unlock Tool — the exact steps, plus the wait nobody warns you about.
Bootloader unlockXiaomi 11T ProInstallXiaomi 11T Pro · 5 Nov 2022HyperOS 3 for Xiaomi Pad 5 Official Build Download & Flash
HyperOS 3 is available for the Xiaomi Pad 5 as an official build — here's how to download it and get it onto the tablet.
HyperOSXiaomi Pad 5FlashXiaomi Pad 5 · 2 Oct 2025