WSL 2 的升级与 USB 调试的配置
什么是 WSL?
即 Windows Subsystem for Linux 的缩写.
Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables natively on Windows 10… (Excerpted from Wikipedia)
也就是说,WSL 是安装在 Windows 系统上的 Linux 虚拟系统。
在 OOP 课程中我们将会初步接触到该系统的安装与使用。
本篇主要收集了 WSL 升级的方法和对于 Android 开发调试中的 USB 调试的实现过程。
此外,一旦完成了 WSL 的升级,我们还可以进行 Docker 部署等等进阶操作…
WSL 2 的安装
WSL 的安装过程我们这里略去.
(1) 开启支持 WSL 2 的可选组件
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
(2) 安装 Kernel update package
Download at: https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package
(3) 输入命令 进行转换
# List all the distributions
wsl --list
# Set version to WSL 2
wsl --set-version <Distro> 2
# Set default version to 2
wsl --set-default-version 2
# List all the distributions with verbose information, namely their versions
wsl --list -v
等了好久,大概两关方舟吧,就转换好了.
[Interlude] 【插曲】
第一次运行时中间有个报错:WSL2 请启用虚拟机平台 Windows 功能并确保在 BIOS 中启用虚拟化.
进行了一次面向CSDN的问题解决,发现问题在于原来安装安卓虚拟机(
方舟挂机专用引擎)的时候对某项设置进行了调整.https://blog.csdn.net/weixin_43271225/article/details/115698940
对应的命令执行过之后,重新
set-version
就可以了.但是,但是,这样做的问题在于,方舟挂机引擎打不开了.
市面上大部分安卓模拟器的通用版本和 Hyper V 还是不兼容的.
于是又进行了一次面向 Google 的问题解决,最终选用 Bluestacks 国际版提供的 HyperV 版本.
开发个 APP 不能老婆不养了啊对不对
昨天修了一个晚上 老婆材料挂机引擎还是没修好 先继续做App开发吧 大不了做完关掉HyperV(划掉进度:最后改用了 Mumu 黄.
Reference
- https://dowww.spencerwoo.com/1-preparations/1-0-intro.html
- https://dowww.spencerwoo.com/1-preparations/1-1-installation.html#wsl-2-%E7%9A%84%E5%AE%89%E8%A3%85
- https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-2---check-requirements-for-running-wsl-2
- https://developer.android.com/studio/command-line/adb