Termux

  1. 安装ubuntu和远程桌面

为Ubuntu in termux添加debian源

  1. 1
    vim /etc/apt/sources.list.d/debian-stable.list
    1
    2
    3
    4
    5
    6
    deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main 
    deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main
    deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main
    deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main
    deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main
    deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main
    1
    2
    apt update #不要upgrade
    apt install -y debian-archive-keyring

    安装chromium

    1
    apt install -y chromium chromium-driver 

    安装python和selenium

    1
    2
    3
    4
    apt install -y python3 python3-pip
    pip3 install selenium #如果pip频繁报错,请apt remove python-pip再手动安装
    #echo "$(curl https://bootstrap.pypa.io/pip/get-pip.py)" >./get-pip.py
    #python3 ./get-pip.py #安装pip

    进行调试

    1
    2
    vncserver :1
    chromium --no-sandbox #在VNC桌面的终端内输入
    chromedriver文件路径在/usr/bin/chromedriver