ADB and Fastboot are versatile command-line tools for Android devices and emulators. It’s very easy to download and setup ADB and Fastboot on Windows, macOS, and Linux. Since Google doesn’t provide the Android SDK platform-tools for Android devices officially, it’s not easy to install ADB and Fastboot on Android devices via the Termux terminal emulator app and Web ADB without root and a laptop or PC.
It’s possible to install ADB and Fastboot on Android by cloning any of the 3 Gits listed below using a terminal emulator like Termux.
Installing ADB and Fastboot via Termux
If you are a Mac user, don’t forget to check out my detailed tutorial on installing ADB and Fastboot on macOS.
Now let’s see how you can install ADB and Fastboot on an Android phone or tablet.
- Download and install Termux from the Play Store.
- Having installed the app, you need to grant Storage permission to Termux. To do so, go to Settings > Apps > Termux and tap on Permissions. Then tap on Storage and select Allow.
- Now open Termux, type the following command and tap the Enter key on the keyboard.
- Now, execute the following command to upgrade Termux packages.
- Since ADB Fastboot Termux is a Python-based script, we need to install Python on the Android device. Issue the following command in Termux.
pkg install python
- While Python is being installed on your Android device, you might be prompted to authorize the installation by typing ‘Y‘ (for Yes).
- Since we have to clone a Git from Github, you’ll need to install another package called Git using this command.
pkg install git
- Okay, it’s time now to clone the ADB Fastboot Termux Git using Termux.
git clone https://github.com/freetheorange905/adb-fastboot-termux.git
- Now that the ADB and Fastboot Git has been cloned to your Android device we need to change the path directory path using
cdas shown below (see the screenshot above).
- Finally, execute the following command in Termux.
- As soon as you tap the Enter key, a new screen will appear and you would be prompted to type 1 to install ADB and Fastboot on your Android device, and 2 to uninstall if already installed them. Type 1 and tap the Enter key.
- When ADB and Fastboot are installed, you’ll get a message saying, “Tools were successfully installed!“
You can also install the ADB and Fastboot tools on your Android using a single command. This command includes all the above commands in one line.
pkg update && pkg upgrade && pkg install python && pkg install git && git clone https://github.com/freetheorange905/adb-fastboot-termux.git && cd adb-fastboot-termux && python af.py
If you own a Samsung Galaxy device, you can download Samsung firmware on your phone or tablet via Termux. Read my detailed tutorial to learn how you can do that.
Having set up ADB and Fastboot on your Android phone or tablet, it’s time to verify that you have done everything as expected. Type one of the following commands in Termux and tap the Enter key.
adb or adb help
As you can see below, you’ll get information such as the Android Debug Bridge version and other ADB options on your phone’s screen.
Please note that if you run the
adb devices command, you won’t get any device ID under the list of devices attached because your Android device will now act like an ADB/Fastboot host.
Please note that in order to use ADB and Fastboot commands, your host Android device needs to be rooted as it can be done using a Magisk module called ADB & Fastboot for Android NDK. I’ll be updating this tutorial describing the steps to use ADB commands without a PC or laptop.
Using ADB Commands on Android without Root
Very recently, a developer named Yume Chan launched a website that lets us use ADB commands on Android devices via mobile browsers like Chrome and Microsoft Edge. It means that now we no longer need a rooted Android device to use ADB. Web ADB, as it’s aptly named, makes use of the WebUSB API found in all Chromium-based desktop and mobile browsers.
Web ADB comes with a bunch of features. It lets you send you ADB commands from one Android device to another, mirror the screen and control the other device, install APK, browse the files on the other device, capture screenshots, etc.
- Two Android devices (phone or tablet).
- A USB OTG or a USB Type-C to a USB Type-C cable.
- Enable USB debugging on the Android device you want to send ADB commands to.
Let’s see how to use Web ADB to run ADB commands on Android devices without root. You can one of two Android devices you have as a host to perform ADB commands on the other device.
- Open Web ADB website on the Android device you want to use as a host.
- Tap the 3-dot icon in the Chrome browser and enable the Desktop site option.
- Insert the USB OTG or the USB Type-C cable on the device you want to use as a host. Now plug in the other end of the USB cable into the client Android device you want to send the command to.
- Tap on the Add Device option on the Web ADB website. Select your device in the pop-up window and tap on the Connect button.
- Tap on OK when the browser asks to grant access to your connected device.
- At this point, you will receive a notification on your second device asking you to Allow USB debugging. Tap on Allow.
- You’ll see your device codename in the Web ADB command box. It means that both the devices have been appropriately connected for ADB operations.
- You’re now all set to use ADB commands or ADB Shell commands to control the connected Android device. Just keep in mind that you are supposed to omit “adb” and “adb shell” in the commands that you use while executing them on a computer. For example, if you want to reboot the connected Android phone or tablet into the bootloader mode, you should use just
reboot bootloaderand tap on the Enter key on the keyboard.
You can execute any other ADB command on your Android device without a laptop or PC without rooting your device.