Testing AIR for Android with Flash Develop using ADB over Wifi

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:

Manual Process

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

adb 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.

source: http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp

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%"

to

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…

adb_packaging.fw

yay!

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.

Cool!

Tip:

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

and then:

adb connect 192.168.0.101:5555

DISCONN

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s