-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(waydroid): Set density and gralloc from /etc/default/waydroid-la…
…uncher before start
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
system_files/desktop/shared/usr/bin/waydroid-container-start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
#!/usr/bin/env 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 "persist.waydroid.udev=true\n" >> /var/lib/waydroid/waydroid_base.prop' | ||
fi | ||
|
||
if ! grep -q "persist.waydroid.uevent=true" "/var/lib/waydroid/waydroid_base.prop"; then | ||
sudo sh -c 'persist.waydroid.uevent=true\n" >> /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 |
2 changes: 2 additions & 0 deletions
2
system_files/desktop/shared/usr/etc/default/waydroid-launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
WAYDROID_WIDTH=1280 | ||
WAYDROID_HEIGHT=800 | ||
WAYDROID_DENSITY=215 | ||
WAYDROID_GRALLOC=minigbm_gbm_mesa |