We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

Android path names for Sailfish X

asked 2019-06-22 19:01:15 +0200

UweLabs gravatar image

Hi, on my XA2 in android apps, e.g. Open Camera, I would like to direct the menory to the sdcard. In Open Camera is the standard save path is /storage/emulated/0/DCIM/OpenCamera. I found out that this is actually /home/nemo/android_storage/DCIM/OpenCamera, or /storage/emulated/0/ is /home/nemo. But what is the path to the sdcard in adroid terms (for Open Camera)? With Putty or WinSCP connected to the XA2 e.g. the path is /run/media/nemo/<sdcard-id>/Pictures/OpenCamera. But that is not an allowed entry in OpenCamera. Does anybody know a solution? Best regards, Uwe.</sdcard-id>

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-06-22 19:35:34 +0200

daneos gravatar image

updated 2019-06-22 19:50:50 +0200

AFAIK, there is no easy way to share your SD card with Android apps. This feature is probably not ready yet for Android 8.1 emulation found in XA2 devices.

There are however some options you could try to work around that.

Method 1:

Create a symlink pointing to your SD card somewhere in /home/nemo, e.g.:
ln -s /media/sdcard/<uuid> /home/nemo/sdcard
The /home/nemo is visible to Android as /storage/emulated/0/nemo (at least that's the case for SFOS 3.0.3.9). While this approach is probably the simplest one, I found that not all Android apps will be happy about it.

Method 2:

Use a bind mount, like this:
mkdir /home/nemo/sdcard
mount --bind /media/sdcard/<uuid> /home/nemo/sdcard
The mount command requires root privileges, and you will most probably run into some issues with file/dir permissions, that Android apps are also not particularly happy about. Also, you need to bind mount again after reboot.

Method 3 (the most reliable, I think):

Use fuse's bindfs:
mkdir /home/nemo/sdcard
bindfs /media/sdcard/<uuid> /home/nemo/sdcard
This doesn't require being root, but still needs to be redone after reboot.
I found this solution to be the most transparent to Android apps, and the only one, that allowed me to send photos stored on SD card via FB Messenger :)

As a note, I haven't found a way to bind the SD card automatically upon reboot, I was only able to achieve a bootloop while trying :) The search continues...

edit flag offensive delete publish link more

Comments

Thank you very much for your solutions. For making it permanten see https://together.jolla.com/question/199510/how-to-mount-sailfish-system-and-sd-card-on-android/ Best regards, Uwe.

UweLabs ( 2019-06-23 16:41:21 +0200 )edit

Well, you still have the options of putting it in /etc/fstab

HINT: user,auto,nofail are options which might be useful: (to make something that is usable by non-root user, make it automount despite that, and allow the continuation of the boot even if the mount fails (e.g.: SD card removed)

I use that for automounting SWAP partition from my SD card.

DrYak ( 2019-06-24 22:45:58 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-06-22 19:01:15 +0200

Seen: 273 times

Last updated: Jun 22 '19