The Jolla has 16 GB internal disk space which is filled by Android apps like OsmAnd and Spotify pretty fast.
Thus I've developed a way to move the data of these apps to sd-card.
All of the following commands have to be run as root.
Thus you have to be careful otherwise you'll break your phone.
Warranty
If you follow these instructions you'll move all data saved by Android apps running on the SailfishOS of a Jolla to the sd-card of your phone.
That way you might use up to 64 GB of disk space for maps, media files and everything else stored by Android apps.
The following instructions use the following settings:
If your setting differs from these you have to change the corresponding commands.
devel-su
ls /dev/mmcblk1
/dev/mmcblk1
mount | grep mmcblk1
/dev/mmcblk1p1 on /media/sdcard/<UUID_of_partition> type btrfs (rw,nosuid,nodev,noexec,noatime,dirsync,thread_pool=4,ssd,noacl,space_cache)
umount /dev/mmcblk1p1
mkfs.btrfs /dev/mmcblk1p1
mount-sd.sh add mmcblk1p1
/media/sdcard/<UUID_of_partition>
systemctl stop aliendalvik
rsync -a --progress /data/media/ /media/sdcard/"$(blkid -o value -s UUID /dev/mmcblk1p1)"/android_storage/
chown -R media_rw: /media/sdcard/"$(blkid -o value -s UUID /dev/mmcblk1p1)"/android_storage/ chmod -R 770 /media/sdcard/"$(blkid -o value -s UUID /dev/mmcblk1p1)"/android_storage/
echo "[Unit] Description=Mount sd for android After=mount-sd@mmcblk1p1.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/sbin/mount-sd4android.sh start ExecStop=/usr/local/sbin/mount-sd4android.sh stop [Install] WantedBy=graphical.target display.service" > /etc/systemd/system/mount-sd4android.service
echo '#!/bin/bash sd_uuid="$(blkid -o value -s UUID /dev/mmcblk1p1)" if [ "$1" == "start" ] then systemctl stop aliendalvik mount -o bind /media/sdcard/"${sd_uuid}"/android_storage /data/media systemctl start aliendalvik elif [ "$1" == "stop" ] then systemctl stop aliendalvik umount /data/media fi' > /usr/local/sbin/mount-sd4android.sh
chmod ug+x /usr/local/sbin/mount-sd4android.sh
systemctl enable mount-sd4android.service
reboot
df -hT
/dev/mmcblk1p1 btrfs 30G 8.4G 21G 29% /media/sdcard/4f1f8dbc-ed55-4b6c-8290-ac97e15b221f /dev/mmcblk1p1 btrfs 30G 8.4G 21G 29% /data/media /dev/fuse fuse 30G 8.4G 21G 29% /home/nemo/android_storage
devel-su mount-sd4android.sh stop rm -rf /data/media/* mount-sd4android.sh start