ADB commands on a single device!

Ever gotten into the hassle of wanting to do some ADB commands, but you didn't want to open your laptop?

Well, there's a way to execute them straight from your phone on newer android versions with the option to enable ADB over Wifi.

Things you need:

  • Developer options enabled (a random guide)
  • ADB over Wifi enabled (and an android version that supports it)
  • A local Wifi network. You can probably do this over WAN, but that's for another guide.
  • F-Droid app store installed
  • From F-droid install Termux. The version from the playstore is an older one and won't work for this purpose.
  • In Termux install ADB tools:https://github.com/MasterDevX/Termux-ADB
  • Remember your phone's local IP number. Usually something like 192.168.1.xxx on the local network.
  • A 64bit device running android 11 or higher (I haven't tested it on 32)

When you have the required apps installed and the settings enabled, its a matter of navigating back and forth between screens or use a split screen.

  1. Split screen between Termux and the adb wifi options.
  2. Pick "pair with code" in the adb wifi options.
  3. Run in termux: adb pair ip:port (replace ip with your local ip adress an the port with the port displayed in the adb options)
  4. Enter the pairing code in termux when prompted.
  5. Run in termux: adb connect ip:port (This time it's the ip and port directly in the adb wifi settings without selecting pairing)
  6. If multiple servers are found in termux, just run "adb kill-server" and connect again. 
 
That's it, your're all set to run any ADB command on one device.

Comments

Popular posts from this blog

Never The Cookie!

Tasker, the best terrible app.