Android Tutorial How to use NoxPlayer with B4A

knutf

Member
Licensed User
It's recomended to use a real device or the Android SDK included emulator.

But if you for some reason want to use NoxPlayer as emulator it is easy!

Alternative 1 - Connect B4A IDE directly to NoxPlayer
  1. Download and install NoxPlayer
  2. Rename adb.exe in android SDK platform-tools directory (Usually C:\android-sdk\platform-tools\adb.exe)
  3. Copy the adb.exe that came with the NoxPlayer to the SDK platform-tools directory.
    (Usually it will be Copy C:\Program Files\Nox\bin\adb.exe to C:\android-sdk\platform-tools\)
  4. Restart B4A IDE and NoxPlayer

Alternative 2 - connect with B4A-Bridge to NoxPlayer
  1. Download and install NoxPlayer
  2. Start NoxPlayer
  3. Activate network bridge mode:
    • Select "System settings"
      1578783797398.png
    • Select the "phone model & internet" tab
    • Click on "Install" to Install the Bridge connection driver
      1578783765236.png
    • Click on Enable network bridge mode
    • If you leave IP Mode in DHCP, the emulator will get its own IP Address from your LAN's DHCP server
    • Click on Save settings, and then on Restart now
  4. Start Play Store (In the Tools group) and install B4A-Bridge
  5. Now you can connect to B4A-Bridge as normal in the B4A IDE
 
Last edited:

rraswisak

Active Member
Licensed User
For some reason on my other PC which do not enabled Virtualization in the BIOS, Nox Playes is the solution, easy to setup and prety fast. If you want to directly deploy to the emulator (without B4A Bridge), just activate the USB Debug in Developer Option
 

knutf

Member
Licensed User
I was not aware of that the USB Debug option works in Nox Player. I tried it, but It didn't work on my PC. Sometimes B4A reported no device, and sometimes it reported different errors about the ADB-server. Luckily in this situation, there is 2 ways that lead to Rome.
 

rraswisak

Active Member
Licensed User
Well, maybe you miss one more step as i can describe here;

Environment:
OS: Windows 10 Pro 64bit
B4A version: 9.50
B4A android.jar path: C:\B4A_SDK\platforms\android-29\android.jar
NoxPlayer version: 6.6.0.0
NoxPlayer path: C:\Program Files\Nox\Bin

1. Rename adb.exe from your SDK platform-tools directory (C:\B4A_SDK\platform-tools) to whatever filename
2. On NoxPlayer installation folder copy adb.exe and AdbWinApi.dll
3. Copy and paste both file to this folder (point #1)
4. While your NoxPlayer emulator open try to check the connection by type in command prompt: C:\Program Files\Nox\Bin\nox_adb.exe connect 127.0.0.1:62001
5. Restart your NoxPlayer and B4A
6. All set and ready to deploy.

 

knutf

Member
Licensed User
Well, maybe you miss one more step as i can describe here;
Thank you for contributions.

According to my testings:
The only thing you have to do to directly deploy to the NoxPlayer is to replace the adb.exe in the SDK platform-tools directory with the adb.exe in the NoxPlayer Bin directory

I ran fc (filecompare) on the AdbWinApi.dll files, they ar exactly the same files!

It was not necessary to enable USB Debugging in the NoxPlayer

I'll edit posting #1 to incorporate these findings

Thanks to rraswisak that put me on the right track
 
Last edited:

mcqueccu

Active Member
Licensed User
Sometimes when NoX fails to recognise connected device.
What I usually do is to Restart ADB in the IDE and retry connection.
If still it does not connect, Open CMD, change directory to C:\Program Files (x86)\Nox\bin then run this command

B4X:
nox_adb.exe connect 127.0.0.1:62001
 
Top