bazzite/system_files/desktop/shared/usr/libexec/waydroid-container-start
2023-12-28 16:42:00 -08:00

18 lines
764 B
Bash
Executable File

#!/usr/bin/bash
source /etc/default/waydroid-launcher
# Ensure needed props are present
if ! grep -q "persist.waydroid.udev=true" "/var/lib/waydroid/waydroid_base.prop"; then
sudo sh -c 'echo -e "persist.waydroid.udev=true" >> /var/lib/waydroid/waydroid_base.prop'
fi
if ! grep -q "persist.waydroid.uevent=true" "/var/lib/waydroid/waydroid_base.prop"; then
sudo sh -c 'echo -e "persist.waydroid.uevent=true" >> /var/lib/waydroid/waydroid_base.prop'
fi
sudo sed -i "s/ro.sf.lcd_density=.*/ro.sf.lcd_density=${WAYDROID_DENSITY:-215}/g" /var/lib/waydroid/waydroid_base.prop
sudo sed -i "s/ro.hardware.gralloc=.*/ro.hardware.gralloc=${WAYDROID_GRALLOC:-minigbm_gbm_mesa}/g" /var/lib/waydroid/waydroid_base.prop
sudo systemctl start waydroid-container.service