Home > Tips and Tricks

How to Use ADB and Fastboot Commands on Android Without PC

In this guide, we will show you the steps to use ADB and Fastboot Commands on Android without a PC. Android ecosystem, being open source in nature, allows you to carry out a plethora of tweaks. By tweaks, the community is usually divided into two halves. The first set of users are those who like to customize their devices by installing icon packs, themes, custom launchers, and the likes. They usually constitute the majority of the user base.

However, there exists another niche segment of users who like to explore the full potential of their devices. This latter group, though small in numbers, are the tech enthusiasts. They unlock the device’s bootloader, try out tons of custom ROMs, install a custom recovery such as TWRP, and gain access to the system partition by rooting it via Magisk [using TWRP or without TWRP, by patching stock boot.img].

However, there is still one string common in both these groups. The use of ADB and Fastboot Commands. The everyday users might use it to boot their device to stock Recovery and then carry out tasks such as Wipe Data or Install Update from Sideload. Likewise, they could also use them to install APKs or uninstall bloatware.

Then the geeky users could make use of these commands to flash or boot their device to TWRP, install magisk patched boot.img, unlock the bootloader, boot to Bootloader, or Fastboot Mode among others. Well, the advantages are plenty, but so are the complications involved in setting it up. So what else could be done?

Well, you could use and execute ADB and Fastboot Commands on Android without setting it up on your PC. And in this guide, we will help you with just that. But first, let’s make you aware of the benefits and drawbacks of this method. Follow along. On the other hand, if you have a non-rooted device, then check out this guide: How to Run ADB Fastboot Commands directly on Android without Root



Benefits and Downsides of Using ADB and Fastboot Command without PC

While using ADB and Fastboot Commands on your PC, you will have to set up the Android SDK Platform Tools. Likewise, you will also have to Enable Developer Options and then USB Debugging on your device. After this, you will have to launch CMD or PowerShell directory and then connect your device to the PC via USB cable. Only then you will be able to type in your desired commands. Phew! That calls for a lot of effort. But even done, a few errors such as the below ones occur every now and then (which then requires even more efforts to fix):

As a result, use ADB and Fastboot Commands on Android without PC seems to be the perfect escape route. Well, it is but with a few strings attached. Since we wouldn’t be using a PC to carry out the aforementioned task, you will need another host in the form of an Android device. And this device needs to be rooted. Apart from that, you will also need a USB OTG to connect your device with the host device.

So a second Android device (first will be your own :D), with root access and the requirement of the OTG is something that might persuade some users from trying out this task. However, if that’s good with you and you are ready to proceed ahead, then here are the steps to use ADB and Fastboot Commands without a PC.

Why Run ADB Fastboot Commands directly on Android?

The usage of Android and Fastboot Commands are among the most powerful tools for the Android user. It doesn’t matter whether you are a general user or the tech enthusiasts, these commands will come in handy for all. The general usage of these commands includes the ability to boot to stock recovery, installing or uninstall apps via commands, Apply Update via Sideload among others. Then the tech geeks could use these commands to unlock the device’s bootloader and boot or flash TWRP to their device.

termux adb fastboot

Likewise, they could also flash stock firmware via Fastboot Commands, unbrick their device using the Fastboot Commands, etc. However, executing these commands on a PC calls for a lot of effort. To begin with, you will have to download and install Android SDK Platform Tools on your PC. Then you should launch the CMD or PowerShell window inside the platform-tools folder. After that, it also requires you to enable Developer options and then USB Debugging on your Android devices. Apart from that, issues such as the below ones are also likely to occur in some instances.

All in all, some new or first-time users might really find it difficult to deal with all these. Hence the perfect way forward is to run ADB and Fastboot Commands directly on your Android device without root. And in this guide, we will help you with just that. The biggest perk of using the below method is the minimal effort involved. You only have to copy-paste one single command and the task stands complete. So without further ado, let’s start off with the guide.

METHOD 1: Run ADB Fastboot Commands directly on Android via Bugjaeger

In this method, we will show you the steps to get this job done via the Bugjaeger app. For the sake of reference, we will be unlocking the device’s bootloader, you are free to carry out any tweak of your choice.

  1. First off, connect the USB OTG adaptor to your second device.
  2. Likewise, plug in the USB Type A end to the OTG.
  3. On the other hand, plug the Type C end into your primary device.
    Unlock bootloader without PC
  4. Now download and install the Bugjaeger app on your second device.
  5. Then launch the app and you’ll get a prompt “Open Bugjaeger to handle <device name>”. Tap OK.Unlock bootloader without PC
  6. Now from the Commands page of the app, tap on List Devices. Your primary device should be listed at the bottom.Unlock bootloader without PC
  7. If that doesn’t happen, then unplug and replug the USB cable/OTG. You might have to do this a few times until you get the prompt/device name.
  8. Once that happens, tap on the Reboot Bootloader icon. Your primary device will now boot to Fastboot Mode.Unlock bootloader without PC
  9. Then tap on the shell icon at the bottom right of the app. This will open the Command window. Type in the below command:
    fastboot devices

    Unlock bootloader without PC

  10. Make sure that you are getting a serial ID. If that is not the case, then carry out the USB/OTG tweak until you get the ID.
  11. Finally, type in the below command to unlock the bootloader
    fastboot flashing unlock

    unlock bootloader without pc

  12. Your device will undergo a reboot and subsequently boot to the OS.

