-
-
Save cniw/7a0220ce8b75368f7f57aa422d3fea97 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# script name: install_waydroid.sh | |
# description: Install Waydroid on unsupported Debian based distro caused by incompatible python3-gbinder package | |
# related to : https://github.com/waydroid/waydroid/issues/214#issuecomment-1120926304 | |
# author : Wachid Adi Nugroho <[email protected]> | |
# date : 2022-07-07 | |
export distro=$(grep -oP '(?<=^NAME=).*' /etc/os-release) | |
if [[ -f /usr/bin/dpkg ]]; | |
then | |
export arch=$(dpkg --print-architecture) | |
if ! ([[ $arch == "amd64" ]] || [[ $arch == "arm64" ]]); | |
then | |
echo "You're using $arch machine, currently waydroid repo only provides deb packages for amd64 and arm64 machine." | |
echo "If you're really want to install waydroid on this $arch machine you should build it with all the dependencies." | |
echo "Go check this link https://gist.github.com/cniw/98e204d7dbc73a3fa1bf61629b2a2fc1 or just run this command" | |
echo -e "\n \`curl -s https://gist.githubusercontent.com/cniw/98e204d7dbc73a3fa1bf61629b2a2fc1/raw | bash\`\n" | |
exit 0 | |
fi | |
[[ ${distro} =~ Debian ]] && \ | |
export codename=bullseye || \ | |
export codename=focal | |
[[ ! -f /usr/bin/curl ]] && sudo apt install -y curl | |
sudo curl https://repo.waydro.id/waydroid.gpg -o /usr/share/keyrings/waydroid.gpg | |
echo "deb [signed-by=${_}] https://repo.waydro.id/ ${codename} main" | \ | |
sudo tee /etc/apt/sources.list.d/waydroid.list | |
sudo apt update | |
sudo apt install -y \ | |
build-essential cdbs devscripts equivs fakeroot \ | |
git git-buildpackage git-lfs \ | |
libgbinder-dev | |
mkdir ~/build-packages | |
cd ${_} | |
git clone https://github.com/waydroid/gbinder-python.git | |
cd gbinder-python | |
curl https://raw.githubusercontent.com/MrCyjaneK/waydroid-build/main/build_changelog -o build_changelog | |
bash ${_} $(git tag -l --sort=authordate | sed 's/[a-z/]//g' | uniq | tail -n1) | |
sudo mk-build-deps -ir -t "apt -o Debug::pkgProblemResolver=yes -y --no-install-recommends" | |
sudo debuild -b -uc -us | |
sudo apt install -f -y ../*.deb | |
sudo apt remove -y gbinder-python-build-deps libgbinder-dev \ | |
git-buildpackage git-lfs fakeroot equivs devscripts cdbs | |
echo "You can remove git and build-essential packages too, by run:" | |
echo -e "\t\`sudo apt remove git build-essential\`" | |
sudo apt autoremove | |
sudo apt install -y waydroid | |
else | |
echo "Your distro ${distro} is not use dpkg as package manager" | |
fi |
I tried running this on a fresh Mobian bookworm install on a 128G SD card on a Pinephone Pro. It filled the whole card and then the system crashed due to no disk space.
check disk usage with
df
df -h | grep -E "Filesystem|^/dev"or for more details use apps like
ncdu
orgdu
sudo apt install -y gdu sudo gdu -d # to select the partition, use keyboard arrow key to navigate and `q` key to quit sudo gdu / # to scan allI guess it needs more than 128 G to run this script?
no, i think it just need couple KB for gbinder-python source and still less than 250MB for all build deps package and build disk space requirement
Or am I doing something wrong?
i don't know
@whipplej5 btw does the script running or stuck on which step?
My apologies. I failed to expand the partitions after I flashed the SD card so was not utilizing the whole card. I should have looked into this further before requesting help. Thanks so much for your time.
Hey thanks for the script. Unfortunately it didn't work on linux mint 21.1 (ubuntu 22.04) so i tried to fix some errors which now seems to work for me at least.
Thank you!
check disk usage with
df
or for more details use apps like
ncdu
orgdu
no, i think it just need couple KB for gbinder-python source and still less than 250MB for all build deps package and build disk space requirement
i don't know
@whipplej5 btw does the script running or stuck on which step?