Android Question How does B4A interact with adb?


Licensed User
Longtime User
It's many years since, when beta testing B4A with Erel, that I have had to use adb. Ever since B4A-Bridge came available I have used that as I am still mentally scarred from the early days of USB drivers for Android devices.

Now I am playing with a Wear OS watch and was pleasantly surprised when, against my expectation, after compiling a test app B4A magically installed it to the watch! I had expected to need to do a manual adb install. However on another occasion it didn't work so having seen that happen I am puzzled as to the requirements to make it work every time. Enlightenment is requested.:confused:

The setup is that my watch is connected to WiFi and I can connect it to adb with a command prompt and do manual installs. There is no indication in B4A that adb is available or that a device is available. What do I need to to ensure that B4A can install to the device any time I want?


B4X founder
Staff member
Licensed User
Longtime User
ADB / usb debug mode works well once everything is configured properly.

It works a bit differently than B4A-Bridge. The IDE doesn't maintain an active connection. When you run the program, it checks whether there is a connected device or emulator (can be more than one) and lets you choose the target device. It there is a single connected device then it will run without asking. Same is true when the debugger can run without installation.
Upvote 0