قالب وردپرس درنا توس
Home / Tips and Tricks / How to Send ADB and Fastboot Commands from One Android Phone to Another «Android :: Gadget Hacks

How to Send ADB and Fastboot Commands from One Android Phone to Another «Android :: Gadget Hacks

ADB and Fastboot are powerful tools that always required a computer. But with the correct configuration, you can now send commands to a phone with another phone.

The ADB and Fastboot Magisk module, by osm0sis and Surge1223, turns your phone into an ADB terminal using root access. You can then connect it to another phone with a USB Type-C cable and send commands to the kid’s device. This means you can also unlock the bootloader on other phones, install TWRP directly, and even root via Magisk – no computer required!


This guide is mainly for someone who already has a rooted Android device. If you don̵

7;t currently have a backup phone with root access or don’t know how to do it, this may not be for you. You can always check the link below for the normal ADB and Fastboot computer instructions.

Step 1: Install ADB & Fastboot for Android

On your already rooted phone, go to the Magisk Manager app and tap the puzzle piece icon on the menu bar at the bottom of the screen. Here, tap the search icon and type “adb” in the field, then tap the download button next to it ADB & Fastboot for Android NDK module. Tap “Install” and allow Magisk Manager to access your media when prompted and it will be installed. When done, tap “Restart”.

Step 2: Install the Termux app

You need a terminal app on the phone that has root access to send the ADB and Fastboot commands to the other phone. Some phones allow you to use a system terminal through the developer options, but the most universal method is to download the Termux app.

  • Play Store Link: Termux (Free)

Step 3: Enable USB debugging

On the secondary phone you want to send commands to, you must turn on the “USB debugging” switch in the developer options so that the phone accepts commands. So go to Settings–> About phone, then tap “Build Number” seven times quickly to enable Developer Options, then open the menu from Settings -> System -> Advanced (or at the bottom of Settings) and enable “USB debugging”.

Step 4: Connect the 2 Android phones

If both phones were released in the past five years, you probably only need one USB Type-C cable to connect them together. However, if you don’t have a Type-C cable that has the same connector on both ends, you will need an OTG adapter. Many new phones come with this adapter in the box, so check to see if you have one from a previous purchase.

If one of the phones is Micro USB and the other USB Type-C, you will need two things: a Micro USB OTG cable and a USB A to USB C cable. You can pick up either of these from Amazon for pretty cheap.

An example of two newer phones connected with a single USB Type-C data cable. Image by Stephen Perkins / Gadget Hacks

If you need to use an OTG adapter, connect it directly to the phone with root access and Termux installed, then connect the USB data cable to the other phone from there. Otherwise, you’ll be using a Type-C to Type-C cable, which means it doesn’t matter which phone you connect first as they both use the same connector. It all comes down to which cables you have at your disposal at the time.

Step 5: Allow USB debugging

Once both phones are physically connected, the secondary phone should immediately receive the “allow USB debugging” prompt (if not, try connecting the phone again). Check the box next to ‘Always allow’ and click ‘OK’ to confirm the choice. This means that your primary phone is now identified as a trusted device and can send commands to the secondary device at any time.

If you don’t see this dialog right away, don’t panic – you can continue with this guide. Just keep an eye out for this popup, especially after submitting the command in Step 7.

If your secondary device is a recent Samsung phone, you probably need to change the “USB controlled by” option from the file transfer notification. Change it from “Connected Device” to “This Phone”, and once it is switched, the USB debugging prompt should appear. This can be the case for other specific devices as well, so keep that in mind if things don’t work for you right away.

If you want to prevent one phone from draining the battery of another, you must disable the option “Charge connected device”. This only affects phones with a Type-C charging port so keep that in mind for future reference as well.

Step 6: Grant root access

Now go to the phone that has Termux installed so you can grant it root access, which is what it takes for all of this to work. Type the following command in Termux and hit enter.


The above command will ask Termux to obtain root rights through Magisk. Confirm the Superuser request by tapping “Grant” and it will now have full root access. You will always have to run this quick command when doing something that requires root access in a terminal, but you don’t have to tap “Grant” after the first time.

Step 7: Check your phone connection

Now that your two phones are physically connected, it’s time to verify the connection to make sure everything is working properly. On the rooted phone with terminal access, type the following command in Termux then hit enter.

adb devices

This command sends a signal to the other phone to verify that it can communicate over ADB. If successful, you should see a device ID appear under the “List of connected devices” line in Termux. If you do see your device ID, it means everything is working as intended!

(1) No devices are listed if something went wrong. (2) If all goes well, the device ID will be displayed with a unique identification of numbers and letters.

To try out the new functionality, type the following command in Termux, and hit enter.

adb reboot

This command sends a signal to your other phone, causing it to automatically reboot the system. Decently! You just told one phone to reboot another phone through a command line environment through the ADB interface.

Step 8: Enjoy your new ADB and Fastboot commands

The two commands I mentioned above are clearly fundamental, but they’re just a gateway to the much bigger picture. You can use this new functionality to install all kinds of mods you want on another phone, especially TWRP and Magisk. Being able to use one phone to modify another phone brings light to new possibilities – imagine unlocking the bootloader of a friend’s phone on the spot!

Alternatively, you should also be able to achieve the same end result with an Android tablet if you prefer to do it that way. As long as the tablet has an unlockable bootloader and can be rooted via Magisk, it should work exactly the same. While Android tablets are not that popular compared to their smartphone counterparts, the option is still there to use if you need to. Have fun modding!

Keep your connection safe without a monthly bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix with no regional restrictions, increase security when browsing public networks and more.

Buy now (80% discount)>

Cover image and screenshots from Dallas Thomas / Gadget Hacks

Source link