Bug 2319823 - Waydroid can't mount the Android image
Summary: Waydroid can't mount the Android image
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: waydroid
Version: 41
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Alessandro Astone
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-18 18:04 UTC by Andrea Daloia
Modified: 2024-11-03 18:04 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-03 18:04:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/var/lib/waydroid/waydroid.log (106.77 KB, text/plain)
2024-10-18 18:06 UTC, Andrea Daloia
no flags Details
Screenshot of sudo dmesg and systemctl status (329.56 KB, image/png)
2024-10-18 18:08 UTC, Andrea Daloia
no flags Details

Description Andrea Daloia 2024-10-18 18:04:38 UTC
When I start waydroid from the menu nothing happens. If I try to start it with the terminal there is a bug that concerns an error in mounting the image. The strange thing that until a few days ago everything worked perfectly. From dmesg I think that the problem is related to selinux but I am not sure.

Reproducible: Always

Steps to Reproduce:
1.sudo dnf install waydroid
2.follow the steps on the official website of waydroid to initialize it
3.start waydroid from the menu or from the terminal
Actual Results:  
waydroid can't mount the image

Expected Results:  
waydroid starts succesfully

From terminal:
$ waydroid show-full-ui
[19:42:40] Starting waydroid session
[19:42:41] RuntimeError: Command failed: % mount -o context="system_u:object_r:waydroid_rootfs_t:s0",ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs

From sudo dmesg:
[ 1255.701195] loop0: detected capacity change from 0 to 3491328
[ 1255.708006] SELinux: security_context_str_to_sid (system_u:object_r:waydroid_rootfs_t:s0) failed with errno=-22

From sudo systemctl status waydroid-container.service:
[19:42:41] NOTE: The failed command's output is above the ^^^ line in the log file: /var/lib/waydroid/waydroid.log

Comment 1 Andrea Daloia 2024-10-18 18:06:24 UTC
Created attachment 2052705 [details]
/var/lib/waydroid/waydroid.log

Waydroid log

Comment 2 Andrea Daloia 2024-10-18 18:08:19 UTC
Created attachment 2052706 [details]
Screenshot of sudo dmesg and systemctl status

Comment 3 Alessandro Astone 2024-10-18 22:59:16 UTC
I cannot reproduce.

> until a few days ago everything worked perfectly

Presumably a selinux update broke the waydroid module.
Indeed there is a selinux-policy update in testing: https://bodhi.fedoraproject.org/updates/FEDORA-2024-8707c24571

I don't remember off the top of my head how to debug a module...
Does `sudo semodule list` include `waydroid`?
Does `sudo semodule --build` work? Does waydroid work after the command?
You can also try reinstalling the `waydroid-selinux` package.

Comment 4 Andrea Daloia 2024-10-19 08:56:08 UTC
When upgrading to Fedora 41 the test repositories are enabled by default so I tried with the stable version of selinux-policy(41.20), disabling the test repositories, and waydroid starts normall but with a lot of messages from selinux. With 41.21 it doesn't even starts. Sorry maybe I should have specified this detail.

"sudo semodule -l" lists also waydroid

$ sudo semodule -B
Failed to resolve typeattributeset statement at /var/lib/selinux/targeted/tmp/modules/200/snappy/cil:223
Failed to resolve AST
semodule:  Failed!

These are the output of the commands and are the same with both versions, maybe they can help.

Thanks for the support.


Note You need to log in before you can comment on or make changes to this bug.