Google Camera does not allow choosing the save location
On my Android phone I use Cyanogen Mod 11. Unfortunately the integrated picture taking app does not support Google’s Photo Sphere function which I like a lot.
That is why I installed Google Camera from Google Play. This comes with one disadvantage: The Google Camera does not allow choosing the storage path which I would like to set to the SD card which has more space.
Proof of concept: Symlinks and Mounts
I tried and learned a lot: First I was trying creating a symlink using the Terminal Emulator. Setting a symlink using the command
ln -s /storage/sdcard1/DCIM/ /storage/emulated/legacy/DCIM is not working an gives me a “link failed Function not implemented” error.
Finally I figured
mount -o bind /storage/sdcard1/DCIM/ /storage/emulated/legacy/DCIM has the desired effect but how can I make this on every boot?
ADB – Android Debug Tool
I thought of editing the fstab but now the Terminal Emulator was a bit hard to use so I Googled for SSHing to my phone and discovered the Android Debug tool. First I activated USB debugging by clicking seven times on the build number on the about screen to activate the developer mode which reveals the USB debugging option. We have to specify root permissions for ADB. On my Ubuntu computer I install using
aptitude install android-tools-adb and after connecting my phone via USB I can execute
adb shell to open a shell.
How can we make this persistent?
Back to the original problem, there is no
/etc/fstab but a
/etc/fstab.qcom. Unfortunately this file can not be edited. We can make it read-writeable using
mount -o remount,rw / but now I figured that the changes are not persisted during a reboot.
Next I learned about the file
/data/local/userinit.sh which is executed on each boot if it exists. I put
mount -o bind /storage/sdcard1/DCIM/ /storage/emulated/legacy/DCIM
in it, but it did not work and using the
logcat command I found that the mounting takes place to early:
I/sh ( 178): mount: No such file or directory
It’s simple: Folder Mount App
To make a long story short I finally found the folder mount app (needs root of course) which gives an easy GUI to move the folder and mount it on the next boot. Now my pictures are stored on the SD card.