03-03-2022, 10:03 AM
Went to a lot of trouble to get Waydroid running on the Pinephone Pro. Seems to be running pretty smooth now (as smooth as it will run without hardware acceleration anyways).
Waydroid is technically not supported yet on the Pro. Hardware acceleration is broken, so you have to disable it due to a Mesa / Android conflict. I am on Mobian Bookworm, so this post outlines what I did to get it working on Mobian Bookworm specifically. Your instructions might vary slightly on different distros or builds of Mobian.
Note: You will be editing your U-boot config file here if you are on Mobian. Doing this wrong can make your device not boot correctly. I’m not responsible for bricked devices if you break your config. The Mobian resource below has all of these instructions save for the hardware acceleration disabling. I’d recommend using the listed instructions over mine. The only thing in this post not included in either of these links is the hardware acceleration disabling.
Refer to these instructions:
Mobian specific, I used the desktop install method and not source compiling: https://wiki.mobian-project.org/doku.php?id=waydroid
Use the Ubuntu/Debian desktop specific instructions here: https://docs.waydro.id/usage/install-on-desktops
After you install the Waydroid package via the instructions, do not use
until you have done the Mobain specific instructions on the mobian page. This will cause Waydroid to not work for some reason. I got gbinder errors doing this, but your milage may very.
Mobain Specific Install Instructions
Add this to the bottom of “/etc/gbinder.conf” [NOTE: My file was named anbox.conf and it still worked]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is Mobian specific. I do not believe you need this on other distros. Refer to the Mobian wiki page linked above for this step.
Add this line to U_BOOT_PARAMETERS in “/etc/default/u-boot”:
after vt.global_cursor_default=0
Be very careful here. If you add this config wrong you might break u-boot. Please use the listed Mobain wiki resource here and ensure you add this correctly. I’m not responsible for bricked devices if this goes wrong. I triple checked my config versus the listed code on the Mobian wiki before running the next command.
After you are sure your config is written properly, run
and reboot the phone.
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Almost done now. You need to disable hardware acceleration as of this post to make Waydroid work on the PPP.
Make the following changes in “/var/lib/waydroid/waydroid_base.prop”:
Change the value of ro.hardware.gralloc to "default" as shown:
Change the value of ro.hardware.egl to "swiftshader" as shown:
Save and exit the file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is it, now run:
Now you can run
At this point it will install the LineageOS image and other dependencies. After this is compete, if you did everything correctly, you should be able to run
in the terminal and get Waydroid to work. The Mobain guide says starting via the Phosh app drawer will start the session. You can try it this way, but it takes around 20 seconds to get anything more than a blank screen. Seems spotty and slow to me, so if it doesn’t do it consistently I will add a comment to this post with a bash script to auto start the session on boot.
You can now launch the Waydroid app via the Phosh app drawer, and you are done!
Hope this helped you. Please refer to the documentation above for 99% of the instructions. Only thing I added to them was the hardware acceleration disabling.
Waydroid is technically not supported yet on the Pro. Hardware acceleration is broken, so you have to disable it due to a Mesa / Android conflict. I am on Mobian Bookworm, so this post outlines what I did to get it working on Mobian Bookworm specifically. Your instructions might vary slightly on different distros or builds of Mobian.
Note: You will be editing your U-boot config file here if you are on Mobian. Doing this wrong can make your device not boot correctly. I’m not responsible for bricked devices if you break your config. The Mobian resource below has all of these instructions save for the hardware acceleration disabling. I’d recommend using the listed instructions over mine. The only thing in this post not included in either of these links is the hardware acceleration disabling.
Refer to these instructions:
Mobian specific, I used the desktop install method and not source compiling: https://wiki.mobian-project.org/doku.php?id=waydroid
Use the Ubuntu/Debian desktop specific instructions here: https://docs.waydro.id/usage/install-on-desktops
After you install the Waydroid package via the instructions, do not use
Code:
sudo waydroid init
until you have done the Mobain specific instructions on the mobian page. This will cause Waydroid to not work for some reason. I got gbinder errors doing this, but your milage may very.
Mobain Specific Install Instructions
Add this to the bottom of “/etc/gbinder.conf” [NOTE: My file was named anbox.conf and it still worked]
Code:
[General]
ApiLevel = 29
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is Mobian specific. I do not believe you need this on other distros. Refer to the Mobian wiki page linked above for this step.
Add this line to U_BOOT_PARAMETERS in “/etc/default/u-boot”:
Code:
psi=1
Be very careful here. If you add this config wrong you might break u-boot. Please use the listed Mobain wiki resource here and ensure you add this correctly. I’m not responsible for bricked devices if this goes wrong. I triple checked my config versus the listed code on the Mobian wiki before running the next command.
After you are sure your config is written properly, run
Code:
sudo u-boot-update
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Almost done now. You need to disable hardware acceleration as of this post to make Waydroid work on the PPP.
Make the following changes in “/var/lib/waydroid/waydroid_base.prop”:
Change the value of ro.hardware.gralloc to "default" as shown:
Code:
ro.hardware.gralloc=default
Change the value of ro.hardware.egl to "swiftshader" as shown:
Code:
ro.hardware.egl=swiftshader
Save and exit the file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is it, now run:
Code:
systemctl enable waydroid-container.service
Now you can run
Code:
sudo waydroid init
At this point it will install the LineageOS image and other dependencies. After this is compete, if you did everything correctly, you should be able to run
Code:
waydroid session start
You can now launch the Waydroid app via the Phosh app drawer, and you are done!
Hope this helped you. Please refer to the documentation above for 99% of the instructions. Only thing I added to them was the hardware acceleration disabling.