What will this article talk about?
A lot of my friends are trying to run Android apps on Windows 11. Looks like Microsoft's demo is pretty cool. But soon we found out that Microsoft only promised to run apps from the Amazon app store. And the apps in the Amazon app store are very scarce.
We are very much looking forward to being able to run custom Apks. Or even go a step further, install apps directly from Google Play.
You need to:
- Prepare the Windows devices to get ready for Android subsystem.
- Enable Android subsystem via downloading the Amazon App Store.
- Use
adb
to connect and manage your Android subsystem. - Learn to deploy a custom
.apk
file - Learn to manage and uninstall a custom Android package.
- Learn to install Google Play.
- Fix Internet connection.
Prepare
Before getting started, you need to make sure your computer supports virtualization.
You MUST enable Hyper-V featurs.
You can do that via opening Windows Features
. Or running PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All -NoRestart
Write-Host "Enabled!"
And make sure you have adb
installed ready. You can download adb
here:
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
After downloading, add the unzipped folder to environment variables. Make sure adb runs locally.
Enable
Now go to Microsoft app store. Enable WSA now. You can search Amazon
and result will be shown.
Install that Amazon
app store. While installing, Windows 11 will enable WSA feature, and may reboot.
(This WSA distribute does NOT support Google Play services. You can skip this step if you need Google Play)
After installing, you can see Windows subsystem for Android settings
in your start menu.
Connect and manage
Make sure the subsystem is started by clicking the Amazon
app store or any Android apps.
Enable the developer mode for your subsystem in the settings app:
Now you can use adb
to connect to the subsystem.
$ adb connect 127.0.0.1:58526
And you can open Android
native settings app via running:
$ adb shell am start -n com.android.settings/.Settings\$WifiSettingsActivity
You may try this if that is not working:
adb shell am start -a com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS
Deploy an apk
Now you can download an Android application apk. For example, you can download bilibili at: https://app.bilibili.com/
And you can start deployment via:
$ adb install ./iBiliPlayer-bili.apk
Uninstall an apk
You can run the following command to list all installed packages:
$ adb shell pm list packages
And to uninstall, it's easy. Find the package name first, and then run:
$ adb uninstall 'package.name'
For system apps, you may need this command to uninstall:
# Dangerous to run
$ adb shell pm uninstall -k --user 0 package name
Install WSA with Google Play
You might be tempted to run Youtube, games or Microsoft Authenticator. But these apps all crash because they are missing the Google Services Framework.
(It seems you don't have to install the Amazon AppStore before installing the community distrib MagiskOnWSA
.)
Installing them isn't difficult either.
First go to:
https://github.com/LSPosed/MagiskOnWSA
And click fork
:
After forking, you can run the workflow to build your own image.
I personally suggest building with full
apps options. As pico
may have some issue like couldn't connect to the internet.
After building, you just need to download the build artifact:
And run the install.ps1
:
After running, you may see:
And Google Play will start working.
And enjoy!
Fix Internet connection
When I first deployed Android Subsystem, I found that it couldn't connect to the Internet. So I spent some time debugging it.
Open the Wifi settings in Android first:
Run the following command:
adb shell am start -n com.android.settings/.Settings\$WifiSettingsActivity
KEEP that app open! Or you won't have a chance to open that again.
And, go to Hyper-V Manager. We gonna switch the network adaptor.
Go to virtual switch manager.
You may see that there is an virtual switch named: WSL
.
Change that to External Network
. Select the physical network card which has access to Internet.
After switching, your main Windows 11 OS may share the same switch with your WSA
. We switched that from NAT
mode to share the same network with main OS.
And you need to know the WSA
's IP address.
Click the settings of the VirtWifi
:
And change that to DHCP
.
And now it will be shown as connected.
Copy it's IP address soon!
And don't forget to reconnect to that with adb
:
Now enjoy!
I recently read your blog post about playing with Windows Subsystem for Android (WSA) with Google Play, and I found it both informative and engaging. Your step-by-step instructions on how to enable WSA, connect and manage the subsystem, deploy and uninstall APKs, and install WSA with Google Play were clear and easy to follow. The inclusion of screenshots was also helpful in visualizing the process.
One of the key highlights of your post was the detailed explanation of how to fix internet connection issues within the Android Subsystem. Your instructions on switching the network adapter and adjusting the settings of the VirtWifi were particularly useful.
However, there were a few areas where I believe the post could be improved:
While the post assumes that the reader has a basic understanding of adb and Android development, it would be helpful to provide a brief introduction to adb and its purpose in the context of WSA.
In the section on installing WSA with Google Play, you mention that the user should fork the MagiskOnWSA repository. It would be beneficial to explain why forking is necessary, and how it helps in building a custom image for the user.
It would be helpful to provide more context on the potential risks and consequences of uninstalling system apps using the command you provided. This can help users make informed decisions before attempting such actions.
Finally, it would be great to include a brief conclusion summarizing the benefits of using WSA with Google Play, as well as any potential limitations or challenges users may face.
Overall, your blog post was informative and well-written. I appreciate the effort you put into creating this guide, and I'm sure many readers will find it valuable. Keep up the great work!