- Introducing Android™ Apps on Windows 11 to Windows Insiders
- Windows is a platform for creators
- Experience Android apps on Windows for the first time
- Built on new Windows platform technology
- What to expect next
- Windows Subsystem for Androidв„ўпёЏ
- Set up your development environment
- Prerequisites
- Install the Amazon Appstore
- Settings app
- Input compatibility considerations for Windows devices
- Keyboard input
- Mouse input
- Window management and resizing
- Minimum screen requirement
- Letter & pillar boxing
- Additional resizing considerations
- Test and debug
- Enable developer mode in Windows Settings
- Connect to the Windows Subsystem for Android for debugging
- Connect to a test device
- Debug your app
- VM lifecycle considerations
- VM Properties
- Security
- Amazon Appstore
- Troubleshooting issues with Amazon Appstore
- Building Universal APKs
- Uninstalling Windows Subsystem for Android
Introducing Android™ Apps on Windows 11 to Windows Insiders
Windows is a platform for creators
Windows is the most open platform on the planet for creators. Part of living our commitment to openness is welcoming partner technologies and content that deliver powerful experiences. And what makes Windows, well, Windows is the variety of apps available. So, with Windows 11, we announced a new Microsoft Store to showcase the best experiences from developers, a flexible and transparent commerce model, and the introduction of Android™ apps.
Today, we are announcing the first preview of our Android apps experience into the Windows Insider Program. We are proud to deliver this experience with our partners – Amazon and Intel – to Dev and Beta Channel users in the United States on eligible devices running Intel, AMD, and Qualcomm platforms.
Experience Android apps on Windows for the first time
To dive in, open the new Microsoft Store and find a selection of mobile experiences that were not available on Windows before. These Android apps and games join our broader catalog, which has everything you are looking for – from core to casual games, sophisticated productivity suites to social experiences, creativity tools to niche hobbyist apps, and developer tools to entire virtualized environments.
Our new Microsoft Store search experience delivers the best results available, regardless of the technology used to build an app, because we are committed to offering you choice when more than one option is available. And when you’re ready to download an Android app, the Amazon Appstore will guide you through the rest of the flow and get you on your way.
Running Android apps and games on Windows 11 will feel familiar, effortless, and integrated – just as you would expect. You can easily run these apps side-by-side with the help of the new Snap Layouts feature, pin them to your Start menu or Taskbar, and interact with them via mouse, touch, or pen input. Android apps are also integrated into Alt + Tab and Task view to help you quickly move back-and-forth between the apps that matter most to you. You can see notifications from Android apps notifications in the Notification Center or share your clipboard between a Windows app and an Android app. We have built the experience with accessibility in mind; many Windows accessibility settings apply to Android apps and we are working with Amazon to deliver more improvements.
Read your Kindle books on a Surface Pro X.
We have partnered with Amazon and popular app developers to curate 50 apps for Windows Insiders to test and validate across a broad set of hardware. We will release new apps through Windows Insider Program updates in the coming months.
Here are a few examples of what you can try today:
- Mobile games: Play some of the most popular mobile games like Lords Mobile, June’s Journey, Coin Master, and more.
- Reading: Enjoy reading your favorite book with Kindle, or a digital comic series with Comics on your Windows tablet and swipe pages with the ease of a finger.
- Kids content: Teach your child math, reading, and writing skills with award-winning Khan Academy Kids, or build new digital spaces with Lego Duplo World.
Built on new Windows platform technology
To enable these types of experiences, we are introducing a new component on top of Windows 11 called Windows Subsystem for Android™, which powers the Amazon Appstore and its catalog. The Subsystem includes the Linux kernel and the Android OS based on the Android Open Source Project (AOSP) version 11. It is distributed through the Microsoft Store as part of the Amazon Appstore install, which will allow users to stay updated over time as we continue to add support for more APIs, capabilities, and scenarios. The Subsystem runs in a Hyper-V Virtual Machine, like the Windows Subsystem for Linux. It understands how to map the runtime and APIs of apps in the AOSP environment to the Windows graphic layer, the memory buffers, the input modes, the physical and virtual devices, and the sensors.
Matchington Mansion (Windows Subsystem for Android), Word (Win32),
Pinterest (PWA), and Gimp (Windows Subsystem for Linux) apps running side by side.
The Windows Subsystem for Android is available across the full spectrum of Windows processor types (AMD, Intel, and Qualcomm). We are partnering with Intel to leverage Intel Bridge Technology to enable Arm-only apps to run on AMD and Intel devices, enabling customers to get the broadest set of apps on the broadest set of devices. In order to provide a performant and secure customer experience for the Windows Insider Program, the Subsystem requires Windows 11 machines to meet minimum system requirements – and we will use this release to validate and adjust these requirements.
We are partnering with Amazon in engaging the developer community, and we will have more details to share about early developer programs to publish Android apps to the Amazon Appstore – for now, please visit the guidance from Amazon. Developers interested in publishing to the Amazon Appstore will get access to tools to debug and test their apps on Windows; and we are releasing a preview of those tools today. For more information, please visit our support documentation.
What to expect next
To get started with using Android apps on Windows, please visit our Windows Insider Program instructions. We invite you to help shape this product by sharing your experiences through Feedback Hub. We will continue to release updates to this experience through Windows Insider Program updates in the coming months.
Today’s announcement signals new opportunity for developers and creators on Windows. To quote a close partner – today is Day 1. We are inspired by what we can create together.
Android is a trademark of Google LLC
Editor’s note 10/20: Post was updated to reflect broader availability on eligible Windows PCs for the Kindle app.
Editor’s note 11/4: Post updated to reflect availability in the Dev Channel.
Источник
Windows Subsystem for Androidв„ўпёЏ
Windows Subsystem for Androidв„ўпёЏ enables your Windows 11 device to run Android applications that are available in the Amazon Appstore.
If you’re a developer interested in targeting Windows desktop devices and optimizing for the Windows operating system, this guide is for you. Learn how to:
- 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.
- Submit apps to the Amazon Appstore: Your app must be available in the Amazon Appstore to run on Windows 11 devices.
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 currently only available through preview via the Beta and Dev Channels of the Windows Insiders Program (Windows 11 Build 22000.xxx series) in the U.S. only.
Your device also must meet specific Windows 11 requirements. Check the «Windows Subsystem for Android» section under «Feature-specific requirements» on the page: Find Windows 11 specs, features, and computer requirements.
Install the Amazon Appstore
The Microsoft Store will automatically install Windows Subsystem for Android (running Android 11) silently in the background when either of the two following user actions are taken:
- Install the Amazon Appstore from the Microsoft Store.
- Install an Android or Amazon app from the Microsoft Store for the first time, which will also install the Amazon Appstore.
The Amazon Appstore will then appear in the Windows 11 Start menu and be available on search, offering a curated catalogue of Android apps.
Selecting Get will begin the installation of the app. The app will also appear in Windows Start, Search and in the Windows Programs list.
Settings app
To access the Windows Subsystem for Android Settings app, go to: Start > All Apps > Windows Subsystem for Androidв„ўпёЏ. The Settings app can be used to adjust the following settings:
Subsystem Screen Reader
If touch input isn’t working, make sure the Subsystem Screen Reader is turned off. For more info, see Microsoft Support: Accessibility on Windows Subsystem for Android.
Subsystem resources
As needed: When this is selected, the subsystem will open when a mobile app is opened. Since the subsystem needs to open first, the mobile app might take a little longer to open. Mobile apps opened after the first one might not be affected.
Continuous: The subsystem is always ready to open apps. Since it’s always open in the background, it will use more of your PC’s memory and processing power.
Enable developer mode
To test and debug your app on a Windows 11 device, you will need set Developer Mode to On.
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:
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:
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 (1280×720) 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, select Enable Developer Settings.
- 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, you have two options:
Recommended Method:
- Use localhost for connecting to debugging. The IP address of the localhost is: 127.0.0.1:58526 . Windows Subsystem for Android must be running in order to connect, the best way to launch Windows Subsystem for Android is by launching an Android app that was installed with the Amazon Appstore.
- To connect to the localhost address of Windows Subsystem for Android, enter: adb connect 127.0.0.1:58526
Alternative Method: Use the Windows Subsystem for Android Settings app to get the IP address.
- Launch the Settings app. (Use Windows Search to select and launch.)
- The IP address will be displayed under the IP address section. If there is no IP address being displayed, launch an Android app that was installed using the Amazon Appstore, then select Refresh on the IP address button in the Settings app.
Now that you have the IP address to connect to the Windows Subsystem for Android VM, connect using adb connect:
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:
Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
The 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
A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
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 |
Build.VERSION.SDK_INT | 30 |
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.
Amazon Appstore
In order to be available on a Windows 11 device, an Android app must be published to the Amazon Appstore. Currently, only a small set of apps selected by Microsoft and Amazon are available.
Developers should refer to the Amazon Device Targeting guidance for information on targeting APKs to specific devices.
Troubleshooting issues with Amazon Appstore
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 Apptore 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 Troubleshoot mobile apps on Windows.
Building Universal APKs
Windows Subsystem for Android utilizes Intel Bridge Technology to emulate ARM applications on x86 based processors. ARM applications will of course run on ARM based processors natively. The emulation layer will induce a performance overhead – for optimal performance, please submit your application for both the x86-64 and ARM64 architectures.
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 Amazon 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 Amazon apps.
Источник