Yes 👍 wireless debugging is very handy in React Native, especially when your USB is unreliable. Here’s a step-by-step guide to set up wireless debugging with Android (ADB):
📱 1. Prerequisites
-
Android device (e.g., your Redmi A2 or Galaxy A06 5G)
-
Android 11+ (Wireless debugging is built into Developer Options)
-
Laptop with ADB installed (
platform-tools
package) -
Both laptop and phone must be on the same Wi-Fi network
⚙️ 2. Enable Developer Options & Wireless Debugging
On your phone:
-
Go to Settings → About phone → Tap Build number 7 times (to enable Developer Options).
-
Go to Settings → Developer options.
-
Turn on:
-
USB debugging (first time setup)
-
Wireless debugging
-
💻 3. First Pairing (via QR or Code)
-
Run ADB on your laptop:
-
On your phone → Developer options → Wireless debugging → Pair device with pairing code
-
It will show an IP:Port (like
192.168.0.105:37099
) -
And a 6-digit pairing code
-
-
Enter it in terminal:
→ If successful:
Successfully paired to 192.168.0.105:37099
🔗 4. Connect ADB Over Wi-Fi
Now actually connect the device (different port from pairing one):
-
Still in Wireless debugging, find IP address & Port for debugging (like
192.168.0.105:5555
). -
Connect:
→ You should see:
connected to 192.168.0.105:5555
-
Verify:
Output should show:
🚀 5. Run React Native App Wirelessly
Now just run your app as usual:
It will install and debug over Wi-Fi without USB. 🎉
⚡ Troubleshooting
-
If
adb connect
fails → make sure phone & laptop are on same Wi-Fi. -
If it disconnects after restart → you’ll need to re-pair.
-
Sometimes
adb kill-server && adb start-server
helps reset.
👉 Do you want me to also give you steps for QR pairing inside Android Studio (so you don’t need terminal at all), or you prefer ADB command-line only?
TESTING
(base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ adb devices * daemon not running; starting now at tcp:5037 * daemon started successfully List of devices attached (base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ adb connect adb: usage: adb connect HOST[:PORT] (base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ adb pair 192.168.1.2:44501 Enter pairing code: 652936 Successfully paired to 192.168.1.2:44501 [guid=adb-R9ZY3098GYX-8MEOzx] (base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ adb connect 192.168.1.2:36161 connected to 192.168.1.2:36161 (base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ adb devices List of devices attached 192.168.1.2:36161 device adb-R9ZY3098GYX-8MEOzx._adb-tls-connect._tcp device
No comments:
Post a Comment