Running ADB from within the IDE?

James Moxham

Member
Licensed User
Longtime User
I've written a few programs now and with WiFi downloads I am finding it is so much easier to program on a real device rather than on an emulator.

But I am finding each time I restart my computer I have to run the program to link to the android. I have written a little batch file to do this and put a shortcut on the desktop, but I am wondering if this could be added as a menu in the IDE?

The batch file is just two lines:
B4X:
adb connect 192.168.2.3
pause

However, depending on how many of my children are using the home network, sometimes that IP address changes. But mostly it stays the same.

So I was thinking of adding a menu to the IDE. The menu brings up an vb.net type of "inputbox" with a message "connect to Android on IP: " and then it gives the default as the previous IP address. So most of the time you don't need to change it but if you do, it would probably only be the last number.

And, to make it dummy-proof, I was thinking of the inputbox also having some text describing how to find out the IP address on an Android. Which is a little complicated to remember - Settings/WirelessControls/WiF Sdettings, then if connected, the third line down which is just under "WiFi Networks" where it should say "MyWiFi" (or whatever yours is) and "connected". It then comes up with an info box with the speed, signal strength, security and IP address.

Your thoughts would be most appreciated.
 

James Moxham

Member
Licensed User
Longtime User
I'm not sure. I've never 'rooted' the device so this is working out of the box.

And it sure is nifty to be able to program an android wirelessly.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Most devices don't support this mode without changing some parameters that require root access.

I have a plan to create an "adb alternative" device application that will allow you to connect any Android device to the IDE. It will connect to the IDE over the network and then do whatever is needed (like installing your compiled application).
 

agraham

Expert
Licensed User
Longtime User
Not all devices support the WiFi conection but if they do they don't have to be rooted, although you do need USB Debugging on to start the daemon on the device. My cheap Chinese tablet isn't rooted and it worked out of the box on that.

However if the manufacturer hasn't included this, like on my phone, then the ADBWireless app does need root to enable it - and in my case it still doesn't work properly with the IDE as adb doesn't seem to return after after installing an app so the IDE thinks it has timed out. I see this at the command prompt as well.
 
Top