METHOD 2: Run ADB Commands directly on Android via ADB Shell

  1. Head over to Settings > About Phone > Tap on Build Number 7 times.
  2. Then download and install the ADB Shell app on your device.
  3. Now launch it and enable the toggle next to Pairing Code.Run ADB Fastboot Commands on Android
  4. Then go to Settings > System > Developer Options > Enable Wireless Debugging.Run ADB Fastboot Commands on Android
  5. Now we will have to carry out the rest of the steps in the split screen mode. This is because the information that we are about to get tends to get refreshed every time it is minimized, which in turn will end up bullying this fix. So to prevent that from happening, we will have both the wireless debugging and the app opened at the same time.
  6. S0 perform an upward swipe gesture such that Wireless Debugging is now inside the recent apps screen.Run ADB Fastboot Commands on Android
  7. Then tap on its icon and select Split Screen. Now choose ADB shell as the second app.
  8. Now ‘tap’ on Wireless Debugging. Then tap on Pair Device with Pairing Code.
  9. You’ll now get the WiFi Pairing Code, IP Address, and Port Number.
  10. Now type in the IP Address and Port Number in the ADB Shell app and hit Pair. Run ADB Fastboot Commands on Android
  11. You’ll get a prompt, tap General, and enable the toggle next to Allow access to files.
  12. Then come back to the app and again tap on Pair. You’ll now be taken to the shell.
  13. Type in the Pairing code and hit Enter. You should get the “successfully paired” prompt.
  14. Finally, type in adb devices and make sure that you are getting an ID.Run ADB Fastboot Commands on Android

METHOD 3: Run ADB Fastboot Commands on Android via Termux

We have listed out the detailed instructions in separate sections for ease of understanding. Proceed in the exact same sequence as mentioned and the task will be over within minutes. [Don’t Miss: Wireless Debugging Feature of Android 11: How to Use].

STEP 1: Create a Host Device

First up, you will need to have another Android device (non-rooted/rooted doesn’t matter) to carry out this process. This second device will actually act as a host device (similar to what a PC does when we execute these commands). Apart from that, you will also need a USB Type C to Type C cable to connect both these devices (if both the devices have Type C ports).

type c to type c cable
USB Type C to Type C Cable. Credits: Amazon

On the other hand, if one of the devices has a Micro USB and the other is USB Type-C, then you will need a Micro USB OTG cable and a USB A to USB C cable for the connection.

STEP 2: Enable USB Debugging on Both the Devices

oem unlock usb debugging

Next up, enable USB Debugging on both these devices. This is needed so that the host device is able to recognize your primary device in the ADB mode. So head over to Settings > About Phone > Tap on Build Number 7 times (Xiaomi users tap on MIUI number 7 times)> Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging. [Don’t Miss: How to Enable USB Debugging on a Broken Android Device’s Screen]



STEP 3: Connect Primary Device to Host Device

Once debugging is enabled on both the devices, connect them via USB Type C to Type C cable or Micro USB OTG as discussed above. As soon as the connection gets established, you will get an Allow USB Debugging on both these devices. Tap on Allow (and even checkmark the Always allows from this computer if you don’t want to be greeted with this prompt every time).

authorize usb fingerprint fix adb device missing error

You may now proceed with the steps to run ADB and Fastboot Commands directly on your Android device without root. Do keep in mind that the below instructions (in STEP 4) are to be carried out on the host device. So everywhere you see the ‘device’ word in the below instructions, it means the ‘host device’ (unless stated otherwise). Then once the ADB and Fastboot binaries are installed on this host device, you may connect your primary device to this host and execute the desired commands.

STEP 4: Run ADB and Fastboot Commands directly on Android

  1. First and foremost, download and install the Termux app on your device.
  2. Now launch the app, copy-paste the below command, and hit Enter:
    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

    ADB Fastboot Commands on android via termux

  3. The necessary dependencies and configuration will now be automatically downloaded and installed on your device. After every few seconds, you might get a prompt asking whether you wish to install each of these dependencies or not (see below image). You will have to type in Y and hit Enter each time. In my testing, I had to type in Y a total of around five times.
    termux prompt
  4. In the end, you will be greeted with the message to Install ADB and Fastboot or Uninstall ADB and Fastboot. Type 1 and hit Enter.
    android adb and fastboot installer termux
  5. The installation will now begin and should take a couple of minutes. Once done, you will be greeted with Tools were successfully installed message.
    adb fastboot installed termux
  6. To check for the successful installation of ADB and Fastboot binaries, type in adb and hit Enter. You should get a long list of all the supported commands, indicating that all the required files are now installed.
    adb fastboot command termux android
  7. Now connect your primary device to this host device. You may now execute the desired ADB and Fastboot Commands on your host Android device without root and the result will be seen on the primary device. For example, you may type in adb reboot bootloader on your host device and your primary device will be booted to Fastboot/Bootloader mode. Interesting, isn’t it?

