- Article
- 8 minutes to read
Windows Subsystem for Android™️ enables your Windows 11 device to run Android applications that are available in the Amazon Appstore. Android is a trademark of Google LLC. If you're a developer interested in targeting Windows desktop devices and optimizing for the Windows operating system, this guide is for you.
To make your Android app available on Windows 11 devices, you must:
For more information or support:
- Sign up for updates to the Amazon Appstore on Windows program.
- Visit the Amazon developer support portal where you can find articles, forums, FAQs, or reach out for direct support via the Appstore "Contact us" page once you set up an Amazon Developer account.
This guide can help you test and debug your Android app on Windows:
- Set up your development environment, including prerequisites, installing the Amazon Appstore, and using the Settings app.
- Handle input compatibility considerations for Windows devices, such as: keyboard input, mouse input, and window management and resizing.
- Test and debug your app on a Windows 11 device.
- Troubleshoot and find answers.
Developer GitHub
Want to learn more about Windows Subsystem for Android roadmap, discuss developer issues and file bugs or feature requests with the subsystem team? Visit the Windows Subsystem for Android Developers GitHub.
Preview Program
The Windows Subsystem for Android™️ Preview Program allows users to receive early-preview builds of the Windows Subsystem for Android™ and Amazon Appstore on Windows. For more details, visit the Preview Program page.
Set up your development environment
To test your Android app in the Windows desktop environment, a bit of set up will be required.
Prerequisites
Windows Subsystem for Android is available on Windows 11. Your device must meet specific requirements: Device requirements.
Install the Amazon Appstore
The Microsoft Store will automatically install Windows Subsystem for Android silently in the background when either of the two following user actions are taken:
- Install the Amazon Appstore from the Microsoft Store. Selecting Get will begin the installation of the app.
- Install an Android app from the Microsoft Store for the first time, which will also install the Amazon Appstore.
The Amazon Appstore and the Windows Subsystem for Android Settings app will then appear in the Windows 11 Start menu and be available on search, offering a catalogue of Android apps.
Note
The Amazon Appstore on Windows (a requirement for running Android apps on Windows 11) is available in select regions.
Windows Subsystem for Android™️ Settings app
To access the Windows Subsystem for Android Settings app, go to: Start > All Apps > Windows Subsystem for Android™️ Settings. Learn more about specific settings app features: Manage settings for mobile apps on Windows.
Input compatibility considerations for Windows devices
There are a few unique input behaviors to consider that will likely require updates to your Android app code, designed for handheld devices, to be compatible when running on a Windows desktop device via the Amazon Appstore.
Keyboard input
For text input fields handled by an on-screen virtual keyboard input method (or IME), such as EditText
, apps should behave as expected. (EditText class in the Android docs).
For keystrokes that cannot be anticipated by the framework, apps will need to handle the behavior themselves. If this is already implemented in-app, no extra work is required.
As an example, some games may already support movement facilitated via keyboard, through w
a
s
d
keys, alongside touch input.
The following are keyboard inputs that developers should consider code updates for when building for Windows 11 devices:
- Enter Key
- Arrow-key and Tab-key Navigation
- Change Selected Item Highlight Color
- Ctrl-based Shortcuts
Learn more about how to optimize for these keyboard input scenarios on desktop devices by following the Android documentation:
- Input compatibility guide in the Android docs
- Handle keyboard input guide in the Android docs
- Use touch gestures guide in the Android docs
Mouse input
Developers should consider updating code for the following mouse inputs when building for Windows devices:
- Right Click
- Tooltips / Hover Text
- Hover Effects
- Mouse Scroll Wheel Action
- Drag and Drop
Mouse input, similar to keyboard input, must follow the official Android app guidelines. This means using the InputDevice
class paired with the SOURCE_MOUSE
constant. Learn more about how to optimize for these mouse input scenarios on desktop devices by following the Android documentation:
- Input compatibility guide in the Android docs
- InputDevice reference in the Android docs
- SOURCE_MOUSE reference in the Android docs
Window management and resizing
Unlike traditional mobile form factors, Android apps running on Windows 11 can be freely resized, should be responsive in their resizing, and can be snapped using Windows actions/gestures.
Minimum screen requirement
Windows 11 enforces a minimum screen requirement of 720p resolution (1280x720) with a >9” screen.
Letter & pillar boxing
When the aspect ratio of a window size does not align between the device screen sizes that window is being displayed on, the result may be Letterboxing (the window is wider than it is high, or horizontally longer) or Pillarboxing (the window is more narrow than it is wide, or vertically longer). The result is bars being placed on the sides of the window in order to center it. These bars may be light- or dark-themed depending on the system settings selected. This will only occur as necessary when the Android app is snapped or maximized, allowing Android apps to take advantage of the rich snapping features in Windows and integrate into the windowing model.
Additional resizing considerations
The following should also be considered when updating an Android app to run on a Windows 11 device with respect to window management and resizing:
- Initial launch size
- Window dimensions
- Content bounds
- Free form resizing
- Screen Orientation
Learn more about how to optimize for window resizing scenarios on desktop devices by following the Window Management guide in the Android docs.
Test and debug
To test and debug your app on a Windows 11 device using the Windows Subsystem for Android the following set up steps are required.
Enable developer mode in Windows Settings
You must first enable developer mode in Windows Settings. There are three ways to enable developer mode:
- Open the Windows Subsystem for Android Settings app. Once open, enable Developer Mode.
- Search for “Developer Settings” in Windows search.
- Navigate to Settings > Privacy and Security > For developers > Developer mode.
Connect to the Windows Subsystem for Android for debugging
To connect to the Windows Subsystem for Android VM for debugging:
Launch an Android app that was installed using the Amazon Appstore.
(Video) TESTED: Android Apps on Windows 11!You can connect using adb connect with the following command (you must have adb installed):
adb connect 127.0.0.1:58526
Connect to a test device
To connect to a test device (with Windows Subsystem for Android installed) on the same network from Windows/Mac:
On the test device (where Windows Subsystem for Android is installed) open a PowerShell window and identify the IP address of the test device by running the command:
ipconfig
Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
adb connect <TEST DEVICE IP ADDRESS>:58526
The <TEST DEVICE IP ADDRESS>
can be found in the output of "ipconfig" from the test device. You can also deploy and debug apps from Android Studio.
To use Android Debug Bridge (ADB) to connect your development workstation directly to your Android device so you can install packages and evaluate changes, see Android Debug Bridge in the Android Open Source Project docs.
Debug your app
While apps should be installed using the Amazon Appstore, debugging an Android app on a Windows device is possible using an APK (Android application package) and adb (Android Debug Bridge).
To debug an APK using adb:
Follow the steps to connect to the Windows Subsystem for Android VM above.
Install the APK using the adb install command:
adb install app-debug.apk
Expected Output:
Performing Streamed InstallSuccess
A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
(Video) Windows10 安装 Windows Subsystem for Android (WSA) 安卓子系统
Building Universal APKs
Windows Subsystem for Android utilizes Intel Bridge Technology to emulate Arm applications on x86 based processors. Arm applications will run on Arm based processors natively. The emulation layer will induce a performance overhead – for optimal performance, submit your application for both the x86-64 and Arm64 architectures.
VM lifecycle considerations
Windows Subsystem for Android utilizes a virtual machine (VM) which provides compatibility with the AOSP framework and devices like keyboards, mice, touch, pen, etc.
There are three possible states for the VM running apps with Windows Subsystem for Android:
- Running
- Lightweight Doze: Activated after no app activity for 3 minutes. Deactivated by user activity or an app notification.
- Not Running: Activated after no app activity for 7 minutes.
Transitions between these states are triggered by user activity, such as launching or interaction with the Android app or an app notification. Android apps are paused and then stopped when their window is minimized.
VM Properties
The properties for the Windows Subsystem for Android VM are listed below. Hardcoding these values is not recommended as that could cause future incompatibilities.
Property | Value |
---|---|
Build.MANUFACTURER | Microsoft Corporation |
Build.MODEL | Subsystem for Android(TM) |
Build.VERSION.SDK_INT | 32 |
Build.BOARD | windows |
Security
Windows Subsystem for Android performs per-file encryption that is software-based.
Both Windows kernel-mode drivers and Windows applications running at medium integrity level (IL) can inspect arbitrary Android containers and Android app memory. There are no plans to add detection for cheats/macro/bot/suspicious behaviors detection in the short-term.
Developers querying getSecurityLevel
will get SECURITY_LEVEL_SW_SECURE_CRYPTO
. Learn more about getSecurityLevel
in the Android API Reference guide.
Uninstalling Windows Subsystem for Android
You can uninstall the Windows Subsystem for Android, but note that all associated apps will also be uninstalled.
- Uninstalling the Amazon Appstore will uninstall the Windows Subsystem for Android and all other Android apps.
- Uninstalling an Amazon Appstore app will only uninstall the app (same behavior as Windows apps).
- Uninstalling the Windows Subsystem for Android will uninstall the Amazon Appstore and all Android apps.
Troubleshooting issues
If you encounter issues specific to the Amazon Appstore on Windows, try the following troubleshooting steps:
- Select Windows search from the Windows task bar.
- Search for “Amazon Appstore” and right-click on the Amazon Appstore icon.
- Select “App Settings” in the dropdown options.
- Select “Storage and Cache” and click both “Clear Storage” and “Clear cache”.
- Go back and select “Force Stop”.
- Close the Amazon Appstore Settings window.
- Relaunch the Amazon Appstore.
For further troubleshooting steps relating to the Windows Subsystem for Android Settings app or to leave feedback using Feedback Hub, see Troubleshooting and FAQ for mobile apps on Windows.
For any other developer questions and support, use the .
Additional resources
- Apps from the Amazon Appstore
- Accessibility on Windows Subsystem for Android
FAQs
What does Windows Subsystem for Android do? ›
Windows Subsystem for Android performs per-file encryption that is software-based. Both Windows kernel-mode drivers and Windows applications running at medium integrity level (IL) can inspect arbitrary Android containers and Android app memory.
How do I fix Windows subsystem on Android? ›Here's what to try: Restart the Subsystem with the Windows Subsystem for Android™ Settings app, then try opening the app again. Force the app to close by selecting Start > Settings > Apps & features, then find the app. Select More > Advanced options > Terminate, then try to open the app again.
How do I fix WSA not opening? ›- Fix 1: Uninstall Your VPN Application.
- Fix 2: Repair/Reset Windows Subsystem Android.
- Fix 3: Update the Microsoft Store Framework.
- Fix 4: Update Windows 11 to the Latest Version.
- Fix 5: Turn off Third-party Antivirus Temporarily.
- Final Words.
...
2. Enable Virtual Machine Platform
- Open Start on Windows 11.
- Search for Turn Windows features on or off, and click the top result to open the app.
- Check the “Virtual Machine Platform” option.
- Click the OK button.
- Restart the computer.
Why would I use WSL rather than Linux in a VM? WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux.
Is it OK to delete system apps? ›You can uninstall apps you've installed on your phone. If you remove an app you paid for, you can reinstall it later without buying it again. You can also disable system apps that came with your phone. Important: You're using an older Android version.
How do I block system apps on Android? ›- Navigate to your phone's Settings and tap Apps.
- Select the one you want to remove.
- At the bottom of the screen, you may see an option to disable or uninstall it. ...
- If there is no option to uninstall or disable the app, it's a system app that can't be disabled.
- Open Settings on Windows 11.
- Click on Apps.
- Click the Installed apps page. ...
- Select the Linux distro, open the menu (three-dotted button) on the right side, and choose the “Uninstall” option.
- Click the Uninstall option again.
WSL is as secure as any other program running in your Windows user account.
Why is WSL not working? ›This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. See the full instructions on taking the backport.
How do I activate WSA? ›
Install WSL command
You can now install everything you need to run WSL with a single command. Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator", enter the wsl --install command, then restart your machine.
xmine64 on Mar 6, 2022
You're wrong, WSL2 only requires Windows Hypervisor that's available on Windows 10, WSL2 itself isn't part of Windows can be installed and upgraded separately.
- Step 1: Download Android Debug Bridge. ...
- Step 2: Enable your Android device to be recognized on your computer. ...
- Step 3: Get set up to download an Android app from your desktop. ...
- Step 4: Start the download process.
- Install WSATools from the Microsoft store. ...
- Download (or otherwise obtain) an APK file. ...
- Launch WSATools on your PC.
- Click Select an APK and choose one from your storage drive. ...
- Click Install.
With the Phone Link app, you can instantly access the Android apps installed on your mobile device right on your PC. Using a Wi-Fi connection, Apps allows you to browse, play, order, chat, and more — all while using your PC's larger screen and keyboard.
Is WSL a good option? ›WSL could be an ideal introduction to Linux for people who know nothing about it. They can get familiar with Linux commands without having to fully install a new operating system. All it takes is a few clicks from the Microsoft Store to set up WSL. This will also lower the barrier of adoption to Linux.
What should I Enable for WSL? ›By default, WSL is disabled. To enable it, open Start -> Control Panel -> All Control Panel Items -> Programs and Features -> Turn Windows features on or off, check Windows Subsystem for Linux, click OK, and restart your computer. Then you need to restart your computer.
Does anyone use WSL? ›WSL is great tool for developers, engineers, students, and *NIX/Linux geeks (or anyone aspiring to become one) who want to run Linux tools on Windows. Most of the things you can do with WSL are going to be related to programming, the console, sysadmin, automation, AI/data science, and other IT tasks.
What apps should I disable on Android? ›- Pre-Installed Bloatware Apps. ...
- Old Utility Apps That Are Now Built-In. ...
- Outdated Productivity Apps. ...
- Performance Booster Apps. ...
- Duplicate Apps That Perform the Same Functions. ...
- Overly Engaging Social Media Apps. ...
- Old Games You No Longer Play. ...
- Apps You No Longer Use.
- 117. Document Manager.
- 217. Coin track Loan - Online loan.
- 317. Cool Caller Screen.
- 417. PSD Auth Protector.
- 517. RGB Emoji Keyboard.
- 617. Camera Translator Pro.
- 717. Fast PDF Scanner.
- 817. Air Balloon Wallpaper.
What are spy apps disguised as on Android? ›
Tool Name | Best For |
---|---|
mSpy | Monitoring chats, photos, videos, and location of Android and iOS devices. |
XNSPY | View photos, videos, and social media chats on your kids' android smartphone. |
eyeZy | Feature-heavy cell phone spying app for Parents and Employers. |
- Access your device's main drive and look for system. ...
- Delete “busybox” and “su.” By the way, these might not be there. ...
- Go back to the system folder and select xbin. ...
- Go back to the system folder and select app.
- Delete “superuser. ...
- Restart the device, and it will all be done.
- Open Start.
- Search for Command Prompt (or PowerShell), right-click the top result, and select the Run as administrator option.
- Type the following command to view all running WSL distros and press Enter: wsl --list --verbose.
Open Settings. Click on Apps. Click on Apps & features. Select the Windows Subsystem for Linux update item and click the Uninstall button.
Can I turn off WSL? ›Click on Apps. Click on Apps & features. Under the “Related settings” section, click the Programs and Features option from the right side. Click the Turn Windows features on or off option.
Is WSL a security risk? ›WSL vulnerabilities
The main difficulty with securing WSL is that it allows a user to execute both Linux and Windows commands on the same file system. This means that if a file is not readable from Linux it might still be readable from Windows and vice versa.
Low risk. The Subsystem is not resource intensive and works very similar to having a docker instance running where the code is relatively contained. The big difference is that the subsystem can access files outside the Subsystem such as System32 files. It's useful for testing or SSH into another server.
Does WSL use a lot of memory? ›On machines running build 20175 or higher, RAM is limited to either 50% of your total memory or 8GB, whichever happens to be smaller. On builds older than 20175, WSL could consume up to 80% of your host RAM. That's potentially a lot of RAM!
Can WSL run all Linux apps? ›Windows Subsystem for Linux (WSL) now supports running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience. WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.
Is WSL free to use? ›WSL is free, but not necessarily cost-effect.
WSL is a great tool to have in your toolbox, and is convenient to use for non-production workloads and quick-and-dirty tasks, but it wasn't designed for production workloads; it's best to use it for what it was designed for, not for what you can tweak it to do.
Can WSL run Windows commands? ›
WSL can run Windows tools directly from the WSL command line using [tool-name].exe . For example, notepad.exe . Applications run this way have the following properties: Retain the working directory as the WSL command prompt (for the most part -- exceptions are explained below).
What is the purpose of WSA? ›WSA Mission:
A community to exchange ideas, educate members, support the highest business standards, and create strong business leaders within the sign industry.
...
- Click the Browse button.
- Select the extraction destination.
- Click the Extract button.
- Open the platform-tools folder.
- Select and copy the path from the address bar.
Yes, you can easily control your Android phone from PC on the same Lan with AirDroid Personal. Download AirDroid Personal on your computer and click on the Telescope icon in the left bar. Then, choose the Android device from the available options. Finally, hit on “Remote Control” to establish the connection.
What apps are running on my phone? ›To open Quick Settings, from the top of the screen, swipe down twice. To see the number of active apps running in the background: At the bottom left, tap # active apps. Or, at the bottom right, tap the number next to Settings and Power .
How can I run Android apps on my PC without emulator? ›- To begin, install and launch AirDroid Personal App on your Android device. ...
- After that, follow the on-screen instructions to allow AirDroid Personal to use your Android device.
- Now, download AirDroid Personal Client on your PC.
A subsystem is a single, predefined operating environment through which the system coordinates the work flow and resource use. The system can contain several subsystems, all operating independently of each other. Subsystems manage resources. All jobs, with the exception of system jobs, run within subsystems.
Is it safe to enable Windows Subsystem for Linux? ›WSL is as secure as any other program running in your Windows user account. It's not suitable for isolating a Linux VM from your Windows host (in either direction); it is designed to simulate the experience of just running user-mode Linux binaries natively on Windows (which is what WSLv1 does).
Do I need Windows Subsystem for Linux update? ›You must first enable the "Windows Subsystem for Linux" optional feature before installing any Linux distributions on Windows.
How do you use WSA? ›Navigate to the Platform Tools folder, right-click, and select Open in Terminal. Open Windows Subsystem for Android, go to Developer and turn on Developer mode. Once turned on, Android's Developer options pop up in a window.
What is an example of a subsystem? ›
A unit or device that is part of a larger system. For example, a disk subsystem is a part of a computer system. A bus is a part of the computer. A subsystem usually refers to hardware, but it may be used to describe software.
How can we identify a sub system? ›By rearranging the rows and columns of the interaction matrix into a pattern which resembles a block diagonal structure, the blocks can be interpreted as subsystems which can be identified by a later process.
What is a subsystem device? ›Overview. The Device subsystem is responsible for discovering and tracking the devices that comprise the network, and for enabling operators and applications to control them.
What are the disadvantages of WSL? ›- WSL Could Discourage Desktop Linux Adoption. ...
- Remote Possibility of Microsoft Dominating Linux. ...
- WSL Could Discourage Native App Development. ...
- You're Still Using Windows. ...
- WSL Is Not Really Designed for Servers.
WSL2 offers improved performance over version 1 by providing more direct access to the host hardware drivers. Network and storage system performance in particular is greatly improved.
What happens if you don't update your system? ›Cyber Attacks And Malicious Threats
If you don't apply those updates, you're still vulnerable. Outdated software is prone to malware infections and other cyber concerns like Ransomware.
File performance across the Windows and Linux operating systems is faster in WSL 1 than WSL 2, so if you are using Windows applications to access Linux files, you will currently achieve faster performance with WSL 1.
Can I disable Windows Subsystem for Linux? ›Remove Windows Subsystem for Linux components
Click on Apps. Click the Installed apps page on the right side. Select the Windows Subsystem for Linux item. Click the menu (three-dotted) button on the right and the Uninstall button.