<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SystemD service to auto-mount the Waydroid folder on UT side]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/projectmoon" aria-label="Profile: projectmoon">@<bdi>projectmoon</bdi></a> said in <a href="/post/90957">Smooth Edges (name pending) - Let's Fix the Bugs That Drive You Mad</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sentinel" aria-label="Profile: Sentinel">@<bdi>Sentinel</bdi></a> said:</p>
<blockquote>
<p dir="auto">Lack of easy access to Waydroid files (and Waydroid not having easy access to any UT files) is kind of a big issue. I've created a SystemD service to auto-mount the Waydroid folder on UT side, but most people won't be able to do that.</p>
</blockquote>
<p dir="auto">Could you share that system unit in another topic maybe? <img src="https://forums.ubports.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=60240fe800f" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
</blockquote>
<p dir="auto">I'm embarrassed to make a thread for such a small thing, especially as I'm sure other people must have done better jobs than my quick hack.  But since you asked, here are the contents of the files I created to do this:</p>
<pre><code>phablet@ubuntu-phablet:~$ ll /etc/systemd/system/autostart.service /home/phablet/.autostart /home/phablet/Scripts/Mount_WaydroidHome.sh
-rw-r--r-- 1 root    root    156 Oct 22 22:24 /etc/systemd/system/autostart.service
-rw-r--r-- 1 phablet phablet  57 Oct 22 22:29 /home/phablet/.autostart
-rwxrw-r-- 1 phablet phablet 243 Dec 13 18:53 /home/phablet/Scripts/Mount_WaydroidHome.sh*
phablet@ubuntu-phablet:~$ cat /etc/systemd/system/autostart.service
[Unit]
Description=Autostart user-defined script on boot

[Service]
ExecStart=/usr/bin/bash /home/phablet/.autostart

[Install]
WantedBy=multi-user.target

phablet@ubuntu-phablet:~$ cat /home/phablet/.autostart
#!/bin/bash
/home/phablet/Scripts/Mount_WaydroidHome.sh

phablet@ubuntu-phablet:~$ cat /home/phablet/Scripts/Mount_WaydroidHome.sh
#!/bin/bash
#mkdir ~/WaydroidHome
#chmod 755 ~/WaydroidHome
#sudo chmod 777 ~/.local/share/waydroid/data/media/0
/usr/bin/mount --bind /home/phablet/.local/share/waydroid/data/media/0 /home/phablet/WaydroidHome
while /usr/bin/true; do
        /usr/bin/sleep 5
        if [[ ! "$(/usr/bin/stat -c "%a" /home/phablet/WaydroidHome)" == *5 ]]; then
                /usr/bin/chmod o+rx /home/phablet/WaydroidHome
        fi
done
</code></pre>
<p dir="auto">EDIT #2: The above "Mount_WaydroidHome.sh" script has been updated to work-around a problem.</p>
<p dir="auto">I'm intentionally not providing precise instructions on how to install these files, because if you don't know enough to do that, then you probably shouldn't be messing about with this stuff in the first place.</p>
<p dir="auto">But as the #comments of the last script hint, you need to run these commands once before it will work:</p>
<pre><code>mkdir ~/WaydroidHome
chmod 755 ~/WaydroidHome
sudo chmod 777 ~/.local/share/waydroid/data/media/0
</code></pre>
<p dir="auto">WARNING: The above scripts work for me, but I haven't tested it thoroughly, or even for that long, and it may contain security flaws.  It is (as I said before) just a 'quick hack'.  In the spirit of open source, I hope other people will provide improvements to it.</p>
<p dir="auto">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
]]></description><link>https://forums.ubports.com/topic/11724/systemd-service-to-auto-mount-the-waydroid-folder-on-ut-side</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 03:12:06 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/11724.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Dec 2025 18:56:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SystemD service to auto-mount the Waydroid folder on UT side on Sun, 14 Dec 2025 19:41:01 GMT]]></title><description><![CDATA[<p dir="auto">I've updated the "Mount_WaydroidHome.sh" script, so the WaydroidHome folder is writable from Ubuntu Touch (without using sudo):</p>
<pre><code>#!/bin/bash
## Set-up commands
#mkdir ~/WaydroidHome
#chmod 755 ~/WaydroidHome
#sudo chmod 777 ~/.local/share/waydroid/data/media/0

## Bind mount Waydroid's home folder if it's not already mounted, and then ensure it (and all sub-folders) stay read/write-able by the Ubuntu Touch user
set -e
/usr/bin/findmnt -rno SOURCE,TARGET /home/phablet/WaydroidHome &gt;/dev/null || /usr/bin/mount --bind /home/phablet/.local/share/waydroid/data/media/0 /home/phablet/WaydroidHome
while /usr/bin/true; do
        /usr/bin/sleep 5
        if [[ ! "$(/usr/bin/stat -c "%a" /home/phablet/WaydroidHome)" == *7 ]]; then
                /usr/bin/find /home/phablet/WaydroidHome -type d ! -perm -o+rwx -print0 | /usr/bin/xargs -0 -I {} /usr/bin/chmod o+rwx '{}'
        fi
done
</code></pre>
<p dir="auto">WARNING: The above scripts work for me, but I haven't tested it thoroughly, or even for that long, and it may contain security flaws. It is (as I said before) just a 'quick hack'. In the spirit of open source, I hope other people will provide improvements to it.</p>
]]></description><link>https://forums.ubports.com/post/91427</link><guid isPermaLink="true">https://forums.ubports.com/post/91427</guid><dc:creator><![CDATA[Sentinel]]></dc:creator><pubDate>Sun, 14 Dec 2025 19:41:01 GMT</pubDate></item></channel></rss>