Created
October 6, 2020 06:58
-
-
Save eric100lin/824aa53c683728f0e1d0a671d7af280f to your computer and use it in GitHub Desktop.
2019/12/15 old notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install the Windows Subsystem for Linux | |
WSL is available only in 64-bit versions of Windows 10 from version 1607. | |
It is also available in Windows Server 2019. | |
Before installing any Linux distros for WSL, | |
you must ensure that the "Windows Subsystem for Linux" optional feature is enabled: | |
Open PowerShell as Administrator and run: | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
Restart your computer when prompted. | |
https://docs.microsoft.com/zh-tw/windows/wsl/install-win10 | |
https://docs.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature?view=win10-ps | |
https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux#WSL_2 | |
Installing Ubuntu | |
Add-AppxPackage D:\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.817.0_x64__79rhkp1fndgsc.Appx | |
wsl --import <DistributionName> <InstallLocation> <FileName> | |
wsl --import Ubuntu %LOCALAPPDATA%\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState <FileName> | |
https://docs.microsoft.com/zh-tw/windows/wsl/install-manual | |
https://docs.microsoft.com/zh-tw/windows/wsl/initialize-distro | |
https://docs.microsoft.com/zh-tw/windows/wsl/faq#how-can-i-back-up-my-wsl-distros | |
https://wiki.ubuntu.com/WSL | |
https://winaero.com/blog/export-import-wsl-linux-distro-windows-10/ | |
底下將更新的 Server 都改成國家高速網路中心 | |
sudo sed -i 's/archive.ubuntu.com/free.nchc.org.tw/g' /etc/apt/sources.list | |
sudo sed -i 's/security.ubuntu.com/free.nchc.org.tw/g' /etc/apt/sources.list | |
清除所有的 | |
sudo apt-get clean all | |
更新套件庫 | |
sudo apt-get update | |
sudo apt-get upgrade | |
Establishing a VTS test environment | |
Install Python development kit: | |
Install Protocol Buffer tools (for Python) | |
Install Python virtual environment-related tools: | |
sudo apt-get install python-dev \ | |
python-protobuf protobuf-compiler \ | |
python-virtualenv python-pip \ | |
default-jdk \ | |
unzip | |
https://source.android.com/compatibility/vts/systems | |
https://packages.ubuntu.com/bionic/android-sdk-platform-tools | |
https://packages.ubuntu.com/zh-tw/bionic/default-jdk (openjdk-11-jdk) | |
https://developer.android.com/studio#downloads | |
http://defrances.co/post/adbwsl/ | |
C:\Users\eric8\AppData\Local\Android\Sdk\platform-tools | |
mklink adb adb.exe | |
~/.bashrc | |
# for Windows adb.exe | |
export PATH=/mnt/c/Users/eric8/AppData/Local/Android/Sdk/platform-tools:$PATH | |
# for Android VTS Python packages | |
export VTS_PYPI_PATH=~/vts-pypi | |
(Optionally) Download Python packages from PyPI to a local directory: | |
# To permanently set $VTS_PYPI_PATH, please add the following line to ~/.bashrc | |
$ export VTS_PYPI_PATH=<your directory> | |
$ curl https://android.googlesource.com/platform/test/vts/+/master/script/pip_requirements.txt?format=TEXT | base64 -d > pip_requirements.txt | |
$ pip download -d $VTS_PYPI_PATH -r pip_requirements.txt --no-binary protobuf,grpcio,matplotlib,numpy,Pillow,scipy | |
https://codelabs.developers.google.com/codelabs/android-vts/#1 | |
https://blog.csdn.net/tintinetmilou/article/details/80091630 | |
echo $SHELL | |
cd ~/android-vts/tools | |
./vts-tradefed | |
run vts-codelab -m VtsCodelabHelloWorldTest | |
sudo mkdir /mnt/d | |
sudo mount -t drvfs D: /mnt/d | |
https://www.howtogeek.com/331053/how-to-mount-removable-drives-and-network-locations-in-the-windows-subsystem-for-linux/ | |
https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/ | |
C:\Users\eric8\.android\avd\Pixel_API_30.zip | |
C:\Users\eric8\Downloads\aosp-sdk-release_submitted-5949299\sdk\android-sdk_5949299_windows.zip | |
C:\Users\eric8\AppData\Local\Android\Sdk\system-images\android-R\x86_64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment