跳转至

Waydroid

网络

设置代理

执行waydroid shell,进入ADB shell。

运行以下命令:

settings put global http_proxy "<IP>:<端口>"

无法联网

sudo iptables -P FORWARD ACCEPT

隐藏应用程序网格中的图标

说明

此脚本修改自waydroid/waydroid#46 Comment — GitHub

Waydroid已支持保留应用图标中的NoDisplay条目,因此此脚本将原本的删除行为改为添加NoDisplay=true条目。

~/waydroid-cleanup.sh
#!/bin/bash -Eeu

# waydroid-cleanup.sh
#
# - This Bash script will hide all Waydroid desktop application menu links
# - However, it will preserve the desktop links specified in the ALLOWLIST array

ALLOWLIST=(
    # Default Waydroid start menu link:
    "Waydroid.desktop"
    # Example: allow the Google Authenticator link to remain
    # Un-comment next line to activate:
    #"waydroid.com.google.android.apps.authenticator2.desktop"
)

# Loop through all Waydroid desktop entries
for file in ~/.local/share/applications/*aydroid*.desktop; do
    [ -e "$file" ] || continue # Skip if no matches found

    app_name=$(basename "$file")

    # Skip allowlisted apps
    for allowed in "${ALLOWLIST[@]}"; do
        [[ "$app_name" == "$allowed" ]] && continue 2
    done
    if ! grep -A 1 "^\[Desktop Entry\]$" "${file}" | grep -q "NoDisplay=true"; then
        echo "Disabling ${file}..."
        sed -i '/^\[Desktop Entry\]$/a NoDisplay=true' "${file}"
    fi
done