Tool BridgeCLI - Command line tool for B4A-Bridge

BridgeCLI is a command line B4A-Bridge manager written in B4J.

It allows developers to install release APKs through the command line.
You can use it to deploy applications on multiple devices.
It should work on Mac and Linux as well as Windows (It was only tested on Windows).

You should run B4A-Bridge v2.3+ on the devices.

It can use the auto discovery feature to find devices.
To list the discovered devices:
Code:
java -jar BridgeCLI.jar -Discover
Output:
192.168.0.5 - LGE Nexus 5
192.168.0.9 - LGE Nexus 5X

The second supported feature is -Install. You need to pass the APK file and it will install it.
Code:
java -jar BridgeCLI.jar -Install "C:\Users\H\Documents\B4A Samples\Objects\1.apk"
In this case it will install it on the first device found.
You can add -Ip to select the ip address (instead of auto discover):
Code:
java -jar BridgeCLI.jar -Install "C:\Users\H\Documents\B4A Samples\Objects\1.apk" -Ip 192.168.0.5

You can add -Name to select one of the discovered devices:
Code:
java -jar BridgeCLI.jar -Install "C:\Users\H\Documents\B4A Samples\Objects\1.apk" -Name "LGE Nexus 5X"

The B4J source code is attached.

Tips:

- Make sure that the device is not connected to the IDE with B4A-Bridge when using this tool. Otherwise the IDE will "steal" the connection and the transfer will be broken.
 

Attachments

Last edited:
How about implementing something like "-Install <apk file path> -all"?
I will add such a feature in the future.

For now you can create a batch file that sends to multiple ip addresses or a simple B4J program that calls Discover and then sends to all addresses.
 
I will add such a feature in the future.

For now you can create a batch file that sends to multiple ip addresses or a simple B4J program that calls Discover and then sends to all addresses.

This should also work out fine.
Thanks Erel.
 
I will add such a feature in the future.

For now you can create a batch file that sends to multiple ip addresses or a simple B4J program that calls Discover and then sends to all addresses.

I'm waiting for that !!

amazing
 
Does this feature still work ? I get an "Error sending file" midway through the upload (as shown by the progress bar at bottom of my B4A-Bridge app)
 
Thx Erel, the IDE was connected to the bridge, it worked as soon as I disconnected.
 
Back
Top