You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/android/wsa/index.md
+70-74Lines changed: 70 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: mattwoj
6
6
ms.reviewer: mousma
7
7
manager: jken
8
8
ms.topic: article
9
-
ms.date: 02/13/2023
9
+
ms.date: 06/06/2023
10
10
---
11
11
12
12
# Windows Subsystem for Android™️
@@ -24,9 +24,9 @@ For more information or support:
24
24
25
25
This guide can help you test and debug your Android app on Windows:
26
26
27
-
-[Set up your development environment](#set-up-your-development-environment), including [prerequisites](#prerequisites), [installing the Amazon Appstore](#install-the-amazon-appstore), and using the [Settings app](#windows-subsystem-for-android-settings-app).
28
-
- Handle input compatibility considerations for Windows devices, such as: [keyboard input](#keyboard-input), [mouse input](#mouse-input), and [window management and resizing](#window-management-and-resizing).
27
+
-[Set up your development environment](#set-up-your-development-environment), including [prerequisites](#prerequisites), [installing the Amazon Appstore](#install-the-amazon-appstore), and using the [Settings](#windows-subsystem-for-android-settings).
29
28
-[Test and debug](#test-and-debug) your app on a Windows 11 device.
29
+
- Handle input compatibility considerations for Windows devices, such as: [keyboard input](#keyboard-input), [mouse input](#mouse-input), and [window management and resizing](#window-management-and-resizing).
30
30
-[Troubleshoot and find answers](#troubleshooting-issues).
31
31
32
32
## Developer GitHub
@@ -49,22 +49,85 @@ Windows Subsystem for Android is available on Windows 11. Your device must meet
49
49
50
50
The Microsoft Store will automatically install Windows Subsystem for Android silently in the background when either of the two following user actions are taken:
51
51
52
-
1. Install the Amazon Appstore from the Microsoft Store. Selecting **Get** will begin the installation of the app.
52
+
1. Install the [Amazon Appstore from the Microsoft Store](https://www.microsoft.com/store/productId/9NJHK44TTKSX). Selecting **Get** will begin the installation of the app.
53
53
2. Install an Android app from the Microsoft Store for the first time, which will also install the Amazon Appstore.
54
54
55
-
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.
55
+
The **Amazon Appstore**app will then appear in the Windows 11 Start menu and be available on search, offering a catalogue of Android apps. The **Windows Subsystem for Android** app, which lets you control mobile app settings and features, will also appear in the Start menu.
56
56
57
57

58
58
59
59
> [!NOTE]
60
60
> The Amazon Appstore on Windows (a requirement for running Android apps on Windows 11) is available in [select regions](https://support.microsoft.com/windows/countries-and-regions-that-support-amazon-appstore-on-windows-d8dd17c7-5994-4187-9527-ddb076f9493e?preview=true).
61
61
62
-
## Windows Subsystem for Android™️ Settings app
62
+
## Windows Subsystem for Android™️ Settings
63
63
64
-
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](https://support.microsoft.com/windows/000f97e8-8c20-490e-9ef4-cd90d903f847).
64
+
To modify Windows Subsystem for Android settings, go to: **Start > All Apps > Windows Subsystem for Android™️**. Learn more about specific settings app features: [Manage settings for mobile apps on Windows](https://support.microsoft.com/windows/000f97e8-8c20-490e-9ef4-cd90d903f847).
65
65
66
66

67
67
68
+
## Test and debug
69
+
70
+
To test and debug your app on a Windows 11 device using the Windows Subsystem for Android the following set up steps are required.
71
+
72
+
### Enable developer mode in Windows Settings
73
+
74
+
You must first enable developer mode. Open the **[Windows Subsystem for Android™️](#windows-subsystem-for-android-settings)** settings. Once open, enable **Developer mode** under **Advanced settings**.
75
+
76
+
### Connect to the Windows Subsystem for Android for debugging
77
+
78
+
To connect to the Windows Subsystem for Android VM for debugging:
79
+
80
+
1. Launch an Android app that was installed using the Amazon Appstore.
81
+
82
+
2. You can connect using adb connect with the following command (you must have [adb installed](https://developer.android.com/studio/command-line/adb)):
83
+
84
+
```powershell
85
+
adb connect 127.0.0.1:58526
86
+
```
87
+
88
+
### Connect to a test device
89
+
90
+
To connect to a test device (with Windows Subsystem for Android installed) on the same network from Windows/Mac:
91
+
92
+
1. 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:
93
+
94
+
```powershell
95
+
ipconfig
96
+
```
97
+
98
+
2. Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
99
+
100
+
```console
101
+
adb connect <TEST DEVICE IP ADDRESS>:58526
102
+
```
103
+
104
+
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.
105
+
106
+
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](https://source.android.com/setup/build/adb).
107
+
108
+
### Debug your app
109
+
110
+
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).
111
+
112
+
To debug an APK using adb:
113
+
114
+
1. Follow the steps to connect to the Windows Subsystem for Android VM above.
115
+
116
+
2. Install the APK using the adb install command: `adb install app-debug.apk`
117
+
118
+
Expected Output:
119
+
120
+
```powershell
121
+
Performing Streamed Install
122
+
Success
123
+
```
124
+
125
+
3. A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
126
+
127
+
### Building Universal APKs
128
+
129
+
Windows Subsystem for Android utilizes Intel Bridge Technology to enable 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.
130
+
68
131
## Input compatibility considerations for Windows devices
69
132
70
133
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.
@@ -138,73 +201,6 @@ Developing Android applications for a multi-window environment has an impact on
138
201
139
202
See the [Android documentation](https://developer.android.com/guide/components/activities/activity-lifecycle) for a description of the lifecycle events. More often than not, you’ll want to use the `onStop` event and not the `onPause` or `onUserLeaveHint` events. In fact, many multi-window Android implementations do not deliver the `onUserLeaveHint` notification, and thus any business critical logic that might be in that event handler will not be called on these platforms, including Windows Subsystem for Android.
140
203
141
-
## Test and debug
142
-
143
-
To test and debug your app on a Windows 11 device using the Windows Subsystem for Android the following set up steps are required.
144
-
145
-
### Enable developer mode in Windows Settings
146
-
147
-
You must first enable developer mode in Windows Settings. There are three ways to enable developer mode:
148
-
149
-
- Open the [Windows Subsystem for Android Settings app](#windows-subsystem-for-android-settings-app). Once open, enable **Developer Mode**.
150
-
- Search for “Developer Settings” in Windows search.
151
-
- Navigate to Settings > Privacy and Security > For developers > Developer mode.
152
-
153
-
### Connect to the Windows Subsystem for Android for debugging
154
-
155
-
To connect to the Windows Subsystem for Android VM for debugging:
156
-
157
-
1. Launch an Android app that was installed using the Amazon Appstore.
158
-
159
-
2. You can connect using adb connect with the following command (you must have [adb installed](https://developer.android.com/studio/command-line/adb)):
160
-
161
-
```powershell
162
-
adb connect 127.0.0.1:58526
163
-
```
164
-
165
-
### Connect to a test device
166
-
167
-
To connect to a test device (with Windows Subsystem for Android installed) on the same network from Windows/Mac:
168
-
169
-
1. 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:
170
-
171
-
```powershell
172
-
ipconfig
173
-
```
174
-
175
-
2. Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
176
-
177
-
```console
178
-
adb connect <TEST DEVICE IP ADDRESS>:58526
179
-
```
180
-
181
-
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.
182
-
183
-
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](https://source.android.com/setup/build/adb).
184
-
185
-
### Debug your app
186
-
187
-
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).
188
-
189
-
To debug an APK using adb:
190
-
191
-
1. Follow the steps to connect to the Windows Subsystem for Android VM above.
192
-
193
-
2. Install the APK using the adb install command: `adb install app-debug.apk`
194
-
195
-
Expected Output:
196
-
197
-
```powershell
198
-
Performing Streamed Install
199
-
Success
200
-
```
201
-
202
-
3. A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
203
-
204
-
### Building Universal APKs
205
-
206
-
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.
207
-
208
204
## VM lifecycle considerations
209
205
210
206
Windows Subsystem for Android utilizes a virtual machine (VM) which provides compatibility with the [AOSP framework](https://source.android.com/) and devices like keyboards, mice, touch, pen, etc.
Copy file name to clipboardExpand all lines: hub/android/wsa/preview-program.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Windows Subsystem for Android™️ is available on Windows 11.
29
29
30
30
- Your device must meet specific requirements. [Install mobile apps and the Amazon Appstore: Device requirements](https://support.microsoft.com/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c).
31
31
- You must have the [Amazon Appstore installed](https://support.microsoft.com/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c) on your Windows 11 device to participate in the preview. An Amazon account is also required to download mobile apps from the Amazon Appstore.
32
-
- Windows Subsystem for Android™️ is currently only available in the US.
32
+
- Windows Subsystem for Android™️ is currently available in [select countries and regions](https://support.microsoft.com/windows/countries-and-regions-that-support-amazon-appstore-on-windows-d8dd17c7-5994-4187-9527-ddb076f9493e).
Copy file name to clipboardExpand all lines: hub/android/wsa/release-notes.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,15 @@ ms.date: 03/15/2023
13
13
14
14
These release notes are based on updates to the Windows Subsystem for Android™️. For basic information on how to install and run Android™️ apps on Windows, see the Support article: [Installing the Amazon Appstore and Android™️ Apps](https://support.microsoft.com/windows/mobile-apps-and-the-windows-subsystem-for-android-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c).
15
15
16
+
## Build 2304.40000.3.0
17
+
18
+
June 1, 2023
19
+
- Package verification for apps on WSA: Android apps are scanned using anti-virus software installed on Windows prior to app installation.
20
+
- Ability for users to configure how much memory to assign to Android
21
+
- Android apps will be launched when a user opens the supported app link from any app (Android AppLink support)
22
+
- Linux kernel updated to 5.15.94
23
+
- Improvements to platform reliability and performance
Copy file name to clipboardExpand all lines: hub/apps/design/globalizing/use-utf8-code-page.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
description: How to use UTF code pages in Windows apps.
3
2
title: Use UTF-8 code pages in Windows apps
4
-
ms.date: 01/11/2022
3
+
description: How to use UTF code pages in Windows apps.
4
+
ms.date: 06/21/2023
5
5
ms.topic: article
6
6
ms.custom: seo-windows-dev
7
7
---
@@ -16,7 +16,10 @@ UTF-8 is the universal code page for internationalization and is able to encode
16
16
17
17
As of Windows Version 1903 (May 2019 Update), you can use the ActiveCodePage property in the appxmanifest for packaged apps, or the fusion manifest for unpackaged apps, to force a process to use UTF-8 as the process code page.
18
18
19
-
You can declare this property and target/run on earlier Windows builds, but you must handle legacy code page detection and conversion as usual. With a minimum target version of Windows Version 1903, the process code page will always be UTF-8 so legacy code page detection and conversion can be avoided.
19
+
> [!NOTE]
20
+
> GDI doesn't currently support setting the ActiveCodePage property per process. Instead, GDI defaults to the active system codepage. To configure your app to render UTF-8 text via GDI, go to Windows **Settings** > **Time \& language** > **Language \& region** > **Administrative language settings** > **Change system locale**, and check **Beta: Use Unicode UTF-8 for worldwide language support**. Then reboot the PC for the change to take effect.
21
+
22
+
You can declare the ActiveCodePage property, and target/run on earlier Windows builds, but you must handle legacy code page detection and conversion as usual. With a minimum target version of Windows Version 1903, the process code page will always be UTF-8, so legacy code page detection and conversion can be avoided.
20
23
21
24
> [!NOTE]
22
25
> An encoded character takes between 1 and 4 bytes. UTF-8 encoding supports longer byte sequences, up to 6 bytes, but the biggest code point of Unicode 6.0 (U+10FFFF) only takes 4 bytes.
@@ -59,22 +62,23 @@ You can declare this property and target/run on earlier Windows builds, but you
59
62
```
60
63
61
64
> [!NOTE]
62
-
> Add a manifest to an existing executable from the command line with `mt.exe -manifest <MANIFEST> -outputresource:<EXE>;#1`
65
+
> Add a manifest to an existing executable from the command line with `mt.exe -manifest <MANIFEST> -outputresource:<EXE>;#1`.
63
66
64
67
## -A vs. -W APIs
65
68
66
69
Win32 APIs often support both -A and -W variants.
67
70
68
71
-A variants recognize the ANSI code page configured on the system and support `char*`, while -W variants operate in UTF-16 and support `WCHAR`.
69
72
70
-
Until recently, Windows has emphasized "Unicode" -W variants over -A APIs. However, recent releases have used the ANSI code page and -A APIs as a means to introduce UTF-8 support to apps. If the ANSI code page is configured for UTF-8, -A APIs typically operate in UTF-8. This model has the benefit of supporting existing code built with -A APIs without any code changes.
73
+
Until recently, Windows has emphasized "Unicode" -W variants over -A APIs. However, recent releases have used the ANSI code page and -A APIs as a means to introduce UTF-8 support to apps. If the ANSI code page is configured for UTF-8, then -A APIs typically operate in UTF-8. This model has the benefit of supporting existing code built with -A APIs without any code changes.
71
74
72
75
## Code page conversion
73
76
74
-
As Windows operates natively in UTF-16 (`WCHAR`), you might need to convert UTF-8 data to UTF-16 (or vice versa) to interoperate with Windows APIs.
77
+
Because Windows operates natively in UTF-16 (`WCHAR`), you might need to convert UTF-8 data to UTF-16 (or vice versa) to interoperate with Windows APIs.
75
78
76
79
[MultiByteToWideChar](/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar) and [WideCharToMultiByte](/windows/desktop/api/stringapiset/nf-stringapiset-widechartomultibyte) let you convert between UTF-8 and UTF-16 (`WCHAR`) (and other code pages). This is particularly useful when a legacy Win32 API might only understand `WCHAR`. These functions allow you to convert UTF-8 input to `WCHAR` to pass into a -W API and then convert any results back if necessary.
77
-
When using these functions with `CodePage` set to `CP_UTF8`, use `dwFlags` of either `0` or `MB_ERR_INVALID_CHARS`, otherwise an `ERROR_INVALID_FLAGS` occurs.
80
+
81
+
Use `dwFlags` of either `0` or `MB_ERR_INVALID_CHARS` when using these functions with `CodePage` set to `CP_UTF8` (otherwise an `ERROR_INVALID_FLAGS` occurs).
78
82
79
83
> [!NOTE]
80
84
> `CP_ACP` equates to `CP_UTF8` only if running on Windows Version 1903 (May 2019 Update) or above and the ActiveCodePage property described above is set to UTF-8. Otherwise, it honors the legacy system code page. We recommend using `CP_UTF8` explicitly.
0 commit comments