Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 安装 waydroid 并设置网络代理 #6

Open
feix opened this issue Feb 7, 2024 · 1 comment
Open

Linux 安装 waydroid 并设置网络代理 #6

feix opened this issue Feb 7, 2024 · 1 comment
Labels

Comments

@feix
Copy link
Owner

feix commented Feb 7, 2024

1. 安装

Waydroid要求内核中包含binder模块,Ubuntu 版本已经满足。按照官网安装说明, https://github.com/waydroid/waydroid

sudo apt install curl ca-certificates -y
curl https://repo.waydro.id | sudo bash
sudo apt install waydroid -y

2. 启动,常用操作

sudo waydroid init
sudo waydroid container start
sudo systemctl restart waydroid-container.service
waydroid prop set persist.waydroid.multi_windows true
# 启动 
waydroid session start
# 启动 UI
waydroid show-full-ui
# 查看状态
waydroid status
# 进入adb shell
waydroid shell

3. 注册为 Google 设备

waydroid_script

sudo waydroid init -s GAPPS -f
git clone https://github.com/casualsnek/waydroid_script
cd waydroid_script
sudo python3 -m pip install -r requirements.txt
sudo python3 main.py certified

复制获取的 ID,进入设备注册页面,登录谷歌账户并输入前面生成的ID,设置完需要重启 sudo systemctl restart waydroid-container.service

安装 libhoudini,支持 arm 架构 apk

# cd waydroid_script
sudo python3 main.py install libhoudini
waydroid app install /path/to/apk

4. 网络代理配置

参考 waydroid/waydroid/issues/870

adb shell settings put global http_proxy "ip:port"  
cert_hash=$(openssl x509 -subject_hash_old -in ssl-proxying-certificate.pem | head -1)
sudo mkdir -p /var/lib/waydroid/overlay/system/etc/security/cacerts/
sudo cp ssl-proxying-certificate.pem /var/lib/waydroid/overlay/system/etc/security/cacerts/${cert_hash}.0

设置完成后需要重启 sudo systemctl restart waydroid-container.service

@feix feix added the note label Feb 7, 2024
@feix
Copy link
Owner Author

feix commented Feb 7, 2024

参考:
[1] https://wiki.archlinux.org/title/Waydroid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant