Wireless React Native Development via ADB Over Wi-Fi
Why Wireless ADB?
Section titled โWhy Wireless ADB?โTired of tangled USB cables? Want to freely hold your device while debugging UI issues in React Native? ADB over Wi-Fi lets you run, debug, and test your app wirelessly once itโs set up correctly.
Prerequisites
Section titled โPrerequisitesโBefore you start, make sure of the following:
On your Android phone:
- Developer Options enabled
- USB Debugging turned ON
- Phone is connected to same Wi-Fi as your computer
On your computer:
- Latest ADB installed (comes with Android Studio or install via
platform-tools) - React Native CLI project already set up
Step-by-Step Setup for ADB over Wi-Fi
Section titled โStep-by-Step Setup for ADB over Wi-FiโStep 1: ๐ Enable Developer Options on Your Phone
If not already done:
- Open Settings โ About Phone
- Tap Build Number 7 times
- A message appears: โYou are now a developer!โ
Step 2: ๐ Enable USB Debugging
Section titled โStep 2: ๐ Enable USB DebuggingโGo to:
- Settings โ System โ Developer Options
- Turn on USB Debugging
You may also find โDeveloper Optionsโ directly under Settings on some devices.
Step 3: ๐ Connect Phone via USB (First-Time Only)
Section titled โStep 3: ๐ Connect Phone via USB (First-Time Only)โConnect your Android device to your PC with a USB cable.
Then open a terminal and run:
adb devices๐ Check your phone screen! A popup should appear:
โAllow USB debugging?โ
โ๏ธ [Always allow from this computer]
โ Tap Allow
Step 4: ๐ Ensure Both Devices Are on the Same Wi-Fi
Section titled โStep 4: ๐ Ensure Both Devices Are on the Same Wi-Fiโ- Your computer and phone must be on the exact same Wi-Fi network.
- Hotspot connections sometimes block port communication, so use a router-based Wi-Fi if possible.
You can check the IP address of your phone by running:
adb shell ip addr show wlan0Look for an IP like 192.168.1.xxx.
Step 5: ๐ Switch ADB to TCP/IP Mode
Section titled โStep 5: ๐ Switch ADB to TCP/IP ModeโRun:
adb tcpip 5555This restarts ADB in TCP/IP mode on port 5555. Youโll see:
restarting in TCP mode port: 5555Step 6: ๐ Disconnect the USB Cable
Section titled โStep 6: ๐ Disconnect the USB CableโNow unplug the USB cable. Youโre ready to go wireless!
Step 7: ๐ Connect Over Wi-Fi
Section titled โStep 7: ๐ Connect Over Wi-FiโRun:
adb connect <your-phone-ip>:5555Example:
adb connect 192.168.1.105:5555You should see:
connected to 192.168.1.105:5555โ๏ธ Your device is now connected wirelessly!
To verify:
adb devicesYouโll see your device listed with its IP and port.
Step 8: ๐ Run Your React Native App
Section titled โStep 8: ๐ Run Your React Native AppโNow you can use:
npx react-native run-androidAnd your app will launch wirelessly!
๐ Switching Back to USB Mode
If you want to switch back:
adb usbThis reverts ADB to USB mode.
๐ง Troubleshooting Tips
Section titled โ๐ง Troubleshooting Tipsโ๐ฅ unauthorized in adb devices
- Unlock phone and check for โAllow USB debuggingโ prompt
- Go to Developer Options โ Revoke USB debugging authorizations, then reconnect
๐ฅ cannot connect or timeout
- Ensure both devices are on same Wi-Fi
- Use
adb kill-serverandadb start-serverto reset adb - Restart your router if port connections are blocked
- Avoid using mobile hotspot if possible
๐ฅ Different IP after reboot
- If your phone reboots or changes network, its IP may change. Recheck with:
adb shell ip addr show wlan0๐งผ Clean-Up and Automation Tip
Section titled โ๐งผ Clean-Up and Automation TipโYou can automate the setup with this script (after first USB connect):
adb tcpip 5555adb connect $(adb shell ip route | awk '{print $9}'):5555๐ฆ Bonus: Persist Wireless ADB Across Reboots (Optional, Root Only)
Section titled โ๐ฆ Bonus: Persist Wireless ADB Across Reboots (Optional, Root Only)โIf your device is rooted, you can run:
setprop service.adb.tcp.port 5555stop adbdstart adbdThis will enable ADB over Wi-Fi at boot. Otherwise, repeat USB + adb tcpip 5555 each time after reboot.
๐ง Summary
Section titled โ๐ง Summaryโ| Step | Action |
|---|---|
| 1 | Enable Developer Options |
| 2 | Turn on USB Debugging |
| 3 | Connect via USB and authorize |
| 4 | Run adb tcpip 5555 |
| 5 | Disconnect USB |
| 6 | Run adb connect <ip>:5555 |
| 7 | Run your React Native app |
๐ Final Words
Section titled โ๐ Final WordsโWireless ADB is a huge quality-of-life boost for React Native developers. Once set up, youโll enjoy a cable-free development flow, great for testing layout, gestures, and real-world app usage.