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

Symlink from mass storage to SDCard disables camera from saving pictures/videos

asked 2016-08-11 00:10:33 +0300

droid001 gravatar image

updated 2016-08-11 00:23:42 +0300

I've got a simple symlink:

ln -s /media/sdcard/5E00-B6EB/media/Pictures/Camera /home/nemo/Pictures/Camera

...which stopped working in mid July. Any reason why the camera can't save to the SDCard any longer?

edit retag flag offensive close delete

Comments

please post permissions of the corresponding folders using ls -lah

bomo ( 2016-08-11 00:42:39 +0300 )edit

drwxr-xr-x 2 nemo nemo 112K Aug 10 23:11 Camera

droid001 ( 2016-08-11 00:44:35 +0300 )edit
1

try to chown -R nemo:privileged, also check the permission in the parent folders of /media/sdcard/5E00-B6EB/media/Pictures/Camera

bomo ( 2016-08-11 00:48:31 +0300 )edit

chown: changing ownership of `Camera': Operation not permitted

droid001 ( 2016-08-11 00:51:17 +0300 )edit

with devel-su ... see also my latest edit to the previous comment

bomo ( 2016-08-11 00:52:36 +0300 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-08-12 00:27:47 +0300

droid001 gravatar image

updated 2016-08-12 00:35:32 +0300

I've reformatted the SDCard to ext4 and changed the ownership of the card to nemo:privileged:

devel-su chown -R /media/sdcard/xxx-xxx

...then copied the old Pictures and Videos folder onto the card and made symlinks of the old folders.

rm -R /home/nemo/Pictures
rm -R /home/nemo/Videos
ln -s /media/sdcard/xxx-xxx/Pictures /home/nemo/Pictures
ln -s /media/sdcard/xxx-xxx/Videos /home/nemo/Videos

lastly I stuck in a hidden .nomedia-file in the card root so that there wouldn't appear any duplicates in the Gallery:

touch .nomedia-file

@schturman: Thanks for your help. It's very much appreciated.

edit flag offensive delete publish link more

Comments

Would that approach also work for android_storage? I have gone the btrfs way, created subvolumes, mount scripts and system services (https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-share-space-with-android/). It works, but I would always prefer the least complex solution.

ziellos ( 2016-08-12 09:46:06 +0300 )edit

I remember vaguely reading somewhere that android needs to be on a separate partition and that had possibly something to do with symlinks. I might (most likely) have rememberd incorrectly and would let someone more knowledgeable to comment on this.

droid001 ( 2016-08-12 20:26:27 +0300 )edit

The media folders (Pictures/Videos) on the SDCard disappeared today. Not 100% sure what was the cause of this but I did reboot the phone after loosing mobile data connectivity out of the house. Rebooting at home hasn't reproduced the loss of media though. What I do have is two media folders on the SDCard. One is located in 5E00-B6EB and the other on 97675dde-a6a7-4fd4-8510-d73f24eed858. The former contains folders which I recreated after them being lost. The later folder with the 32 character name seems to be updated or recreated after each reboot and also contains the previously missing pictures and videos. What is the difference between these folders? Should I make a symlink to the 32 character folder?

droid001 ( 2016-08-12 20:41:05 +0300 )edit

Yep, the 8 character folder is from your old fat32 card. Just delete this folder and use your new xt4 folder.

Schturman ( 2016-08-13 00:42:41 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2016-08-11 00:10:33 +0300

Seen: 272 times

Last updated: Aug 12 '16