This posting is probably not going to be relevant to most people in the future because smartphone manufacturers nowadays build them with larger internal storage, but I still need to write this down because it took quite some effort to get it done and the result is awesome.
Unfortunately, whoever storage-wise-designed my beloved Samsung S5690 must have done so in the previous century. There is only 165MB (they actually talk about 158 in the tech specs) of system memory storage available (see the bottom line of the following picture)
and with the number of preinstalled apps that it comes with and that cannot be uninstalled (by default), there is hardly any space to install apps and it very frequently happens that automatic updates fail because there is not enough space to install the update.
During the last weeks, whenever there was an update for, say, Maps or Gmail, I had to actually uninstall other apps, install the updates and then re-install the other apps in order to not have the fuck annoyed out of me by update reminders.
So I found this howto (sorry, german only) that worked like a charm and got me root in no time. Broken down, it says
- download and unpack this to the root of your sd card
- power off the phone
- when powering on the phone, press and hold “volume up”, “home” and “power” for 5 seconds, then press the home key when the first samsung logo is displayed
- from the menu, choose to install an update
- choose the file just unpacked to the root
- reboot the phone
Then it was mostly a matter of installing a root uninstaller app and get rid of unused stuff like the ape map and other things. This freed about 20 megabytes, which was enough to live through the next couple of weeks.
Each update however, tends to grow the entire app and so after some more time, those 20 meg were gone and I was pretty much in the same situation as I was before. I figured there had to be a way to solve this stupid problem and actually: there was. An app called link2sd was the solution. After having rooted the phone, this app is able to move apps to the sd card and then symlink them so they are still usable. In order for symlinks to work though, there has to be a filesystem that understands the concept of symlinks, which the default FAT32 filesystem on the usual sd card does not.
So the first task in order to get this concept going is to create a second partition on the sd card and since the first and only partition already existing on the card takes up the entire space, the actual first task to get this done is to shrink the existing partition. This step is not without risk, so the really, actually first task was to create a backup ;)
mount /dev/sdg1 /mnt
tar cvf /home/ahwhattheheck/sdcard.tar .
gparted did a good job in shrinking the original sdg1 from 32g to 31g and then creating a new primary partition with the remaining 1g and put an ext3 filesystem on top.
After inserting the card back into the phone, nothing had changed – good! That’s what I wanted but honestly didnt’ expect. So fire up link2sd. It asks you which filesystem you created on the second partition and then creates some script to automatically mount it at boot time. Then it asks you to reboot your phone. I’m positive this wouldn’t technically be necessary, but what the heck. After reboot, still nothing changed, which is still good. Still hadn’t expected that.
Now, with the second partition hopefully (no idea on how to verify that) mounted, the next start of link2sd needed root privileges from superuser and then offered to link apps to the second partition. It only took a couple of seconds to complete and worked like a charm with at least a dozen apps I tried so far.
After mounting the sd card on my linux machine, it reveals a portion of what it did. It moved the application to the second partitons filesystem and then (most likely, I cannot see that) symlinked the files in the file tree.
$ ls -lhn
-rw-r--r-- 1 1000 1000 14M Jan 21 22:06 com.facebook.katana-1.apk
-rw-r--r-- 1 1000 1000 5.9M Jan 21 21:59 com.google.android.apps.books-1.apk
-rw-r--r-- 1 1000 1000 7.4M Jan 21 22:02 com.google.android.apps.docs-1.apk
-rw-r--r-- 1 1000 1000 6.3M Jan 21 21:58 com.google.android.apps.maps-2.apk
-rw-r--r-- 1 1000 1000 4.9M Jan 21 21:55 com.google.android.music-1.apk
-rw-r--r-- 1 1000 1000 5.9M Jan 21 21:56 com.google.android.youtube-2.apk
-rw-r--r-- 1 1000 1000 1.5M Jan 22 05:40 com.noshufou.android.su-1.apk
-rw-r--r-- 1 1000 1000 1.4M Jan 22 05:40 com.rootuninstaller.free-1.apk
-rw-r--r-- 1 1000 1000 6.0M Jan 21 22:06 com.twitter.android-1.apk
-rw-r--r-- 1 1000 1000 158K Jan 22 05:42 com.voss.notelurl-2.apk
-rw-r--r-- 1 1000 1000 8.0M Jan 21 21:54 com.whatsapp-1.apk
drwxrwxr-x 2 0 0 4.0K Jan 22 05:42 dalvik-cache
-rw-r--r-- 1 1000 1000 25K Jan 21 21:58 de.vodafone.android.launcher-2.apk
drwx------ 2 0 0 16K Jan 21 21:05 lost+found
I have not encountered a single problem yet, but will keep this blog posted if I should.