
How to Use Adb Over Wifi? with Android Debug Bridge
Introduction Android Debug Bridge, commonly known as ADB, is one of the most powerful tools in the Android developer’s toolkit. Traditionally, ADB requires a physical USB cable connecting your Android phone or tablet to your computer. While that works well for
Introduction
Android Debug Bridge, commonly known as ADB, is one of the most powerful tools in the Android developer’s toolkit. Traditionally, ADB requires a physical USB cable connecting your Android phone or tablet to your computer. While that works well for many tasks, it can be inconvenient when you need to move around, test apps on a device lying across the room, or avoid wear and tear on your device’s charging port. That is where learning how to use adb over wifi? becomes valuable.
Using ADB over WiFi lets you run the same commands—installing apps, pushing files, viewing logs, rebooting devices, and more—without a cable tethering your handset to your workstation. Once the initial setup is complete, your computer and Android device can communicate over the same local wireless network. This guide walks you through everything you need to know, from enabling developer options to troubleshooting connection issues, so you can confidently use ADB wirelessly in your daily workflow.
Table of Contents
- Introduction
- What Is ADB and Why Learn How to Use Adb Over Wifi?
- Prerequisites Before You Begin
- How to Enable Developer Options and USB Debugging
- Step 1: Connect Your Device via USB First
- Step 2: Find Your Device’s IP Address
- Step 3: Enable ADB Over TCP/IP
- Step 4: Disconnect USB and Connect Wirelessly
- Step 5: Verify the Wireless Connection
- Android 11 and Later: Built-In Wireless Debugging
- Common Issues and Troubleshooting
- Security Considerations When Using ADB Over WiFi
- Tips and Best Practices
- ADB Over WiFi vs. ADB Over USB: Comparison Table
- Advanced Usage and Useful ADB Commands
- How to Disconnect ADB Over WiFi
- Frequently Asked Questions
- Conclusion
What Is ADB and Why Learn How to Use Adb Over Wifi?
ADB stands for Android Debug Bridge. It is a versatile command-line utility that lets your computer communicate with an Android device. The ADB system has three main components:
- Client: The command-line tool you run on your computer.
- Daemon (adbd): A background process that runs on your Android device.
- Server: A background process on your computer that manages communication between the client and the daemon.
By default, ADB communicates over USB. However, it can also work over TCP/IP, which means your computer can send ADB commands to your phone or tablet through your WiFi network. Learning how to use adb over wifi? removes the need to constantly plug and unplug your device, which is especially helpful for developers who install and test multiple app builds throughout the day.
Wireless ADB is also useful for power users who want to run shell commands, pull logs, or sideload applications without hunting for a cable. It does not replace USB entirely—some low-level operations still work better over a wired connection—but for everyday debugging and app management, WiFi ADB is a convenient alternative.
Prerequisites Before You Begin
Before you start configuring wireless ADB, make sure you have the following items ready:
- An Android smartphone or tablet.
- A computer running Windows, macOS, or Linux.
- The Android SDK Platform-Tools package installed on your computer.
- A USB cable for the initial setup.
- Both devices connected to the same WiFi network.
- A basic familiarity with using a terminal or command prompt.
If you do not already have Platform-Tools, you can download it directly from the Android developer website. Extract the ZIP file to a folder you can easily access, because you will need to run ADB commands from that directory or add it to your system’s PATH environment variable.
How to Enable Developer Options and USB Debugging
Android hides developer settings by default to prevent accidental changes. To use ADB—whether over USB or WiFi—you must first unlock Developer Options and enable USB debugging on your device.
- Open the Settings app on your Android device.
- Scroll to About phone or About tablet.
- Find the Build number entry.
- Tap Build number seven times. You should see a toast message saying, “You are now a developer!”
- Go back to the main Settings menu and select System, then Developer options. On some devices, Developer options appears directly in the main Settings list.
- Toggle the Developer options switch to On.
- Scroll down and enable USB debugging. When prompted, confirm that you want to allow USB debugging.
Once USB debugging is enabled, your device is ready to accept ADB commands. You will also see an option called Wireless debugging on newer Android versions, which we will cover later in this guide.
Step 1: Connect Your Device via USB First
Even though the goal is to use ADB over WiFi, almost every Android device still requires an initial USB connection to authorize the computer and switch ADB to TCP/IP mode. Plug your phone or tablet into your computer using a reliable USB cable.
Open a terminal or command prompt on your computer, navigate to the Platform-Tools folder, and run:
adb devices
If this is the first time connecting this computer to the device, a dialog will appear on your Android screen asking whether you want to allow USB debugging. Check the box for Always allow from this computer if you do not want to see the prompt again, then tap Allow.
Run adb devices again. You should see your device’s serial number listed, which means the ADB server recognizes your device.
Step 2: Find Your Device’s IP Address
To connect wirelessly, your computer needs to know your device’s local IP address. There are two common ways to find it.
Method A: Using the Settings Menu
- Make sure your Android device is connected to the same WiFi network as your computer.
- Open Settings.
- Go to Network & internet (or Connections, depending on your manufacturer).
- Tap WiFi, then tap the gear icon or the name of your connected network.
- Look for IP address in the network details. It will look something like
192.168.1.45.
Method B: Using ADB Shell
If your device is still connected via USB, you can find the IP address from your computer:
adb shell ip addr show wlan0
Look for the line starting with inet under the wlan0 interface. The address listed there is your device’s WiFi IP address. Write it down; you will need it in the next step.
Step 3: Enable ADB Over TCP/IP
With your device still connected by USB, tell ADB to listen for wireless connections on a specific port. The default port is 5555. Run the following command:
adb tcpip 5555
You should see a message confirming that ADB has restarted in TCP/IP mode. At this point, the ADB daemon on your device is listening for wireless connections on port 5555.
If you ever need to change the port—for example, if 5555 is already in use—you can specify a different number:
adb tcpip 5556
Just remember to use that same port when you connect later.
Step 4: Disconnect USB and Connect Wirelessly
Now that ADB is in TCP/IP mode, you can unplug the USB cable. Your device and computer should remain on the same WiFi network.
In your terminal or command prompt, run the connect command using the IP address you found earlier:
adb connect 192.168.1.45:5555
Replace 192.168.1.45 with your device’s actual IP address. If successful, you will see a response like:
connected to 192.168.1.45:5555
If the connection fails, double-check that both devices are on the same network and that your device’s IP address has not changed.
Step 5: Verify the Wireless Connection
To confirm that your computer can communicate with your device over WiFi, run:
adb devices
You should see an entry showing the IP address and port instead of a USB serial number:
List of devices attached
192.168.1.45:5555 device
If the device shows as device, you have successfully learned how to use adb over wifi? and can now run any ADB command wirelessly. Try a simple command to make sure everything is responsive:
adb shell getprop ro.build.version.release
This should return your Android version number without a cable attached.
Android 11 and Later: Built-In Wireless Debugging
Starting with Android 11, Google introduced a dedicated Wireless debugging feature that simplifies the process and does not require an initial USB cable for pairing. This is an alternative to the traditional TCP/IP method described above.
How to Use Wireless Debugging on Android 11+
- Enable Developer options and USB debugging as described earlier.
- In Developer options, find and enable Wireless debugging.
- Tap Wireless debugging to open its settings page.
- Select Pair device with pairing code.
- Your device will display an IP address, port, and a six-digit pairing code.
- On your computer, run:
adb pair 192.168.1.45:34567
Enter the pairing code shown on your device when prompted. After pairing, select Wireless debugging again and choose a port to use for ADB connections. Then run:
adb connect 192.168.1.45:XXXXX
Replace XXXXX with the port displayed on your device.
This method is more secure because it uses a temporary pairing code, and it works well if you do not want to deal with USB cables at all. However, it is only available on devices running Android 11 or newer.
Common Issues and Troubleshooting
Even after following the steps above, you may run into issues when trying to use ADB over WiFi. Here are the most common problems and how to fix them.
Device Not Found or Unable to Connect
- Different networks: Make sure your computer and Android device are connected to the same WiFi network. If one is on 2.4 GHz and the other on 5 GHz but they share the same router, they should still see each other, but some router settings isolate bands.
- Wrong IP address: IP addresses can change if your router uses DHCP. Recheck your device’s IP address if the connection suddenly stops working.
- ADB not in TCP/IP mode: Run
adb tcpip 5555again while connected via USB, then reconnect wirelessly.
Connection Refused or Timeout
- Firewall blocking: Your computer’s firewall may be blocking incoming ADB connections. Temporarily disable the firewall to test, or create an exception for ADB.
- Router AP isolation: Some routers have “AP isolation” or “client isolation” enabled, which prevents devices on the same WiFi from talking to each other. Disable this setting in your router’s admin panel.
- ADB server issues: Restart the ADB server with these commands:
adb kill-server
adb start-server
Unauthorized Device
If adb devices shows your device as unauthorized, the computer’s RSA key has not been accepted. Reconnect via USB, accept the debugging prompt on the device screen, and then switch back to WiFi.
Connection Drops Frequently
Wireless ADB can be less stable than USB, especially if your WiFi signal is weak. Keep the device within good range of your router, and avoid running heavy network tasks (like large file downloads) on the device while debugging.
Security Considerations When Using ADB Over WiFi
ADB is a powerful tool, and leaving it exposed can create security risks. When you learn how to use adb over wifi?, keep these best practices in mind:
- Only enable wireless ADB on trusted networks, such as your home or office WiFi. Avoid using it on public hotspots.
- Turn off wireless debugging or disconnect ADB when you are not actively using it.
- Do not forward ADB ports over the internet without a VPN. Exposing port 5555 to the public internet could allow unauthorized access to your device.
- If you use Android 11+ wireless debugging, rely on the pairing code feature rather than leaving TCP/IP mode open indefinitely.
Treat ADB access like you would treat SSH access to a server: convenient, but something that should be locked down when not in use.
Tips and Best Practices
To get the most out of wireless ADB, consider these practical suggestions:
- Set a static IP address: Assign a static IP to your Android device in your router’s settings so the address does not change, saving you from having to look it up repeatedly.
- Use device serials with multiple devices: If you have more than one device connected, specify which one to target using the
-sflag:
adb -s 192.168.1.45:5555 install app.apk
- Create command shortcuts: If you frequently run the same ADB commands, save them in a batch file or shell script to save time.
- Keep your screen on: Some devices drop WiFi connections when the screen turns off. Enable Stay awake in Developer options if you need long debugging sessions.
- Use logcat wirelessly: You can view real-time device logs without a cable:
adb logcat
- Install APKs over WiFi: Once connected, you can install apps just as easily as over USB:
adb install path/to/your/app.apk
These small habits make wireless ADB feel as seamless as a wired connection.
ADB Over WiFi vs. ADB Over USB: Comparison Table
Both connection methods have their strengths. The table below compares them across several factors to help you decide when to use each.
| Feature | ADB Over WiFi | ADB Over USB |
|---|---|---|
| Setup complexity | Moderate; requires IP address and TCP/IP mode | Simple; plug in and authorize |
| Mobility | High; move freely within WiFi range | Low; limited by cable length |
| Connection speed | Dependent on WiFi signal and network congestion | Fast and consistent |
| Stability | Can drop if WiFi is weak or interference occurs | Very stable |
| Security | Riskier on untrusted networks | More secure; physical access required |
| Battery impact | Uses WiFi radio; may drain battery faster | Charges device while connected |
| Ideal use case | Daily app testing, log viewing, casual debugging | Initial setup, large file transfers, rooting, recovery |
Advanced Usage and Useful ADB Commands
Once you are comfortable with the basics, you can use wireless ADB for more advanced tasks. Below are some commands that work just as well over WiFi as they do over USB.
Install and Uninstall Apps
adb install app.apk
adb uninstall com.example.package
Push and Pull Files
Copy a file from your computer to your device:
adb push localfile.txt /sdcard/localfile.txt
Copy a file from your device to your computer:
adb pull /sdcard/remotefile.txt ./remotefile.txt
Run Shell Commands
Open an interactive shell on your device:
adb shell
Or run a single command without entering the shell:
adb shell pm list packages
Reboot and Bootloader Commands
adb reboot
adb reboot bootloader
adb reboot recovery
Record the Screen
Record your device’s screen and save it to internal storage:
adb shell screenrecord /sdcard/demo.mp4
Then pull the video file to your computer:
adb pull /sdcard/demo.mp4 ./demo.mp4
These commands demonstrate that once you know how to use adb over wifi?, you can perform nearly any debugging task without touching a cable.
How to Disconnect ADB Over WiFi
When you are finished debugging, it is good practice to disconnect cleanly. To terminate a specific wireless connection:
adb disconnect 192.168.1.45:5555
To stop the ADB server entirely:
adb kill-server
You can also turn off Wireless debugging or USB debugging in your device’s Developer options to prevent further ADB connections until you re-enable them.
Frequently Asked Questions
Do I need a USB cable every time I want to use ADB over WiFi?
For the traditional TCP/IP method, you need USB only for the initial setup to enable TCP/IP mode and authorize the computer. After that, you can connect wirelessly as long as both devices remain on the same network. On Android 11 and later, the built-in Wireless debugging feature can eliminate the USB requirement entirely by using a pairing code.
Why does my IP address change?
Most routers assign IP addresses dynamically using DHCP. If your device’s lease expires or the router restarts, the device may receive a different address. Setting a static IP in your router or on the device can prevent this.
Can I use ADB over WiFi on mobile data?
No. ADB over WiFi requires both the computer and the Android device to be on the same local network. Mobile data connections generally do not allow incoming ADB connections, and attempting to expose ADB over the internet is a serious security risk.
Is wireless ADB slower than USB?
Yes, generally speaking. USB provides a faster and more stable connection. For small commands like installing an app or checking logs, the difference is negligible. For transferring very large files, USB is still the better choice.
What happens if I reboot my device?
When your Android device reboots, ADB usually returns to USB mode. You will need to reconnect via USB and run adb tcpip 5555 again before you can connect wirelessly. Some custom ROMs or rooted devices may retain TCP/IP settings, but on stock Android, expect to repeat the setup after a reboot.
Can I connect multiple devices wirelessly at once?
Yes. You can connect multiple devices over WiFi as long as each has a unique IP address and you use the -s flag to specify which device you are targeting. For example:
adb -s 192.168.1.45:5555 install app1.apk
adb -s 192.168.1.46:5555 install app2.apk
Conclusion
Learning how to use adb over wifi? gives you greater flexibility when developing, testing, or managing Android devices. The setup process is straightforward: enable Developer Options, authorize your computer over USB once, switch ADB to TCP/IP mode, find your device’s IP address, and connect wirelessly. On newer Android versions, the built-in Wireless debugging feature makes the process even simpler.
While wireless ADB is convenient, remember to keep security in mind. Use it on trusted networks, disconnect when you are done, and avoid exposing ADB ports to the internet. For heavy file transfers or low-level operations, a USB cable is still more reliable, but for everyday debugging, app installation, and log monitoring, WiFi ADB is an excellent alternative.
By following the steps and best practices in this guide, you can cut the cord and work with your Android device more freely than ever before.