Camera can't store pictures to SD card [not relevant]
Is there a way to store pictures automatically to the external SD card instead of the phone storage?
We have moved to a new Sailfish OS Forum. Please start new discussions there.
Is there a way to store pictures automatically to the external SD card instead of the phone storage?
It's actually amazing that this feature didn't come yet. And a pity as well...
Settings > Apps > Camera > Storage does the trick _now_ (albeit I wasted enough time failing to figure out that Apps settings are down there, with that coresponding apps would just have Settings shortcut in their top menu as well): https://together.jolla.com/question/17691/camera-cant-store-pictures-to-sd-card/?answer=147253#post-id-147253
shigorin ( 2020-03-31 00:23:25 +0200 )editWarning: with this solution, I later noticed that the videos were not very smooth. Writing to SD card in real time may be slower depending on your SD card (I tested with SanDIsk Ultra microSDHC I 32GB class 10). A safer solution would be to write photos / videos to the internal memory by default and when you need to free space, you move the content from the internal memory (/home/nemo/Pictures/ and /home/nemo/Videos/) to the SD card (/media/sdcard/3638-3338/Pictures/ and /media/sdcard/3638-3338/Videos/). The SD card photos and videos will be listed in the Gallery app also.
You can create a symlink from phone memory to microSD card but you will see a duplicate of photos/videos in the Gallery app, like someone said.
In fact, you need to create hidden folders in the SD card, for example ".Pictures" and ".Videos" and then you can save these commands as a shell script camera_sdcard.sh:
#!/bin/sh
rm Pictures Videos
sleep 5
ln -s /media/sdcard/3638-3338/.Pictures/ /home/nemo/Pictures
ln -s /media/sdcard/3638-3338/.Videos/ /home/nemo/Videos
If you run commands as a script, you need a delay like sleep 1 between symlinks creation, otherwise the Gallery app will not load all file thumbnails correctly. Update:I've found that the sleep is necessary after the rm command only and since current Jolla update 1.1.1.27, I have got black covers on the Messages and Phone app after using these symlinks with "sleep 1" or no delay at all. With a greater delay like "sleep 5", there are no black covers. I've found that this bug may not be related to the symlinks, it appears when doing several actions, I shared some screenshots here: https://together.jolla.com/question/2893/bug-double-tap-did-not-unlock-properly/#79276
When you shutdown your phone, you will have to create symlinks again. Even if they still exist, the Gallery app doesn't show SD card content until you create symlinks after the phone operating system startup. I tried to use systemd to autostart the script but it didn't work, it looks like the system hasn't finished starting to load files from SD card into Jolla's Gallery app (starting script after SD card mount or as the last service didn't work for me).
So you can manually start the script after startup but an easier way to do this is to create a .desktop shortcut file that you can start from a file manager or even better, as a shortcut in the phone applications:
[Desktop Entry]
Type=Application
Name=SD card
Exec=/home/nemo/camera_sdcard.sh
This desktop shortcut assume that you have the camera_sdcard.sh file in /home/nemo/ folder. Now you can save the shortcut as camera_sdcard.desktop in /home/nemo/.local/share/applications/ and you will have a shortcut to load pictures and videos from the SD card after phone startup! When you take a picture or video, they are automatically saved to the SD card and appear on the Gallery application.
I will share another trick here, if you move all pictures/videos from your phone memory or SD card to a computer (so files on your phone have been removed) and you want to copy files again to your phone, you will see that the Gallery app files are not sorted in the original order they were created. This is due to the copy process (cp command doesn't respect any order), files copied first appear first in the Gallery app and the last files copied are the one you can see at the beginning. I already shared this on Twitter (https://twitter.com/baptx/status/494989666408345602), at the moment, Jolla Gallery pictures and videos can only be sorted by date (when pictures/videos were taken or copied), so if you want keep the original order, you can mount Jolla filesystem with MTPFS (jmtpfs on Linux) or SSHFS and use these commands:
for i in `ls Jolla/* | sort -r`; do \cp $i Jolla; sleep 1; done
for i in `ls Camera/*`; do \cp $i Camera; sleep 1; done
The first command is for copying the Jolla pictures that come pre-installed in the phone, files are named "Jolla_01.jpg", "Jolla_02.jpg", ...,"Jolla_30.jpg" so you copy alphabetically starting from the end and the second one is for the pictures/videos taken, named "YYYYMMDD_001.jpg", "YYYYMMDD_002.jpg" and so on. The \cp backslash will omit cp alias, for example cp -i, you will not be asked if you want to overwrite an existing file. The sleep 1 delay is necessary for the Gallery to respect your copy order.
@axaq have you tried it? With "cp -p" or "cp --preserve=timestamps", it also messes the order on my Jolla Gallery app. And in the camera_sdcard.sh script at the beginning of my answer, there is a sleep needed too but sometimes I have to execute the script several times to get it working (maybe a syncing problem with Jolla software).
baptx ( 2015-04-26 21:01:47 +0200 )editfixed in 2.0.4
https://together.jolla.com/question/146274/changelog-204fiskarsinjoki/
[jolla-camera] Allow photos/video to be stored on the SD card.
Still not available, it's 29th. Why was it hidden in the first place? Anyway, let's see that release go official first and then announce it fixed. In the meantime, where's the changelog that makes you say it is?
bennypr0fane ( 2016-09-29 13:31:41 +0200 )edit@bennypr0fane the update was pulled back for some technical reasons, the change log was available for a short time, look here: https://together.jolla.com/question/146329/update-204/?answer=146356#post-id-146356
nick75 ( 2016-09-29 14:06:51 +0200 )editNow finally natively available with Fiskarsinjoki ... Thanks a lot !! d (o_o) b
https://together.jolla.com/question/146274/changelog-204fiskarsinjoki/#146274-jolla-camera
Quote: "Allow photos/video to be stored on the SD card."
Goto "Settings" > "Apps" > "Camera" > "Storage" ....
I didn't see the usual "storage: phone / sdcard ?" setting. I guess you could try with a symlink from the local storage to the SD card ?
the symlink works when you take photos/videos, but when you open the Gallery to to look at the pictures/videos, each will appear twice in the listing. It looks like the tracker scans both the SD card through its direct path, as well as via the symlink - this is not elegant.
barral ( 2014-04-23 14:33:24 +0200 )editNow situation is somewhat better. Nothing seem to change tracker settings on reboot/remount, so indexing of Pictures and Videos dirs can be disabled while tracker will still index SD card.
gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['&DESKTOP', '&DOCUMENTS', '&DOWNLOAD', '&MUSIC']"
Then you can create symlinks for Pictures / Video as baptx wrote.
So with this code we don't need to create hidden folders? In current update 1.1.1.27, I've seen a small change: after reboot, camera photos and videos from SD card still appear in Gallery app but if you want to display new photos/videos taken after reboot, you have to recreate symlinks like other updates.
baptx ( 2015-01-31 23:55:59 +0200 )editSimilar to other answers here, I have added a script that i execute manually with ShellEx every few days/weeks that sorts and moves my pictures and videos to the SD card.
note: where xxxx-xxxx is the SD card name.
Here is the script:
#!/bin/bash
PHOTO_SRC=/home/nemo/Pictures/Camera
PHOTO_DST=/media/sdcard/xxxx-xxxx/Pictures/Camera
VIDEO_SRC=/home/nemo/Videos/Camera
VIDEO_DST=/media/sdcard/xxxx-xxxx/Videos/Camera
FORMAT=+%Y%m%d
echo "Start moving Photos ..."
cd "$PHOTO_SRC"
PHOTO_NUM=`ls -al $PHOTO_SRC/*.jpg |wc -l`;
echo "Found $PHOTO_NUM photos to move."
for file in *; do
if [ -f $file ]
then
dname=`date $FORMAT -r $file`
mkdir -p "$PHOTO_DST"/"$dname"
mv "$file" "$PHOTO_DST"/"$dname"
fi
done
echo "Completed moving Photos"
echo "Start moving Videos ..."
cd "$VIDEO_SRC"
VIDEO_NUM=`ls -al $VIDEO_SRC/*.mp4 |wc -l`;
echo "Found $VIDEO_NUM videos to move. "
for file in *; do
if [ -f $file ]
then
mv "$file" "$VIDEO_DST"
fi
done
echo "Completed moving videos"
This thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2014-01-20 23:49:27 +0200
Seen: 6,155 times
Last updated: Jan 18 '18
My Jolla does not recognise any micro sd card. What I can do? [answered]
MicroSD as removable drive in Windows [released]
Toggle between video and still modes in camera app (faster than now) [released]
Accessing pictures from android [released]
PBAP bluetooth profile support is requested [released]
[Implemented in 1.0.3.8] Zoom support in Camera [answered]
Add skype integration to sailfish os
Add DBus interface to stock music player [released]
[How-To] WPA-802.1X (enterprise), eduroam +[Others] GUI wifi support needed + workaround [released]
I would also like to see this option. Settings -- Apps -- Camera :)
cocovina ( 2014-02-15 12:43:52 +0200 )editMy wife is furious about this. I believe it won't be a big trouble to add settings for this. I told her to copy with filetug but you know...
redfizh ( 2014-05-07 19:21:39 +0200 )editYes, PLEASE add this functionality in a future update, I take many photos and videos and it fills up the internal memory pretty quickly, thus slowing down the performance of the phone, and so it would be so much better to be able to easily switch the storage location to a big fat SD card. Thank you!
FishesWillLaugh ( 2014-08-02 19:25:32 +0200 )editIt should be an easy option to save pictures and videos to a SD card and need to be included in an update.
richardski ( 2014-09-30 09:58:43 +0200 )edit@redfizh Tell your wife to "create a symlink from phone memory to microSD card" ;)
Wizah ( 2014-10-07 19:15:00 +0200 )edit