kaumnen
Bllog | by kaumnen

Bllog | by kaumnen

How to install Google Play Store on WSA - Windows Subsystem for Android™

kaumnen
·Oct 25, 2021·

5 min read

How to install Google Play Store on WSA - Windows Subsystem for Android™

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

Kudos to ADeltaX and his repo! Make sure toit :)

Recently, Microsoft released Android™ Apps on Windows 11, read about it more here and here.

But…

It supports only Amazon Store, available only in the US. Weird right? I thought so too.

Hopefully, thanks to an amazing community, and especially ADeltaX, here is a workaround. 😁

He found a way to install fully functional Google Play on WSA. How?

Let’s go.

But before I show you: Be careful! This will be technical and risky, still in the testing stage, as of today (10/25/21).

PREREQUISITES

  1. No WSA (Windows Subsystem for Android) installed. (if you have WSA already, you will need to uninstall it for this to work properly)
  2. WSL2 installed
  3. Ubuntu for WSL2. You should get Ubuntu with installation.
  4. WinRAR, or a similar program for compressed stuff
  5. Enable Developer Mode. Use the search in settings to find it easily.

GETTING STARTED

In this section, we will get everything we need for this guide. That only includes a few websites:

  1. ADeltaX GitHub repo
  2. WSA download website
  3. Android 11 download website

So, with this, we are ready. Let’s start!

Getting WSA

Copy product code → 9P3395VX91NR

Or head over to GitHub and copy product code (it’s the same one):

  1. Open WSA download website.
  2. Select ProductID on the left
  3. Paste product code
  4. Select slow on the right
  5. Click on the tick button

In a few moments, you will have a list of downloadable options.

Scroll (or not), find the biggest option (around 1.21GB, as of 10/25/21) in that list, and click on it to download.

  1. Right-click → Open with → select archiver software previously mentioned.
  2. Find and open(double-click) right .msix | You should match your processor architecture. If you are in doubt about which one you have, check your settings.
  3. I have an x64 system (as probably most of you), so I opened → WsaPackage_1.7.32815.0_x64_Release-Nightly.msix
  4. Go to your disk (C:), and create a folder WindowsSubsystemAndroid.
  5. Select everything except files/folders listed below(hold ctrl and click on them to deselect).
  6. Drag files to the folder on your disc you created previously (WindowsSubsystemAndroid). That's it!

Files to deselect:

  • AppxMetadata → folder
  • AppxSignature.p7x → file
  • AppxBlockMap.xml → file
  • [Content_Types].xml → file

Preparing workaround

Here, we will start preparing needed files for the Google Play apk.

Getting WSAGAScript files

  1. Create another folder on the disc (C:) → GAppsWSA
  2. Go to the repo and download the zip
  3. Extract everything into GAppsWSA

Getting OGA package

  1. Go to the OpenGApps tab
  2. Select your architecture (I have x64, so I selected x86_64), 11.0, and pico, and download the OGA package
  3. Navigate to the GAppsWSA folder, open the #GAPPS folder
  4. Move OGA package to #GAPPS folder

Prepare #IMAGES folder

  1. Navigate to WindowsSubsystemAndroid folder
  2. Copy these 4 files and paste them to the GAppsWSA → #IMAGES folder (hold CTRL and select):

  3. vendor.img

  4. system_ext.img
  5. system.img
  6. product.img

Modifying images

Finally, execution! Let’s do some work in the terminal:

Preparing environment

  1. Open WSL2 terminal (Linux)
  2. Type ‘sudo su’ to get root privileges. Enter
  3. Change directory to GAppsWSA folder. Use ‘cd’ to change the directory. Also ‘ls’ is a handy command, which will list files and folders in that directory.
  4. Update apt → Type ‘sudo apt-get update’. Enter
  5. Install lzip and unzip programs. Type ‘apt install lzip unzip’. Enter
  6. Install dos2unix. Type ‘apt install dos2unix’. Enter

Running commands

Run following commands:

Executing Steps

Execute these commands in order (you might wait a couple of moments, be patient):

  • ./extract_gapps_pico.sh → check for ‘!! GApps folder ready !!’
  • ./extend_and_mount_images.sh → check for ‘!! Images mounted !!’
  • ./apply.sh → check for ‘!! Apply completed !!’
  • ./unmount_images.sh → check for ‘!! Unmounting completed !!’

Let’s continue.

Managing WSA files

Now that we have modified images, we need to replace them in the main WSA (WindowsSubsystemAndroid) folder. We also need to temporarily replace the kernel.

Managing Images

  1. Navigate to the GAppsWSA → #IMAGES folder
  2. Copy 4 image files
  3. Go back to WSA (WindowsSubsystemAndroid) folder, and paste/replace files there

Managing Kernel

  1. Navigate to the GAppsWSA → misc folder
  2. Copy kernel
  3. Go to the WindowsSubsystemAndroid → Tools folder. Don't paste yet!
  4. Rename existing kernel file to ‘kernel_bak’
  5. Now paste the previously copied file

Enabling WSA

Finally! We are ready to enable the WSA system. Let’s do it!

  1. Open Windows PowerShell (not PowerShell) as admin
  2. Type ‘Add-AppxPackage -Register C:\WindowsSubsystemAndroid\AppxManifest.xml’. Enter

It’s done! Well, not fully, but take a moment to shoulder-tap yourself, you deserved it :)

Now, let's open Windows Subsystem for Android. Click on its icon in the Start Menu.

  1. Enable Developer mode in WSA
  2. Click on ‘Files’, so that the WSA system starts
  3. This is a modified image, so it’s recommended to opt-out from sending diagnostic data
  4. Wait for the system to start. This can take a while, be patient.
  5. When it loads, you can close the files window
  6. Open Start Menu
  7. Search for ‘Play Store’ and open it

Last important step

We have to restore the original kernel file, and we’re done.

  1. Open WSA settings (green icon — Windows Subsystem for Android)
  2. Find option and turn off WSA
  3. Go to WindowsSubsystemAndroid → Tools folder
  4. Rename ‘kernel’ → ‘kernel root’
  5. Rename ‘kernel_bak’ → ‘kernel’
  6. Go to WSA settings and open files, in order to restart the system
  7. Enjoy!

Voila, well done! Sign in with your account, you should have a fully functional Play Store in WSA.

_ktb

Sign In Fix

In some cases, Sign In button on the Google Play app will be unresponsive. But don't worry! There is a fix.

Let’s go.

  1. Create a folder ADB in C: drive
  2. Download ADB and extract it inside the ADB folder
  3. Open ADB → platform-tools
  4. Click on the path, type in cmd. Enter
  5. Connect via adb to WSA → adb connect 127.0.0.1:58526.
  6. NOTE: It’s okay if it says ‘failed to authenticate to 127.0.0.1:58526’. Just continue.
  7. Type in ‘adb shell’. Enter
  8. You need root. Type in ‘su’. Enter
  9. Type in ‘setenforce 0’. Enter

You should now be able to log in.

 
Share this