Win11 现在可以支持安装 Andriod 应用了,它可以像 PC 端本地一样去启动、卸载的管理方式。
在性能方面上,据网友们的跑分与实测,基本比目前任何的的安卓模拟器运行都要快。
下来跟着我看看如何安装。
系统准备
开始前需要启用两个东西,Hyper-V (需要 Windows 专业版才能安装) 和 “虚拟机平台”, 如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fdc4c2ee6-b12b-4fd8-b67d-dd344c0c50b8%2FUntitled.png%3Ftable%3Dblock%26id%3Dfaff5569-065b-45af-8b72-0339384584bc%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DcrUXXGcuU49d53DDpZ5kNXwwGWB_L00rEayuo73siE4?table=block&id=faff5569-065b-45af-8b72-0339384584bc&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fa3ce69af-e973-44f6-9183-dda290a5fbf4%2FUntitled.png%3Ftable%3Dblock%26id%3Db3dcf1f5-04d7-4bb8-9b94-a906e5cad0ec%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DkQLlMEbE9jAdC3bsT6O_BMFlgKadYgNM7BYy02AIiJU?table=block&id=b3dcf1f5-04d7-4bb8-9b94-a906e5cad0ec&cache=v2)
安装 WSA
这是 Win11 上的安卓子系统,全称 Windows Subsystem for Android。
安装包:
链接:https://pan.baidu.com/s/12OfaaPsA0yaiZvlURv-W1A
提取码:q1cs
下载好后进行解压,如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fdfec68d5-51d0-4cd8-b324-b3f59108c7d1%2FUntitled.png%3Ftable%3Dblock%26id%3D8e948faf-61ea-45bf-91db-903b26344953%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3Despht6h4UTIdcmz67uKJXHjye2SXUV5h4YFHFJv2wQQ?table=block&id=8e948faf-61ea-45bf-91db-903b26344953&cache=v2)
复制第二个文件的路径,即:最长文件命名。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fa9895e52-8ec1-4535-8343-9e46ad4fd486%2FUntitled.png%3Ftable%3Dblock%26id%3Dc4a97cbf-f046-4aa9-8a5a-5ecea71f5a57%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DmgD_6QM02CWob62tTiRK_rc-rbFH8uUPeXkJpGeYd20?table=block&id=c4a97cbf-f046-4aa9-8a5a-5ecea71f5a57&cache=v2)
下来使用管理员权限打开 Powershell 窗口,运行如下命令:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F542d910e-84ab-495e-8d4e-2e9f049a9ada%2FUntitled.png%3Ftable%3Dblock%26id%3D383b0ee3-6fc9-4d80-a8b1-6141e9ca2ae6%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DSnZoL6AQPAx3KeHWZ8fTwE_CkEc1dYj9rapJJByh_2Y?table=block&id=383b0ee3-6fc9-4d80-a8b1-6141e9ca2ae6&cache=v2)
Add-AppPackage 之后的路径就是刚才复制的,直接在终端粘贴即可。
如果没有问题就会出现如下进度条,等待完成即可。如果你输入上面的命令后提示“部署失败”、“为此程序包依赖于一个找不到的框架”等错误的话,是由于系统缺少一些运行库组件。你需要先手动安装压缩包里的所有依赖包。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F5f3276a5-113c-496e-a33c-52bc917b82b3%2FUntitled.png%3Ftable%3Dblock%26id%3Dbfee9b98-1735-4acd-b01a-34fa2c3a0f77%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DWTjNzeBXI_M_qWwiFP7BYvPjFN2b1IJkiafFB6vZcxc?table=block&id=bfee9b98-1735-4acd-b01a-34fa2c3a0f77&cache=v2)
安装完成之后,会在开始界面出现安装的子系统。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F7dcc4f94-dc41-49f3-9a15-315a2a4aa567%2FUntitled.png%3Ftable%3Dblock%26id%3D262ae2ec-5b63-44be-a192-5bfea9b345fa%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DqhcwNnAxj5okvih1cVwJXfx8dVJao4qQaJB5SpjXt5M?table=block&id=262ae2ec-5b63-44be-a192-5bfea9b345fa&cache=v2)
下来 Andriod 子系统安装好了,下来就要看如何安装应用。
安装 adb
安装 apk 应用需要这个 adb 工具,安装包如下:
链接:https://pan.baidu.com/s/1TLMKezPHeMcc-acWSCpopA
提取码:h2qc
下载后进行解压,如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fb8df27d1-2fea-4358-a567-b8e9e1204c24%2FUntitled.png%3Ftable%3Dblock%26id%3D35674c55-bb2c-4209-b6f5-596c7c7d0c45%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DjIIPvHscK-0IjDakQVByzJTmTYl9asGrNGkR8Nm4RIo?table=block&id=35674c55-bb2c-4209-b6f5-596c7c7d0c45&cache=v2)
解压后,将解压后的目录路径添加到环境变量下。根据自己的本地的路径设置,图中的只是我自己的。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fcd782062-ccaf-4277-831c-d17aa6808acf%2FUntitled.png%3Ftable%3Dblock%26id%3D39f868ea-c993-4842-8e47-38492a3ccc85%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DnYnMupu6Hd8-WHniqsBgG59aRYKgF1qJBiMI7xAUSkA?table=block&id=39f868ea-c993-4842-8e47-38492a3ccc85&cache=v2)
如果环境变量添加后没有问题,就可以在终端运行 adb 命令,如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fd2bc9693-fd2c-470c-94b8-0c49b8b9d05c%2FUntitled.png%3Ftable%3Dblock%26id%3Db871e49a-cd67-4068-90d1-419054955d2c%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DwTHY3LNhiqWlF8Z_ablcbTkGNQR9_WPXNuoRbjXx4OQ?table=block&id=b871e49a-cd67-4068-90d1-419054955d2c&cache=v2)
开始安装 apk
1. 先配置点环境
再次打开安卓子系统,如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F6295c546-8461-4bb9-98a8-2d17f72385c5%2FUntitled.png%3Ftable%3Dblock%26id%3D71ddf416-dbd5-4f8a-8c8e-8951f4def82e%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3D8S2uP9J3VdlSo7WafjowhqLqIZslfj6Auc7DesdyzO8?table=block&id=71ddf416-dbd5-4f8a-8c8e-8951f4def82e&cache=v2)
下来需要打开 “开发人员模式”,再点击 “管理开发人员设置”,会出现如下图中新的窗口,这个在暂时不要关闭。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F2189b3a5-a7ce-4b7e-865d-88654590d5eb%2FUntitled.png%3Ftable%3Dblock%26id%3De64a3080-bb19-43e7-8486-d9848a1c85df%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3Dh8SQJlIBldCJtHrp9XTGqCtc8kCj96lyI3E3R_-kpAc?table=block&id=e64a3080-bb19-43e7-8486-d9848a1c85df&cache=v2)
下来再点击 “开发人员模式” 下的 “IP 地址” 后的刷新,点击后会出现 "127.0.0.1:58526" 地址。
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fc818f252-997e-4747-a2b0-76cb0641420d%2FUntitled.png%3Ftable%3Dblock%26id%3D98c1262d-f200-4c6f-9312-3d5b62b11192%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DhN7ojp31Rk706rjlwd_tffnyd1cqALmA-rOZw0S_KeQ?table=block&id=98c1262d-f200-4c6f-9312-3d5b62b11192&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F8c9c2818-2098-4ac1-bab9-8b7f8af752b4%2FUntitled.png%3Ftable%3Dblock%26id%3D7d5d94aa-413f-4679-a057-118732695c8d%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3D2CtSA6ZlEzH93VTdNZatMF09U6M4FgYekIE5Q7rFOho?table=block&id=7d5d94aa-413f-4679-a057-118732695c8d&cache=v2)
2. 开始安装
继续打开终端,开始使用 adb 工具进行安装 apk。
adb connect 127.0.0.1:58526
成功如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2F245aa678-af3c-4938-b7f6-1f723cd7416c%2FUntitled.png%3Ftable%3Dblock%26id%3D0990d214-06fa-41ab-9437-9698ee2a1fbb%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DF3fFL7audUZ4j8j3-0OaZ3hbqSNyVRFe2iuYAZLN5m8?table=block&id=0990d214-06fa-41ab-9437-9698ee2a1fbb&cache=v2)
紧接着就找一个你要安装的 apk 文件,我这里使用微信,运行如下命令:
adb install "C:\Users\owner\Downloads\weixin8016android2040_arm64.apk"
成功如下图,这里要耐心等一小会:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fbf00f260-ce75-43ef-b842-fbe671cfec29%2FUntitled.png%3Ftable%3Dblock%26id%3D199785b1-37b6-41be-9430-fd055317ceae%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DhKAsyPINaNCDKcHiPGDh_HLH9EXReqhSXTDJ2cCNSqQ?table=block&id=199785b1-37b6-41be-9430-fd055317ceae&cache=v2)
完成后,现在看看安装的微信。打开开始界面,如下图:
![notion image](https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2Fd54b0f25-9426-4b83-9c51-2e6165a030b2%2Fb83917ef-d16b-42d9-8975-d035c482aa39%2FUntitled.png%3Ftable%3Dblock%26id%3D54bcdcfc-1c16-4092-b879-5e0d83845c81%26spaceId%3Dd54b0f25-9426-4b83-9c51-2e6165a030b2%26expirationTimestamp%3D1725775200000%26signature%3DgiqQ8yJzCNqbJwBRkIY-1W793APDYxZzhAjwS74pTcY?table=block&id=54bcdcfc-1c16-4092-b879-5e0d83845c81&cache=v2)
如果你不想每次这么麻烦,那就可以安装一个应用商店,按照上述同样的步骤 connect > install 安装。安装好后,就直接打开应用商店安装其它应用即可。
应用商店前往下载:https://coolapk.com/