guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51737] [PATCH v3 1/8] gnu: Add linux-libre-waydroid.


From: phodina
Subject: [bug#51737] [PATCH v3 1/8] gnu: Add linux-libre-waydroid.
Date: Tue, 13 Dec 2022 17:48:28 +0000

Hi Denis,

> What I wonder is that if Waydroid gets added as-is, it might be useful
> to at least be able to test its functionalities with some FSDG
> compliant image.

Agreed, the question is what to add as the Waydroid runs the Android Userspace 
in a container
 - therefore the HW specific part can be removed, Guix (or foreign kernel) will 
be used.

I haven't done research into the FSDG compliant Android images. I'm familiar 
with Graphene OS
 on my phone, previously LineageOS and before Cyanogenmod.

I'm aware of Replicant but haven't had the chance to look into it unfortunately 
yet.


>
> For instance if users report that audio is broken, it would probably be
> a good idea to be able to run test ourselves. And if there is a bug in
> binder, we could also do security testing ourselves for instance.

Nice idea. There could be file e.g. 'guix/gnu/tests/waydroid.scm' with tests 
which would run
each time the image or the waydroid would be changed.

>
> If I compare with another similar Guix functionality: we can
> produce software for Microsoft Windows with "guix build -t
> x86_64-w64-mingw32 hello" but we at least have Wine for testing.

You can think of waydroid of a "Wine" also. You launch the container and then 
you can
develop using normal tools such as ADB to get shell etc.

Waydroid can show the whole UI screen or just the application.

The only issue is that the apps are more designed for touch than mouse since 
most laptops
and PCs don't have a touchscreen.

>
> As I see it, there might be several approaches to solve this testing
> issue.
>
> (1) Use GNU/Linux and Guix to make that FSDG compliant image.
>
> For instance we could have:
> +-----------------------------------------------+
> | Guix host |
> | |
> | Waydroid (the host/container tools) |
> | ^ |
> | | |
> | v |
> | The communication protocols (like Pulseaudio) |
> | ^ |
> | | |
> +---+-------------------------------------------+
> |
> +---+------------------------------------------------------+
> | | Guix guest |
> | v |
> | Android HAL like hardware/waydroid/audio |
> | ^ |
> | | |
> | v |
> | Libhybris or compatibility software that can run Android |
> | libraries on GNU/Linux. |
> | ^ |
> | | |
> | v |
> | GNU/Linux audio stack or software that can use the |
> | Android audio API somehow. |
> +----------------------------------------------------------+
>
> I'm unsure how much work that would be, and I've also not looked if
> some GNU/Linux distributions are already using libhybris with Android
> 10 HAL. I'm also unsure if we need to use glibc or bionic (guix can
> build Android components with glibc and libhybris probably expects
> bionic).
>
> The advantage of this approach that it might be possible to do
> automatic testing within Guix as Guix would be used everywhere.

This is perphaps the solution in the long run. It tould offer a lot of 
integration
into Guix and nice way to build, test and interact with the image.

> (2) Another approach would be to look more closely at lineage-17.1 and
> make a stripped down version that is hopefuly FSDG compliant. It
> should normally build fine on top of Trisquel.

This is probably the best approach atm. What's missing is the host - Trisquel, 
Robotnix
and the base image (AOSP, LineageOS, Replicant ...).


> The waydroid additions probably need to be reviewed too.

Agreed. As users want to pack other proprietary stuff inside e.g. GApps and 
others.


> (3) Porting the Waydroid modifications[2][3] on top of Replicant 11 (and
> reviewing these modifications too).

Well IMHO I'd rather focus in another direction - PostmarketOS[1].

It's GNU/Linux on Phones and works quite good. The downside are the Apps. As 
most
corporations and developers won't port their apps the Waydroid fills in quite 
nicely
with the ability to launch the Android app.

However, if you are interested somebody already asked about different base 
images [2]

> By the way, does someone knows where to find information about the
> architecture of Waydroid. For instance is there some document that
> explains how it works (like that it uses a HAL that use alsa that
> then somehow talks to the host pulseaudio?, what modifications it did
> for graphics, etc).

Haven't found any architecture wiki or document that would describe in greater 
detail
how it exactly works. Just issue on github which is already closed :-( [3]


[1] https://postmarketos.org/
[2] https://github.com/waydroid/waydroid/discussions/597
[3] https://github.com/waydroid/waydroid/issues/287

----
Petr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]