Created
August 30, 2022 03:35
-
-
Save johnny77221/461d7f2cd6bbddbbad6d923dd6a5d468 to your computer and use it in GitHub Desktop.
安裝CuttleFish在Ubuntu 20.04LTS上
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
安裝環境: Ubuntu 20.04 LTS | |
確認CPU支援虛擬技術 (回傳非零結果) | |
grep -c -w "vmx\|svm" /proc/cpuinfo | |
sudo apt install -y git devscripts config-package-dev debhelper-compat golang | |
git clone https://github.com/google/android-cuttlefish | |
cd android-cuttlefish | |
debuild -i -us -uc -b -d | |
# 這邊注意不需要安裝全部編譯出的deb | |
dpkg -i ../cuttlefish-base_*_*64.deb | |
dpkg -i ../cuttlefish-user_*_*64.deb | |
dpkg -i ../cuttlefish-common_*_*64.deb | |
sudo usermod -aG kvm,cvdnetwork,render $USER | |
sudo reboot | |
開啟網頁 http://ci.android.com/ | |
找aosp-master這個branch(預設就是)的 | |
橫排選處理器架構aosp_cf_x86_64_phone的userdebug | |
直排選最新(最上面)的版本,進入artifacts目錄 | |
抓其中的兩個檔案 | |
aosp_cf_x86_64_phone-img-xxxxxx.zip | |
cvd-host_package.tar.gz | |
然後開一個資料夾放置這兩個檔案 | |
mkdir ~/cf | |
cd ~/cf | |
tar xvf ~/Downloads/cvd-host_package.tar.gz | |
unzip ~/Downloads/aosp_cf_x86_64_phone-img-xxxxxx.zip | |
此時維持在~/cf目錄下執行這個指令: HOME=$PWD ./bin/launch_cvd --start_webrtc | |
打指令 adb devices可取得裝置清單與port,顯示為 xx.xx.xx.xx:6520 | |
此時遠端可由 adb connect (ip):6520 連接到此裝置 | |
也可在chrome瀏覽器輸入網址 https://(ip):8443/ 來連接到網頁顯示裝置的GUI (目前已知safari無法正常開啟) | |
打開網頁時,因為對象是自簽憑證,會出現ERR_CERT_INVALID錯誤,直接用鍵盤打thisisunsafe來進入網頁 | |
安裝步驟到此結束 | |
參考文件: | |
https://android.googlesource.com/device/google/cuttlefish/ | |
https://coderfan.net/vmware-ubuntu20-cuttlefish-run-android12.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment