Important Commands
Complete command reference for React Native wireless debugging. Bookmark this page for quick access to every command you need.
1. ADB Device Commands
Check Connected Devices
List all connected ADB devices with detailed information:
adb devices -l
Expected output (device connected wirelessly):
List of devices attached
192.168.1.15:5555 device product:generic model:android_device device:generic transport_id:1
You can also use the simpler version without the -l flag:
adb devices
Check ADB Version
Verify which version of ADB you are running:
adb version
Expected output:
Android Debug Bridge version 1.0.41
Version 34.0.5-10411340
Installed as C:\Users\YourUser\AppData\Local\Android\Sdk\platform-tools\adb.exe
Restart ADB (When Device Is Offline)
If your device appears as offline, restart the ADB server:
adb kill-server
adb start-server
adb devices
After restarting ADB, you may need to reconnect your wireless device using adb connect PHONE_IP:5555.
2. USB ADB to Wireless ADB
Follow these steps to switch from a USB connection to wireless debugging.
Step 1: Enable ADB TCP Mode
With the phone connected via USB, enable TCP/IP mode on port 5555:
adb tcpip 5555
Expected output:
restarting in TCP mode port: 5555
Step 2: Find Phone Wi-Fi IP Address
Get the phone's current Wi-Fi IP address:
adb shell ip addr show wlan0
Look for the line containing inet 192.168.x.x in the output:
inet 192.168.1.15/24 brd 192.168.1.255 scope global wlan0
In this example, the phone's IP is 192.168.1.15.
Step 3: Connect Wirelessly
Now disconnect the USB cable and connect via Wi-Fi:
adb connect 192.168.1.15:5555
Expected output:
connected to 192.168.1.15:5555
Step 4: Disconnect
To disconnect a specific wireless device:
adb disconnect 192.168.1.15:5555
To disconnect all wireless devices:
adb disconnect
3. ADB Reverse for Metro
ADB reverse lets your phone reach the Metro bundler running on your PC by forwarding port 8081 through the ADB connection.
Forward Metro Port
adb -s 192.168.1.15:5555 reverse tcp:8081 tcp:8081
Check Reverse Connections
adb -s 192.168.1.15:5555 reverse --list
Expected output:
reverse list:
(empty)
After running the forward command:
reverse list:
(empty)
(reverse) tcp:8081 tcp:8081
Remove a Specific Reverse
adb -s 192.168.1.15:5555 reverse --remove tcp:8081
Remove All Reverse Connections
adb -s 192.168.1.15:5555 reverse --remove-all
4. APK Commands
Install APK Manually
When automatic installation fails, install the APK directly:
adb install -r "C:\YourProject\android\app\build\outputs\apk\debug\app-debug.apk"
The -r flag allows reinstalling an existing app (keeps data).
Expected output:
Performing Streamed Install
Success
Launch App Manually
Start the app by its package name and main activity:
adb -s 192.168.1.15:5555 shell am start -n com.yourapp/.MainActivity
Replace com.yourapp with your actual package name. You can find it in android/app/build.gradle under the applicationId field.
5. Metro Commands
Start Metro Bundler
npx react-native start
Start with Cache Clear
Useful when you see stale bundle errors or strange build behavior:
npx react-native start --reset-cache
Run on Android
Build, install, and launch the app on the connected device:
npx react-native run-android
Run with Verbose Output
Get detailed logs during the build and installation process:
npx react-native run-android --verbose
6. Network Commands
Find Your PC's IP Address
ipconfig
Look for the IPv4 Address under your active Wi-Fi or Ethernet adapter:
Wireless LAN adapter Wi-Fi:
IPv4 Address. . . . . . . . . . . : 192.168.1.14
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Check Port 8081 (Metro)
Verify that Metro is listening on port 8081:
netstat -ano | findstr :8081
If Metro is running, you should see a line like:
TCP 127.0.0.1:8081 0.0.0.0:0 LISTENING 12345
If nothing shows up, Metro is not running. Start it with npx react-native start.
7. Device Storage
Check Available Space
adb shell df -h /data
This shows the available storage on the /data partition where apps are installed.
If you see "Requested internal only, but not enough space" during APK installation, the phone's internal storage is full. Delete apps, clear caches, or move files to free up space.
8. React Native / Gradle Cleanup
When builds fail with strange errors, a clean build often fixes the issue:
cd android
gradlew clean
cd ..
Then rebuild and run:
npx react-native run-android
9. Check Which ADB Is Being Used
Multiple ADB binaries can exist on your system. Use where to see which one is being invoked:
where adb
Example output showing multiple ADB installations:
C:\Users\YourUser\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\Program Files (x86)\Nox\bin\adb.exe
C:\platform-tools\adb.exe
The first entry is the one being used. Make sure it is the Android SDK platform-tools version and not an older bundled version from another tool.
10. Most Important Commands
Here are the 10 commands you will use most often, in order of frequency:
- Check devices
adb devices -l
- Enable TCP mode (one-time per session)
adb tcpip 5555
- Find phone IP
adb shell ip addr show wlan0
- Connect wirelessly
adb connect PHONE_IP:5555
- Find your PC's IP
ipconfig
- Start Metro
npx react-native start
- Set up ADB reverse
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
- Build and run
npx react-native run-android
- Manual APK install
adb install -r "C:\YourProject\android\app\build\outputs\apk\debug\app-debug.apk"
- Verify Metro is listening
netstat -ano | findstr :8081
Important Note About IP Addresses
Your phone's IP address may change when you reconnect to Wi-Fi. Always check the current IP with adb shell ip addr show wlan0 before using ADB commands.
When using the -s flag, always specify the full device address including the port:
# Correct - include the port
adb -s 192.168.1.15:5555 reverse tcp:8081 tcp:8081
# Wrong - missing the port
adb -s 192.168.1.15 reverse tcp:8081 tcp:8081
If you have multiple devices connected (USB and wireless), always use -s DEVICE_ADDRESS to target the correct device. Without it, ADB may send commands to the wrong device and produce unexpected results.