With this, we conclude the guide on how to run ADB and Fastboot Commands on an Android device without root. Furthermore, we haven’t made use of the PC anywhere during this process. With that said, if you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.



What is the Meaning of the Above Command?

So let’s break down the above commands and understand what each one of them means. First and foremost, we have combined numerous commands into one single command using the && character. Just to recall, the command was:

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

As you could see, after each && a new command begins. Here is what each of them does:

  • pkg update: Update the package
  • pkg upgrade: Upgrade the Termux package
  • pkg install python: Used to install Python on your Android device.
  • pkg install git: Installing the GIT package from GitHub
  • git clone https://github.com/freetheorange905/adb-fastboot-termux.git: It is used to install ADB and Fastboot Git using Termux
  • cd adb-fastboot-termux: Changing the Termux directory to the location where ADB and Fastboot Git is installed on your device.
  • python af.py: Installing the Python library

Well, if you would ever like to take a longer route, you could also execute each of these commands individually in the Termux window. For example, type in pkg update and hit Enter, then execute pkg upgrade and so on until python af.py. This will also give you the same results. Just to make things easier, I have added all the commands into one single command using &&.

METHOD 4: Use ADB Fastboot Commands on Android Without PC via Root

Before listing out the instructions, we have mentioned all the prerequisites below. Make sure you check-mark all these requirements and only then proceed with the instruction set. [Don’t Miss: Wireless Debugging Feature of Android 11: How to Use].

Prerequisites

That’s it. These were all the requirements. You may now proceed with the steps to use ADB and Fastboot Commands on Android without a PC.

STEP 1: Install Android and Fastboot on Android

The first step requires you to install Android and Fastboot on your host device (the rooted Android device). Follow the below steps to do so:

  1. Launch the Magisk Manager app on your device and tap on the Modules icon situated at the bottom.
  2. Search for ADB and this should bring up the ADB & Fastboot for the Android NDK module.
    adb fastboot magisk module
  3. Tap on the Downloads icon situated at the bottom right.
  4. Then tap on Install in the confirmation dialog box.
    install adb fastboot on android
  5. Once the module is installed, tap on the Reboot button at the bottom right.

STEP 2: Install Termux App

Termux is a terminal emulator app for Android devices. It allows you to execute various superuser commands. As for this guide, we will be executing various ADB and Fastboot commands inside the Termux window itself (similar to how we do so on the Command Prompt window on your PC).

termux app adb fastboot commands

So head over to the Play Store and download the Termux app on your rooted Android device (the host device). Once downloaded, install it and proceed to the next step to use ADB and Fastboot Commands on Android without a PC.



STEP 3: Enable USB Debugging

usb debugging oneplus

You will now have to enable USB Debugging on your primary device. This is again similar to what you would have done if you were to connect your device to the PC for executing commands. So head over to Settings > About Phone > Tap on Build Number 7 times (Xiaomi users tap on MIUI Number 7 times) > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging. [Don’t Miss: How to Enable USB Debugging on a Broken Android Device’s Screen]

STEP 4: Connect both the Android Devices

Most newer Android devices come with Type C ports. So if both your Android devices have Type C ports, then you only need a single USB Type-C cable. On the other hand, if one of the devices has a Micro USB and the other is USB Type-C, then you will need a Micro USB OTG cable and a USB A to USB C cable as well. As far as the connection is concerned, if both the devices have Type C then you could simply connect them using the USB Type-C cable.

type c to type c cable
USB Type C to Type C Cable. Credits: Amazon

On the other hand, if you are using the OTG adapter, then connect it to the host rooted device. After this, connect the USB cable from OTG to your primary device. As soon as you connect both the devices, you will get the USB Debugging prompt on both these devices, tap OK on both these devices. You may also enable Always allow from this computer option on both the devices (see below image). Now that the connection stands successful, you may now proceed with the steps to use ADB and Fastboot Commands on Android without a PC.

authorize usb fingerprint fix adb device missing error



STEP 5: Use ADB Commands on Android Device without PC

Now that both the devices are connected, it’s time to start off with the process. Follow the below steps for that:

  1. Launch the Termux app on the host device (the rooted Android device).
  2. Type in the below command and hit Enter:
    su
  3. It will now bring up the Magisk popup, tap on Grant.
    get root access via termux
  4. Once done, you may now execute the following command:
    adb devices
  5. Doing so will give you the primary Device ID, signifying that the ADB connection stands successful. You may now execute your desired commands on the host device and see the result on the primary device. Quite interesting, isn’t it?

On that note, we conclude the guide on how to use ADB and Fastboot commands on Android without a PC. If you have any queries concerning the aforementioned instructions, do let us know in the comments section. We will get back to you with a solution at the earliest.


Share: