This page looks best with JavaScript enabled

Connect to your android wirelessly

 ·  โ˜• 2 min read · ๐Ÿ‘€... views
    ๐Ÿท๏ธ
  • #adb

Introduction

This artical will show you how to connect to your android, so you can play with your android via adb1.

Setup your environment

get Android SDK Platform Tools

download platform-tools directly or install it with your package manager:

1
2
# arch
sudo pacman -Sy android-tools

enable debugging

first enable developer mode, for my op6, clicking the build number a bunch of times enables developer mode

Figure 1: enable developer mode for my op6

Figure 1: enable developer mode for my op6

after that, go to “System > Developer Options”, enable USB debugging and Wireless ADB debugging

Figure 2: enable debugging

Figure 2: enable debugging

Connect to your phone with USB

now if you have a USB cable, you can directly connect your android to your computer with that.

You can tell if device is connected via adb devices

Figure 3: adb list connected devices

Figure 3: adb list connected devices

Connect Wirelessly (no root required)

After connecting with usb, you can enable tcpip on your phone, then connect with that wirelessly:

1
2
3
4
5
6
# enable tcpip
adb -s <device-serial> tcpip 5555
# get device ipv4 address
adb -s <device-serial> shell ip -f inet addr
# connect to it
adb connect <device-ip>:5555
Figure 4: enable tcpip on the computer

Figure 4: enable tcpip on the computer

Connect Wirelessly (require root, no usb)

If you have root access to you android, you can enable tcpip directly on your phone, then connect to it on the computer.
I use termux2 to do these:

1
2
3
4
su
setprop service.adb.tcp.port 5555
stop adbd && start adbd
ip -f inet addr show wlan0
Figure 5: enable tcpip on the phone

Figure 5: enable tcpip on the phone


  1. Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device ↩︎

  2. Termux is an Android terminal emulator and Linux environment app ↩︎

Share on