Mobile:MoreGuides:Waydroid
openSUSE Mobile - Guides - Waydroid
Installing Waydroid in Mobile
Here we are going to show how to install Waydroid in Mobile Devices.
Fist of all check your kernel supports it:
phablet@openSUSE:~> zcat /proc/config.gz | grep -E "ANDROID|BINDER|KPROBE"
CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
Check if we have PSI enabled in our system:
phablet@openSUSE:~> ls -la /proc/pressure/
total 0
dr-xr-xr-x 6 root root 0 sep 16 10:32 .
dr-xr-xr-x 329 root root 0 ene 1 1970 ..
-rw-rw-rw- 1 root root 0 sep 16 10:32 cpu
-rw-rw-rw- 1 root root 0 sep 16 10:32 io
-rw-rw-rw- 1 root root 0 ene 18 15:35 irq
-rw-rw-rw- 1 root root 0 sep 16 10:32 memory
Installing Waydroid
sudo zypper addrepo https://download.opensuse.org/repositories/home:/alefnode:/waydroid/standard/home:alefnode:waydroid.repo
sudo zypper ref
sudo zypper install waydroid-1.6.1+git20251229-11.1.noarch
sudo systemctl enable --now waydroid-container
Configure with GAPPS
You are goind to need an Android image, so if you want one with GAPPS:
sudo zypper in waydroid-image-gapps-system waydroid-image-gapps-vendor
sudo waydroid init -s GAPPS -f #This command probably fails (jump to lxc tweak)
We have to modify a config for LXC version for openSUSE. Waydroid tries to add it for Android container nesting, but older LXC versions (or LXC builds from openSUSE repos) will reject it, causing the container to fail to start.
sudo sed -i 's/^lxc.seccomp.allow_nesting = 1$/# &/' /var/lib/waydroid/lxc/waydroid/config
Start session
waydroid session start
Now we are going to register this image in Google to get it certified
# Enter the Waydroid shell and run the command inside shell below (make sure you'd run the container firsts).
sudo waydroid shell
ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"
If you had follow step in above, it will print output which is Google Services Framework Android ID you need to submit it into Google Services Framework Android submission for uncertificated devices (click this to submit it and make sure you'd login to Google it firsts). After submit, wait for 2 hours or max 24 hours to get registered and stop the Waydroid session during registration times. After 2 hours, try again to start Waydroid session and login using your Google account and if success, congrats! You can use Google Play now on your Waydroid session.
Configure without GAPPS
Otherwise (without GAPPS):
sudo zypper in waydroid-image-system waydroid-image-vendor
sudo waydroid init #This command probably fails (jump to lxc tweak)
We have to modify a config for LXC version for openSUSE. Waydroid tries to add it for Android container nesting, but older LXC versions (or LXC builds from openSUSE repos) will reject it, causing the container to fail to start.
sudo sed -i 's/^lxc.seccomp.allow_nesting = 1$/# &/' /var/lib/waydroid/lxc/waydroid/config
Start session
waydroid session start
Extra Waydroid config
We can change some prop on waydroid (More info )
For example for Oneplus 6 we recommend:
waydroid prop set persist.waydroid.width 720
waydroid prop set persist.waydroid.height 1480
And also we can change directly in a file, for example:
echo "ro.sf.lcd_density=800" | sudo tee -a /var/lib/waydroid/waydroid_base.prop
After this changes you need to stop and start session again to get it working.
waydroid session stop
waydroid session start # or use Waydroid dekstop launcher
|
|