This is very cool when you have faulty/old USB ports on your computer (like me, making it so frustrating to test my apps on the device).
First configure your device to enable ADB over wifi, these instructions from StackOverflow worked for me (root), I’ll just paste them here:
From your device, if it is rooted
According to a post on xda-developers, you can enable ADB over Wi-Fi from the device with the commands:
su setprop service.adb.tcp.port 5555 stop adbd start adbd
And you can disable it and return ADB to listening on USB with
setprop service.adb.tcp.port -1 stop adbd start adbd
From a computer, if you have USB access already (no root required)
It is even easier to switch to using Wi-Fi, if you already have USB. From a command line on the computer that has the device connected via USB, issue the commands
adb tcpip 5555 adb connect 192.168.0.101:5555
Be sure to replace
192.168.0.101 with the IP address that is actually assigned to your device.
You can find the IP address of a tablet in two ways:
Manual IP Discovery:
Go into Android’s WiFi settings, click the menu button in the action bar (the vertical ellipsis), hit Advanced and see the IP address at the bottom of the screen.
Use ADB to discover IP:
Execute the following command via adb:
adb shell ip -f inet addr show wlan0
To tell the ADB daemon return to listening over USB
Apps to automate the process
There are also several apps on Google Play that automate this process. A quick search suggests adbWireless, WiFi ADB and ADB WiFi. All of these require root access, but adbWireless requires fewer permissions.
Now in your FlashDevelop files, remove the -d param from adb install calls.
In RunApp.bat and PackageApp.bat, change :
adb -d install -r "%OUTPUT%"
adb install -r "%OUTPUT%"
In SetupApp.bat set the IP of your computer, this way you won’t have to type it when your app launches for debug in your device
:: Debugging using a custom IP set DEBUG_IP=192.168.0.4
Now when you run your project…
Can’t believe it took me days to figure this out, I was very close, but I didn’t know I had to remove the -d param that directs the command to the only connected USB device.
My device was still showing when the List Of Devices Attached displayed (adb devices command) but appeared as offline instead of “device”.
What worked for me was
adb disconnect 192.168.0.101:5555
adb connect 192.168.0.101:5555