Android Tutorial Now you can debug android app directly under Windows11

Intel's Bridge technology will allow Android apps to run natively on Windows 11, now Microsoft released the beta version。

1. download windows11 from https://www.microsoft.com/en-us/software-download/windows11 and installed.


2. open https://store.rg-adguard.net, and input:https://www.microsoft.com/store/productId/9P3395VX91NR, select slow channel,download "MicrosoftCorporationII.WindowsSubsystemForAndroid_1.7.32815.0_neutral_~_8wekyb3d8bbwe.msixbundle" pakage.




3. Administrator runs the Powershell and install the pakage:
B4X:
Add-AppxPackage -Path D:\MicrosoftCorporationII.WindowsSubsystemForAndroid_1.7.32815.0_neutral_~_8wekyb3d8bbwe.msixbundle
4. Open the developer mode in the installed pakage: Windows Subsystem for Android


5. Install the B4A-Bridge.apk(https://www.b4x.com/android/files/b4a_bridge.apk) use adb(you can download adb from:https://www.b4x.com/b4a.html#installation):
run cmd under X:\Android\Sdk\platform-tools:
B4X:
adb connect 127.0.0.1:58526
install B4A-Bridge.apk use command:
B4X:
adb install D:\b4a_bridge.apk


or you can make a batch, drag app to the batch
B4X:
@echo off

adb.exe connect 127.0.0.1:58526

adb.exe -s 127.0.0.1:58526 install %1

pause

that's all, now you can debug your app directly under Windows11.





 
Last edited:

Colin Evans

Active Member
Licensed User
Longtime User
Says it won't work on my system, the only thing not meeting requirements is, it is 'Only available to Windows insiders in the USA'
 

Colin Evans

Active Member
Licensed User
Longtime User
Hi, followed your instructions Hyper-V turned on, set the region to United States but still get the following, tried various methods including the powershell but can't get it

 
Last edited:

Colin Evans

Active Member
Licensed User
Longtime User
Finally got it working, but not sure how I followed your instructions although it took me in different directions, set all the regional stuff and set my VPN to New York US

Picked up the IP address from Windows Subsystem for Android and added a new IP in B4A Tools, B4A Bridge, then ran, works wonderfully, thanks
One thing I couldn't get working was the Amazon App Store, recommended to use for the Subsystem, this seems to bypass the region and VPN settings as it won't work outside the US
 

Colin Evans

Active Member
Licensed User
Longtime User
Don't know what's gone wrong, it did work yesterday but when I tried today I get the following error when trying to run the apk via the batch file

cannot connect to 127.0.0.1:58526: No connection could be made because the target machine actively refused it. (10061)
Performing Push Install
adb: error: failed to get feature set: device '127.0.0.1:58526' not found
Press any key to continue . . .

Therefore no IP listed in the subsystem app

I've tried disabling AntiVirus, changing IP to localhost or the machine's IP and various ports, any idea's?
 

Colin Evans

Active Member
Licensed User
Longtime User
Update, I clicked on files withing the Subsystem for Android, which didn't do a lot, just showed an empty folder etc but one thing I did note was the Developer Mode changed and informed me that I should use the 127.0.0.1:58526,

So tried the batch file again and magically it now works and I got an IP address to use in B4A Bridge, tried it a few times and seems to work okay (for now) thanks for all your help laomms much appreciated

 

laomms

Member
Licensed User
Longtime User
The WSA with googleplay released in twitter:

1. Uninstalled WSA old version



2. Download the attachment,Unzip the package
3. Run Powershell as administrator In the folder directory, for example:
B4X:
cd C:/WSAwith Google Play
4. Enter command to install WSA with GSM:
B4X:
Add-AppxPackage -Register .AppxManifest.xml
5. Turn on WSA Developer Mode
6. Use adb connect WSA,input below command:
B4X:
adb connect 127.0.0.1:58526
adb shell
su
setenforce 0



download
 
Last edited:

philone

New Member
Wow, this works fantastic. I just got a shiny new Surface Laptop Studio and was considering installing an emulator instead of testing directly on my phone (emulators have always been sluggish for those who don't know, figured this 3+ghz laptop with 32 gigs of ram might help) then I remembered seeing in a video I watched introducing some things in Windows 11 mentioned native Android apps so I searched this forum, found this thread, and after jumping (stumbling?) through a few hoops it's all up and running. It's so nice to click run and have it pop up immediately and run perfectly.
 

GuitarRon

New Member
One small additional step that may help others: After running the adb connect/install as outlined above, and right after OP's "that's all, now you can debug your app directly under Windows11.".... Remember to launch and run the B4A-Bridge from the Windows Start Menu. From there, the newly launched app will display the IP needed for B4A to connect.

.

Kept trying to connect without the bridge running. This Newbie is still learning.
 

satishgr

New Member
Hi laomms:
I did follow your procedures but could not install and I am struck at below screen.

could you help me to resolve the issues and tried to connect via ADB but unsuccessful.


 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…