Debugging in Android device over wifi without rooting
Disconnect device from usb then tell it to listen on 4455
adb tcpip 4455
restarting in TCP mode port: 4455
connect to the device using a specified ip:port. my device is using wifi
adb connect 192.168.1.103:4455
connected to 192.168.1.103:4455
now do normal adb commands over tcp like
adb shell
when your done, you can put it back in USB mode adb usb restarting in USB mode
Finally After lots of search, here is the consolidated, short tutorial about "Wireless Debugging with Android without rooting" your android phone.
Steps:
- Make sure your Phone and your PC/Laptop is connected in the same network.
- Find your Android Device's IP Address: Go to Settings > About Phone > Status. Note down it.
- Ping Test: Lets first check if your phone is accessible from your PC/Laptop to do this
ping
your Android Device and check its response. See Notes if ping is unsuccessful.
e.g: ping 192.168.1.55
- Connect your Android Device Via USB in USB Debugging Mode.
- Open command prompt and
cd
into<Android SDK Folder>\platform-tools
directory and run the following commands.
adb tcpip 5555 adb connect DEVICE_IP_ADDRESS_HERE:5555
- If you want to switch back to USB mode, use the following command.
adb -s DEVICE_IP_ADDRESS_HERE:5555
Disconnect Android Device from USB. If everything is fine, you can Wirelessly debug your Android Apps!
Notes:
- If ping is unsuccessful, Make sure Wireless (WiFi) devices and wired devices are not isolated. If Isolated, you need to disable isolation. Router Mfgrs calls it as AP Isolation. There will be a setting in Router's Wireless Configuration page. I have D-Link Router, I unchecked the Enable MultiAP Isolation setting in Wireless Basic Setup Page.
- I personally felt this method of connecting is taking more time.. so, I configured my android device so it uses static IP like 192.168.1.55 to connect to my router and I made a windows batch file like below,
@echo off cd C:\AndroidSDK\platform-tools\ echo make sure your your Phone is connected in USB Debugging Mode. pause adb kill-server adb tcpip 5555 adb connect 192.168.1.55 pause
so, every time I have just need to plug in my device, and double click the batch file and all done automatic :P !
After a bit of dabbling with testing I successfully managed to connect a Sony Tablet S over ADB following this procedure, when both the computer and the tablet were on the same wifi network. I used an Xperia T as a tethering point between a laptop and the Tablet S. I followed the same procedure on an Xperia Tablet S and an Xperia S as well.
- Connect the Sony Tablet S through USB to a computer, make sure you have ADB debugging enabled on the tablet.
- On the computer, execute "adb devices", verifying the tablet is showing up in the list of available devices.
- Execute "adb tcpip [port]" while the tablet is connected to the computer, verifying you get a response "restarting in TCP mode port: [port]"
- Disconnect from the device from the computer it was connected to.
- From a host located on the same wifi network, execute "adb connect [ip to device]:[port]", verifying you get a response "connected to [ip to device]:[port]"
In the end I launched Eclipse, created a test project and tried launching the project. The project installed and launched automatically from Eclipse. I also tested this for debugging and that worked equally well.