Taking advantage of the super
partition
Every Android system has a super
partition, which is dedicated to saving the Android OTA (system updates), and AFAIK, that partition is not used anymore when SailFishOS is installed because even if the Android Support is installed, it does not upgrade the system.
The super
partition size depends on the Android system size and not the smartphone model, AFAIK. In my Sony Xperia 10 II, that partition is 12GB and is mapped on:
/dev/mmcblk0p85
Your device can be mapped differently, but you can find it using this function:
grnc() { grep --color=never "$@"; }
mmcblk_findby_label()
{
local i dev txt d="/sys/class/block"
test -n "${1:-}" || return 1
if [ "x${1:-}" = "x--all" ]; then
for i in $(ls -1 $d/mmcblk*/uevent 2>/dev/null); do
echo $(grnc -E "DEVNAME|PARTNAME" $i) | grnc -e "DEVNAME.*PARTNAME"
done
return 0
fi
dev=$(grnc -nw PARTNAME="$1" $d/mmcblk*/uevent 2>/dev/null | cut -d: -f1)
echo "$dev" | wc -l | grnc -wq 1 || return 1
test -n "$dev" || return 1
echo /dev/$(basename $(dirname "$dev"))
}
In this way:
mmcblk_findby_label super
There is also a SFOS script that contains something similar to the function above, but it is way slower, which is why I developed that function.
The way to add that space to your system can vary depending on your needs, like increasing your user space, increasing the root size, or using it to store a toolchain for compiling natively applications on the smartphone directly.
Adding 12GB can make a tiny or big difference, depending on your needs. If your userspace is running out, 12GB more will give you a breather. If you need to install a toolchain or something like that, considering that the root size is 5GB, adding 12GB is a great help.
Like everything is SFOS, this suggestion is AS-IS without even the bare knowledge of the consequences or the corner cases, for the most basic reason: I do not use SFOS but RFOS. Consequences might vary from “nothing bad but good only” to “immediate universe collapse” or something in between, which explains why nobody before noticed that, but @olf documented a complex procedure to change the LVM partition sizes in order to increase the root space.
mkfs.ext4 -m 0 /dev/mmcblk0p85
mkdir -p /usr/local/extraspace
mount /dev/mmcblk0p85 /usr/local/extraspace
To use it for your user, you need to change the /etc/fstab
and tell the system to mount it at boot time, giving that mount point the proper uid and gid for your user. In this case, the natural place for the mount point is the user’s home. Something like /home/defaultuser/superdata
.
May the super
be with you…