We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2019-05-14 02:55:58 +0200 |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and reaplace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed my creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder will show up empty and files will stop duplicating.
2 | retagged |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and reaplace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed my creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder will show up empty and files will stop duplicating.
3 | retagged |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and reaplace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed my creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder will show up empty and files will stop duplicating.
4 | No.4 Revision |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot.Reboot. SD card then should be accessible from sd
folder in Android internal storage.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and reaplace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed my creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder will show up empty and files will stop duplicating.
5 | No.5 Revision |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot. SD card then should be accessible from sd
folder in Android internal storage.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and reaplace replace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed my by creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder in Android apps will show up empty and files will stop duplicating.
6 | No.6 Revision |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, tf if there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot. SD card then should be accessible from sd
folder in Android internal storage.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and replace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed by creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder in Android apps will show up empty and files will stop duplicating.
7 | No.7 Revision |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, if there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is beeing being passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot. SD card then should be accessible from sd
folder in Android internal storage.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and replace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug with which makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed by creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder in Android apps will show up empty and files will stop duplicating.
8 | retagged |
Here is a small guide about mounting SD card in Aliendalvik, making it accessible to Android apps. It is made for Xperia XA2 series (and maybe other devices with 8.1 dalvik, if there are any), and is tested with 3.0.3.8/3.0.3.9 (might not work with older versions due to different layout).
For the reference: phone's internal storage (/home/nemo
) is being mounted to /home/.nemo_bind
with bindfs (its purpose is permission spoofing, so that files created by Sailfish default user are accessible by Android media UID and vice versa). Then, this folder is being passed through to Alendalvik LXC container with read-only access. We are going to do the same mount for the SD card.
devel-su
either with Fingerterm or via SSH./home/sdbind.sh
and /home/sdunbind.sh
and put these lines there.For sdbind.sh:
#!/bin/bash
# map files from sdcard to alien
mkdir -p /home/.sd_bind
bindfs --chmod-ignore --chown-ignore --chgrp-ignore --map=100000/1023:@100000/@1023 /run/media/nemo/<UUID> /home/.sd_bind
if [ "$?" != "0" ]; then
echo "Failed to mount sdcard for alien"
exit 1
fi
You should replace <UUID>
with UUID of your sd card. You can see it just by using ls /run/media/nemo
.
For sdunbind.sh:
#!/bin/bash
umount /home/.sd_bind || :
Run systemctl edit aliendalvik.service
and insert these lines:
[Service]
ExecStartPre=/bin/su -c "/bin/bash /home/sdbind.sh"
ExecStopPost=/bin/su -c "/bin/bash /home/sdunbind.sh"
Edit /var/lib/lxc/aliendalvik/extra_config
and add this line:
lxc.mount.entry = /home/.sd_bind data/media/0/sd none bind,rw,create=dir 0 0
Reboot. SD card then should be accessible from sd
folder in Android internal storage.
Replace "rw" with "ro" if you want to mount your SD card read-only.
Simply open /var/lib/lxc/aliendalvik/config
and replace "ro" with "rw" in this line:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,ro,create=dir 0 0
It should be this:
lxc.mount.entry = /home/.nemo_bind data/media/0/nemo none bind,rw,create=dir 0 0
After that, reboot as usual.
As I mentioned before, /home/nemo
is being mounted in Aliendavik as nemo
folder in internal storage. But the internal storage itself is stored in /home/nemo/android_storage
. This creates bug which makes files show in filesystem two times: first one in the main folder of internal storage itself and the second one in the nemo/android_storage
folder.
This can be easily fixed by creating an empty folder (for example, /home/.empty
) and mounting it in the /var/lib/lxc/aliendalvik/extra_config
:
lxc.mount.entry = /home/.empty data/media/0/nemo/android_storage none bind,ro,create=dir 0 0
Again, reboot. Then the nemo/android_storage
folder in Android apps will show up empty and files will stop duplicating.