LightBlog

jeudi 21 octobre 2021

How to sideload Android apps on Windows 11

So you just set up Windows Subsystem for Android on your Windows 11 PC. You can’t wait to run your favorite Android apps right on your computer, but there is a catch! Microsoft has partnered with Amazon to integrate the Amazon Appstore with the Microsoft Store, which means you can’t officially access the Google Play Store’s vast library of apps and games on the native Android subsystem of Windows. To rub salt into the wound, not all Amazon Appstore apps are available on Windows 11 at this moment — the roster is limited to just 50 curated apps for now.

Hands on with Android apps on Windows 11

Luckily, Microsoft ships the Windows Subsystem for Android environment with a working debugging option. As a result, you can access and debug the underlying Android layer from the host Windows 11 OS using the regular Android Debugging Bridge (ADB) binary. Due to the fact that we can use ADB to install any standard Android app installation package (APK), it is also possible to sideload apps on the Windows Subsystem for Android that are not present in the Amazon Appstore.


How to sideload apps on the Windows Subsystem for Android

Keep in mind that the whole Windows Subsystem for Android is a beta-quality software. The apps curated by Amazon and Microsoft are likely to be heavily optimized for the environment, which is why they managed to secure their seats in the first batch. Having said that, many other Android apps should work just fine out of the box. The only way to test the compatibility is to sideload them, and this is where this tutorial will come in handy.

To sideload any Android app on Windows 11’s Subsystem for Android, follow these steps:

  1. Download the APK file of your desired app or game from a trusted source.
    1. If it’s a community-developed project, check out the respective thread on XDA forums or similar platforms.
    2. APKs of open source apps are often found through their GitHub repo, or on stores like F-Droid as well.
    3. Lastly, there exist third-party APK hosting resources like APK Mirror and APKPure, which are worth looking for.
  2. Once you have your hands on the APK file, start the Windows Subsystem for Android environment. Click on the Start Menu, then click on the “All apps” button, and locate the shortcut named “Windows Subsystem for Android™.” You can also type “subsystem” in the search box to make it quicker.
    Windows Subsystem for Android Start Menu
  3. At this point, you should see the Windows Subsystem for Android settings screen. Scroll down and enable the “Developer mode” toggle.
    WSA Developer mode toggle
  4. Since this particular Android instance is running alongside the host Windows kernel, we can access it through the localhost (127.0.0.1) interface. In fact, the Android layer also binds itself to a random IP from the 172.30.0.0/24 private network, which can be seen under the IP address field.
    • If you are unable to see the IP address in the form of 172.30.x.x, click on the “Files” option at the top of the Settings screen to kickstart the Android layer by opening its integrated file explorer app. Then click the “Refresh” button to get the IP address listed. You can now copy it by the click of a button.
      WSA Developer mode IP address
  5. As soon as the Android layer is running, we can connect it using ADB from the host Windows 11 OS. You can either use the localhost (127.0.0.1) with port 58526, or the IP address shown in the Settings window to establish the connection. Considering you’ve set up ADB to use it from any location on your PC, open a new Windows Terminal window and type one of the following:
    adb connect 127.0.0.1:58526

    or

    adb connect <IP address>

    (The IP address is the one you copied in the previous step)
    WSA ADB connect options

  6. Now we can install our desired APK through ADB. The command should be as follows:
    adb install <full_path_to_the_APK_file>
    WSA ADB install APK
  7. If everything goes right, then a shortcut of the Android app will be created under the Start Menu of Windows – just like any regular Windows app. Click on the shortcut to start the app.
    WSA running Nova Launcher and Subway Surfers
    • In case you can’t find the shortcut of the Android app, you can manually run it using the following command:
      %LOCALAPPDATA%\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\WsaClient.exe /launch wsa://<PACKAGENAME>

      For example, to run Subway Surfers, enter the following in the Run prompt of Windows:

      %LOCALAPPDATA%\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\WsaClient.exe /launch wsa://com.kiloo.subwaysurf
    • You can also invoke the app directly from a connected ADB shell window:
      adb shell monkey -p <PACKAGENAME> 1

      To start Subway Surfers, for example, the command should be:

      adb shell monkey -p com.kiloo.subwaysurf 1

      WSA ADB shell app start

  8. That’s it!

Note that sideloaded apps will have network access, which means you can install and use the Android variant of popular browsers like Firefox inside the Windows Subsystem for Android, and then use that for downloading apps straight away. Windows 11 also lets you apply firewall rules on Android apps. While it is possible to sideload an app that relies on Google services, it’ll crash while attempting to run it due to the lack of Google services, though you can try using microG as a possible workaround.



What do you think of Windows Subsystem for Android on Windows 11? Have you already started using it for playing your favorite Android games on your PC? Let us know in the comments section below.

The post How to sideload Android apps on Windows 11 appeared first on xda-developers.



from xda-developers https://ift.tt/2ZbrxXn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire