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

[Xperia X][3.1.0]Camera storage location changed?

Tracked by Jolla (In release)

asked 2019-08-06 16:25:02 +0300

ziellos gravatar image

updated 2019-08-08 09:31:10 +0300

I have been using the bind-mount approach to share SD-card storage between Sailfish OS and Aliendalvik (as described here) for a long time.

In my configuration the physical directory /run/media/nemo/[uuid]/.android/ is bind-mounted to /home/nemo/android_storage/ by a systemd script.

Now with Seitseminen 3.1.0.11, the camera app stores images at /home/nemo/android_storage/Pictures/Camera/ instead of the location /run/media/nemo/[uuid]/Pictures/Camera used before. Setting storage location in the settings app does not help.

Any idea what's going on here?

Here is the full content of my mount script:

[Unit]
Description=SD card bind mount for Android
ConditionPathExists=/dev/mmcblk1p1
ConditionPathExists=!/tmp/os-update-running
ConditionPathIsDirectory=/home/nemo/android_storage/
ConditionPathIsMountPoint=/run/media/nemo/90e13e4f-5b8b-489f-912c-4c171c529640/
Requires=local-fs.target systemd-user-sessions.service
Before=aliendalvik.service
After=mount-sd@mmcblk1p1.service
BindsTo=mount-sd@mmcblk1p1.service

[Mount]
What=/run/media/nemo/90e13e4f-5b8b-489f-912c-4c171c529640/.android/
Where=/home/nemo/android_storage/
Type=none
Options=bind

[Install]
WantedBy=local-fs.target aliendalvik.service
edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-08-06 19:46:47 +0300

DrYak gravatar image

TL;DR: Bug in list drop-menu.

Seems to me that the "Storage" drop down list in the Camera's apps settings only list the first occurrence of a mount (or last, actually didn't bother to check).

In your case, /dev/mmcblk1p1 appears to be mounted in both:

  • /home/nemo/android_storage/
  • and /run/media/nemo/90e13e4f-5b8b-489f-912c-4c171c529640/

For some reasons, the drop down-down lists only the former.

Work-around

  • systemctl stop aliendalvik.service home-nemo-android_storage.mount
  • Now go to the Camera's apps settings.

    (You'll notice that the storage drop-down current hold an invalid (empty) entry, because the previously selected path /home/nemo/android_storage/ doesn't exist in the list anymore)

  • Select your memory card
  • systemctl start home-nemo-android_storage.mount aliendalvik.service
  • move and clean-up the content of /home/nemo/android_storage/

Checks

You can run (using strings command from package binutils):

strings ~nemo/.config/dconf/user | grep -A 1 'sstoragePath'

to check before and after and see the change in path.

Fix

Pester the official Jolla devs on Zendesk to fix that for 3.1.1

edit flag offensive delete publish link more

Comments

Thanks @DrYak for the quick and valuable reply.

Using strings I can see the change in the configuration setting (/opt/alien/run/media/nemo/90e13e4f-5b8b-489f-912c-4c171c529640 vs. /home/nemo/android_storage), and the camera stores pictures to the selected location as desired as long as Alien Dalvik and bind mount keep stopped.

But after starting the mount, the camera app complains an invalid storage location and switches to internal storage. So the workaround is only working as long as Alien Dalvik (and the bind mount) are stopped.

ziellos ( 2019-08-06 20:33:45 +0300 )edit

Ah yeah, I forgot:

When camera starts, it checks if the mount point is still mounted before taking pictures. I guess pestering the official Jolla devs is your only hope.

Until then, maybe use some symlinks in /home/nemo/{Camera,Video} pointing to sour uSD card ?

DrYak ( 2019-08-07 01:26:55 +0300 )edit

After some discussion with customer support, they finally accepted to file a bug. At least because the known problem of the camera app losing its storage settings is still present in 3.1.0.11.

BTW, my first attempt using a symlink caused all images to appear twice in gallery, as expected. So I need to find another workaround...

ziellos ( 2019-08-08 09:30:24 +0300 )edit

you can touch a .noindex file in the parent directory of the copy you don't want indexed.

but at this point, we're piling hacks upon hacks.

better to get the official support involved as you did.

DrYak ( 2019-08-08 12:34:36 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2019-08-06 16:25:02 +0300

Seen: 421 times

Last updated: Aug 06 '19