Android Tutorial B4A-Bridge --> How to Install and Get it Working! (Solution - Windows 10 & Android 10!!)

I've made this (new thread) post because I just went through all of this and scoured these forums and the Internet and could not find any complete step-by-step instructions that worked, and the "B4A-Bridge a new way to connect to your device" thread is closed to new posts. So this is simply what I did that worked to get the B4A-Bridge working between my Windows 10 laptop and my Android 10 Motorola phone (it would connect and disconnect to/from my phone constantly). So, here goes:

  1. After you've got B4A completely installed on your machine according to these instructions, steps 1-3, then go ahead and do step 4 to download and install the B4A-Bridge Android app to your phone. Don't worry about connecting B4A-Bridge to anything just yet.
  2. Next, go here and if you have a Google phone, click the "Click here to download the Google USB Driver ZIP file (ZIP)" and download and install the Google USB drivers for your phone. But if you own a different brand phone like me, go here and find your phone's manufacturer in the list (scroll down) and download and install your manufacturer's USB drivers for you phone.
  3. Now, go to this tutorial and do the USB Debug Mode instructions. On my phone, I didn't have to choose MTP or PTP, because when I enabled the "Developer" settings/menu after clicking on the build number 7 times, I went into the new "Developer" menu and turned on "USB Debugging" and when I connected my phone to my laptop via USB cable, it said "tap here to enable USB Debugging" which I did.
  4. Connect your phone to your computer using a USB cable (yes, I know we want to run B4A-Bridge to connect wirelessly, but it didn't work for me yet) and make sure it is in "USB Debugging" mode or PTP, MTP, etc.
  5. Fire up B4A and don't worry about connecting via B4A-Bridge just yet. Create a new, default app, name it something, and then compile and run it. B4A should find your phone and connect to it via USB, if everything has been set up correctly, and install and run the app on your phone.
  6. Now, in B4A, go to the "Debug" menu and click "Stop".
  7. On your phone, find the B4A-Bridge app and run it and tap on the green "Start" button.
  8. On your computer, go "Tools" menu in B4A, click on "B4A Bridge", then click "Connect", then click either "New IP" and enter your phone's IP Address (displaying in B4A-Bridge app running on your phone) or click on the existing IP Address for your phone, if you've already been down this road and been unsuccessful in getting B4A-Bridge working wirelessly.
  9. The connection should be successful at this point.
  10. You should now be able to disconnect the USB cable between your phone and computer and the B4A-Bridge connection should still remain connected and working properly now. I closed B4A on my computer and stopped the B4A-Bridge on my phone and restarted them both and my phone still connects fine and stays connected wirelessly.
I tried a few different combinations of the steps above, short of re-installing B4A (as that was suggested on one of the forums), and these steps were the only thing that worked for me. I hope this is helpful to someone else and thanks to whoever's post pointed me in this direction (I looked at so many posts, I can't relocate the one that did)!
 

zava

Member
(I know it's not advisable to write here, but if I had found this here I'd have saved a couple hours...)

I also had the problem that B4A-Bridge would loop in a cycle of brief connections and retries without establishing a stable connection (although the device was perfectly detected, they were both on the same network etc etc). After perusing lots of threads with no success, I just found that (on my Samsung A50 at least) there's a separate option in "debugger options", separate from "USB debug", which I had already set, called "Wireless debug". After also setting this one, B4A-Bridge works flawless.

Hope this is useful to someone, since I didn't find mention of this option across the forum and in the getting started stuff (Only USB debug is mentioned).
 

Core28

Member
Here are my findings:
On a Samsung tablet with Android 11, you have to tap seven times on 'Android-Version', in order to enable the developer options. (A new entry of same name is displayed in the Setup main menu.) Among the zillions of new (developer) options, there really is an option 'Debugging via WLAN'. Unfortunately, it does not work.
On a XIAOMI smartphone with Android 11, you have to tap seven times on 'MIUI-Version', in order to enable the developer options. Among the developer options, an option like 'Wireless debug' is not available, only 'Wireless diagnose'. It doesn't work.
On different XIAOMI smartphone, same generation, same behavior as above.
On a Huawei tablet with Android 9, you have to tap seven times on 'EMUI-Verson' and enter your password, in order to enable the developer options. There are several options dealing with WiFi or WLAN, but nothing like 'Wireless debug'.
Next, I will try the USB cable option.
 

zava

Member
This may be a non standard option, or one that is made available differently on different wmartphones...
As I wrote, it was available on my Galaxy A50, Android 11, once the "developer options" are unlocked as "Wireless Debug".
Unfortunately I have no idea if this may differ on different makes/models.

Since this was not mentioned in the instructions to use Bridge, I had assumed no such setting was necessary or available, which is probably true in most casesm since the matter doesn't seem to be much debated on this forum.
 

Core28

Member
Zava, thank you for your first advice from Jan 11! I did not really expect your method to work on my device - and, of course, it did not work. 😣 Don't get me wrong, that is really not your fault or your responsibility. Devices and their OS versions are too disparate! At least, I learned that I have to activate the developer options on my device SOMEHOW (that was a hint from Erel I found somewhere), and that I have to activate Wireless debugging SOMEHOW. I tried to do that on all my devices - until now with no success. That's no problem with me, I found that it works with the good old USB cable. Now I can start exploring Erel's wonderful invention. 😋👍
 

Core28

Member
My latest findings are as follows:
- Activating the developer options on the device is not required
- OriginalPaladin's USB cable method (see above) is not required
- Install the B4A bridge on the device (and B4A IDE on your PC, of course)
- Establish a wireless connection between B4A IDE and B4A bridge on the device
- Compile the test app in RELEASE mode, not in DEBUG mode
- It will upload to, get installed on the device, and run there
- From then on, you can enable and use debug mode
 

zava

Member
Zava, thank you for your first advice from Jan 11! I did not really expect your method to work on my device - and, of course, it did not work. 😣 Don't get me wrong,
Don't worry... I myself have no idea why it worked for me! I just know that I followed all other advice on the thread, with no success, then I stumbled upon the "Wireless debug" option, which I had no idea even existed, and -MAGIC- it worked for me...
 
Top