Tutorial: Getting Started with the Android Subsystem on Windows 11—sideloading APKs and even enabling Google Play Services-NotebookCheck.net News

2021-11-24 02:15:45 By : Ms. Lavy Luo

Earlier this week, Microsoft released the first version of Windows Subsystem for Android (WSA) to Insiders in the Beta and Release Preview channels. Although it was originally intended for Insiders to test, any compatible Windows 11 installation can immediately get WSA up and running. 

Microsoft provides WSA through the Amazon Appstore. However, this currently only applies to PCs and Amazon US accounts set to the US region. The good news is that you don't actually need the Amazon Appstore to run WSA. 

In this tutorial, we will show how to get WSA up and running without Amazon Appstore, and load many popular Android applications alongside ADB. We went one step further and showed how to enable Google Play services and use the Play Store with some command-line magic.

Microsoft's fascination with Windows and Android interoperability is nothing new. As early as the Windows Phone era, Microsoft had thought about the idea of ​​running Android applications on Windows 10 Mobile through a tool called Windows Bridge for Android. This is called Project Astoria and is seen as a way for Android developers to reuse code to easily port applications to devices running Windows 10 Mobile.

Although Windows 10 Mobile is a very powerful operating system, it does not have an application store with a large population and sufficient value. To make matters worse, the fierce confrontation between Google and Microsoft has prevented Windows Phone users from using popular Google services.

Although it looked great on paper and in the few demos that Microsoft showed at the time, the Astoria project never really took off. Microsoft abandoned this idea, instead expressing its willingness to focus on iOS and Xamarin's Windows Bridge.

But that was more than five years ago. Today, the Windows subsystem for Android is a reality and can be used by anyone running a compatible Windows 11 PC.

Top 10 multimedia laptops, budget multimedia, games, budget games, lightweight games, business, budget offices, workstations, sub-notebooks, ultrabooks, Chromebooks

Below 300 USD/EUR, below 500 USD/EUR, 1,000 USD/EUR, college students, the best display

Top 10 smartphones smartphones, tablet phones, ≤6 inches, camera smartphones

Just like Windows Subsystem for Linux (WSL) 2, Windows Subsystem for Android (WSA) is a virtual machine running in Hyper-V, which enables users to run Android binaries on Windows 11. The WSA layer supports instant translation between Android and Windows calls.

This is achieved through Intel's bridging technology, which is a runtime post-compiler that allows ARM code to run on x86 processors. That being said, WSA can also run on AMD and Qualcomm-based Windows-on-ARM devices.

With WSA, Android applications can get a first-class experience on Windows 11. They can take advantage of native Windows 11 notifications, new window controls including Snap, and other platform-specific features. However, considering that Microsoft cannot use Google Mobile Services (GMS), WSA is based on the Android Open Source Project (AOSP) and uses Amazon's Appstore to provide applications that do not rely on GMS.

In the current testing phase, about 50 Android apps are being made available through the Amazon App Store on Windows 11, and more will be launched in the next few days.

Now let's start installing WSA on Windows 11. Before proceeding, please make sure that your PC meets the minimum requirements for running WSA, and note that these are somewhat different from the baseline requirements of the Windows 11 operating system alone.

A PC with at least Intel Core i3 8th generation, AMD Ryzen 3000 series or Qualcomm Snapdragon 8c processor and at least 8 GB RAM and SSD is required. You should also enable the optional features of the virtual machine platform in the Turn on or turn off Windows feature settings.

Microsoft may change these requirements based on feedback received during testing. Check Microsoft's page for more information.

After meeting these requirements, please register your PC to the Windows Preview Program in the Beta or Release Preview channel. Make sure not to choose to join the Dev channel, because Microsoft is flying early now, and the defective version will be part of the next Windows version code-named Nickel (Windows 11 is code-named Cobalt).

After registering, you should see the login page of Amazon Appstore Preview on the Microsoft Store. If not, simply search the Amazon Appstore manually and click the install button in the first entry that appears.

Installing the Amazon Appstore will automatically download the required binary files for the Windows subsystem for Android. After completion, open the Amazon App Store, log in with the US Amazon account, and you can start using it.

Although the Amazon App Store route is the method recommended by Microsoft, it requires certain conditions, such as joining the Insiders program and having an Amazon US account. For those who want to test WSA without worrying about the above requirements, there is a possible solution. 

Please note that the Amazon Appstore Preview application is part of the default WSA package.

