Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need clarification/further instruction on creating a shared folder #79

Open
rexendevar opened this issue Nov 24, 2024 · 8 comments
Open

Comments

@rexendevar
Copy link

I've created a bind mount per the instructions on the docs page. Now what? My android files don't appear in linux and my linux files don't appear in android. How do I resolve the permissions problem? I've run chmod 777 and it did nothing. I also attempted to add the Linux user and the Waydroid fake user to a group but it failed because the waydroid user (uid 10136 on my machine) doesn't actually exist. Now what?

@rexendevar
Copy link
Author

I've tried manually changing the ownership of the files and even that didn't work. I'm utterly clueless.

@Ashbd9
Copy link

Ashbd9 commented Jan 5, 2025

I assume you ran sudo mount --bind ~/Downloads ~/.local/share/waydroid/data/media/0/Download.

sudo does not preserve your environment by default, and ~ replaces with /root.

Tell sudo to preserve your environment (maybe by running it as sudo -E), or try running sudo mount --bind /home/**<username>**/Downloads /home/**<username>**/.local/share/waydroid/data/media/0/Download.

@rexendevar
Copy link
Author

This is not true - tested by running sudo ls ~/Documents and seeing my own user documents appear. The bind mount works just fine via this command. My problems are entirely permissions-related.

After much troubleshooting and research, I discovered that the theoretical solution involves matching the UID and GID of the Waydroid user to that of the Linux host user using lxc.idmap if I remember correctly. Unfortunately this requires the kernel to have been built using some option or module or whatever which enables this, and my kernel wasn't. This means it is IMPOSSIBLE to create a functional shared folder on my system.

@rexendevar
Copy link
Author

If any maintainers read this, I want it known that this is a frankly unbelievable omission. The documentation page for this problem is only half complete and it is arguably the less useful half.

@Ashbd9
Copy link

Ashbd9 commented Jan 6, 2025

You are correct. ~ is replaced by the shell with the current user home dir before any command runs.

@Ashbd9
Copy link

Ashbd9 commented Jan 6, 2025

I have been able to create a shared folder on my system, although I have noticed that the mount --bind command has to be run while the waydroid session is running.
It also has to be repeated everytime the waydroid session is restarted.

@rexendevar
Copy link
Author

rexendevar commented Jan 6, 2025 via email

@Ashbd9
Copy link

Ashbd9 commented Jan 7, 2025

True. It should be in the docs. I found it myself through trial and error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants