Getting Waydroid to work on the Pinephone Pro
#1
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
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
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
Code:
sudo u-boot-update
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:

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
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.
  Reply
#2
I could not execute waydroid in PPP
I think I removed it but
7 icons on the desktop
Calculator
Calendar
Clock
Contacts
Files
Gallery
Settings
 And I do not know how to remove
Then on my Manjaro mobile plasma
Any idea?
  Reply
#3
(03-06-2022, 08:27 AM)Emilio Wrote: I could not execute waydroid in PPP
I think I removed it but
7 icons on the desktop
Calculator
Calendar
Clock
Contacts
Files
Gallery
Settings
 And I do not know how to remove
Then on my Manjaro mobile plasma
Any idea?
If you want to try reinstalling Waydroid, try checking out the section on here called "Hide Desktop Entries" from the Arch wiki. Looks like you can set it to hide them. 
https://wiki.archlinux.org/title/desktop...op_entries

If you want to remove Waydroid for good, There are commands here to wipe all of the configs and whatnot which should wipe them (I am not 100% on that though). 
https://docs.waydro.id/usage/install-on-desktops

Sorry if that doesn't help, I did not have to remove any icons or anything during my install.
  Reply
#4
Hello

I try to install waydroid on mobian (on SD) with tow-boot on SPI.

After insert psi=1 in /etc/default/u-boot, i launch sudo u-boot-update, then i reboot PPP.
But psi=1 doesn't appear with the command cat /proc/cmdline

Any suggestions ?
  Reply
#5
(04-02-2022, 10:24 AM)cbz Wrote: Hello

I try to install waydroid on mobian (on SD) with tow-boot on SPI.

After insert psi=1 in /etc/default/u-boot, i launch sudo u-boot-update, then i reboot PPP.
But psi=1 doesn't appear with the command cat /proc/cmdline

Any suggestions ?

Hmm, I did not have this issue. It showed up first time for me after the reboot. Make sure the file is saved and cat the config file before you run sudo u-boot-update to make sure it is in the u-boot config. I suppose it is possible the phone isn't saving your changes for whatever reason. If you didn't use sudo to write the file that could be the culprit. Just be careful updating the config too many times, let me know how it goes.
  Reply
#6
I previously managed to get Waydroid to run on the PPP by disabling 'Hardware acceleration' in Waydroid when setting it up, although please forgive me I can't remember the required command right now. If no one can find it, I'll see if I can find that command tomorrow. Smile
  Reply
#7
(04-14-2022, 05:44 PM)PineFLOWn Wrote: I previously managed to get Waydroid to run on the PPP by disabling 'Hardware acceleration' in Waydroid when setting it up, although please forgive me I can't remember the required command right now. If no one can find it, I'll see if I can find that command tomorrow. Smile

On Arch:
Code:
( sudo echo "ro.hardware.gralloc=default" ; sudo echo "ro.hardware.egl=swiftshader" ) >>/var/lib/waydroid/waydroid_base.prop
  Reply
#8
(04-14-2022, 07:47 PM)brb78 Wrote:
(04-14-2022, 05:44 PM)PineFLOWn Wrote: I previously managed to get Waydroid to run on the PPP by disabling 'Hardware acceleration' in Waydroid when setting it up, although please forgive me I can't remember the required command right now. If no one can find it, I'll see if I can find that command tomorrow. Smile

On Arch:
Code:
( sudo echo "ro.hardware.gralloc=default" ; sudo echo "ro.hardware.egl=swiftshader" ) >>/var/lib/waydroid/waydroid_base.prop

That's how I got it working on Mobian as well Smile
  Reply
#9
This is perhaps a bit late, but if you _do_ want hardware acceleration, consider trying these instructions: https://forum.pine64.org/showthread.php?tid=17369
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  bookworm vs trixie discussion for mobian in pinephone pro. zetabeta 16 3,289 04-28-2024, 01:52 AM
Last Post: diederik
  Tow-Boot, a new U-Boot option for Pinephone Pro and other devices Ulfnic 60 49,235 02-13-2024, 02:54 PM
Last Post: fxc
  A Btrfs Image for Arch SXMO on the Pinephone Pro mburns 2 1,065 11-23-2023, 08:44 AM
Last Post: mburns
  Rhino Linux does not seem ready for the PinePhone Pro. mburns 2 1,173 11-23-2023, 08:39 AM
Last Post: mburns
  Megapixels on Mobian Bookworm on PinePhone Pro - Not Launching X0X0X0X0X0 1 863 11-07-2023, 09:44 AM
Last Post: mburns
  Seeking Contributors: Apache NuttX Real-Time Operating System for PinePhone Pro lupyuen 2 1,952 09-14-2023, 07:23 PM
Last Post: lupyuen
  What to do if your PinePhone Pro does not boot fxc 19 21,319 09-10-2023, 03:19 AM
Last Post: fxc
  Waydroid No Network Hell pinemegood 4 2,814 07-15-2023, 08:16 PM
Last Post: SpoofyKid
  My Waydroid Manager call for testers / assistance MadameMalady 0 758 07-15-2023, 02:16 PM
Last Post: MadameMalady
  Pinephone(pro) modem bug / shortcomings MadameMalady 2 2,651 06-19-2023, 03:40 PM
Last Post: MadameMalady

Forum Jump:


Users browsing this thread: 1 Guest(s)