Now that we have installed WSA, it's time to enjoy the application. Open the Windows Subsystem for Android entry from the Start menu to access the settings. Here, you can access the Android file system, set up WSA resources, and enable developer mode. Enabling developer mode allows Android applications to be loaded side-by-side through the Android Debug Bridge (ADB).

The preview version of the Amazon Appstore currently offers very few application choices, but this does not prevent you from trying your favorite applications. Using ADB, we can easily sideload the Android package (APK) into the WSA. The side-loaded APK behaves in the same way as the APK downloaded through the Amazon Appstore, and can access the same platform features. You can accomplish this in the following ways: 

If sideloading each app doesn't work for you, using a third-party app store such as Aurora or F-Droid may help. Aurora is an excellent library of free and popular Android applications, while F-Droid focuses on open source applications. Download and sideload the Aurora App Store. If available in the repository, you can perform and update all subsequent app installations directly from Aurora.

An important point to consider here is that unlike WSL 2, which allows seamless navigation between Linux and Windows file systems, the file system of WSA cannot be accessed from within Windows. Therefore, although you can open the file application from WSA, you cannot drag and drop files or use the file picker UI to import files into WSA. Hope that Microsoft will enable this feature in future WSA updates.

Currently, we can use popular file sharing applications on Android to solve this limitation. For this, we installed Sweet in the previous steps. Of course, you can also try other popular applications, such as ShareMe.

Note that the free version of Sweet does not use HTTPS, so file sharing must be turned off after use.

The main attraction of Android is the integrated Google Mobile Services (GMS), which allows access to the Play Store and popular Google applications such as YouTube, Gmail, etc. However, the custom AOSP ROM does not come with GMS, and so does WSA as well. Microsoft has also made it increasingly difficult to enable root access to the base Android image, so it is impossible to use fastboot or install a custom recovery (such as TWRP).

GMS can be installed through the OpenGApps project, but this requires the use of the recovery environment to refresh the system image. Although tools such as Flash Gordon do not require root access to refresh OpenGApp, they do not seem to work with WSA.

But Android is Android and Windows is Windows. It is only a matter of time for some enthusiasts to find a solution, and it is already here. Thanks to the developer ADeltaX's efforts on GitHub, you can now install and run GMS, Google Play, etc. in WSA. Although it does require some additional steps, the end result is surprisingly good.

The prerequisites for this process include installing WSL 2 and any Linux distribution of choice, and a convenient file archiving program, such as 7-zip. You also need scripts from ADeltaX's WSAGAScript GitHub repository. In the WSL 2 release, you need to install the lzip, unzip and dos2unix tools.

The entire process is explained in detail in the embedded video below, so we will not copy them anymore. In general, the steps include:

After installing the modified WSA image via PowerShell, the Play Store application should be visible in the Start menu. However, it currently does not allow logging in to a Google account. As a workaround, enabling login requires temporarily disabling SELinux.

Now that we have completed the requirements for the root kernel, it is important to replace the root kernel with the default kernel that comes with WSA. Assuming you have followed the video instructions above,

But be careful. Modifying UWP applications outside the sandbox environment has security risks, so we recommend not to download other self-made WSA packages. This method of using legitimate original packages from Microsoft only locally.

The availability of the Windows subsystem for Android benefits Amazon, Microsoft, and end users in more than one way. Like the Windows subsystem for Linux, achieving a seamless experience between Android and Windows is indeed an admirable software engineering feat. Although solutions such as BlueStacks have existed for a long time, they take up a lot of resources, use older Android versions, and do not work when Windows features such as Hyper-V are enabled (unless you use a special version that works with Hyper-V).

With WSA, Android applications can get a first-class native experience without the user having to fiddle with virtual machines or other applications. However, not everything is good at the moment. 

The performance of the Android subsystem needs to be improved. We have not tested this on an Intel machine, but it has enough time to perform slowly on an AMD Ryzen 7 5800X drive system with 32 GB RAM and 1 TB PCI Gen 4 NVMe SSD.

It is not clear how mouse and keyboard input is mapped to the touch-first interface. Although regular applications or even 2D platform games should not be a big problem, complex 3D games may exhibit unstable behavior. On the other hand, Bluestacks allows easy mapping of touch input to the mouse and keyboard.

In addition, not all apps are immediately visible in a normal Play Store search, which means you still need to load the APK by the side when you need it. For example, Microsoft Launcher will not appear in the WSA Play store. Optimization is also needed to reduce the time required to start the WSA instance for the first time.

There is no doubt that someone will eventually develop a one-click solution to enable Play Store features and even optimize performance. By then, the prospect of running Android on Windows is exciting, and it couldn't be better.