downsizing android

i have been on a continuous quest to reduce resource requirements. i think this is affecting my personal life too - simplifying my own demands is making me live happier :) but, back to the topic on hand - android!

i have tpt'd yet again, and now have a 120m /system, with a whopping 334m for /data. i don't know how to repartition to an arbitrary size, or i would reduce /system further. i would very much like to reduce /system to 100m and use the rest for /data. i only use 101m in /system. so i stuff some .apks in there, to not waste free space.

lots of bloatware have disappeared from /system/app (most google bloatware) and /system/media (any >50k). google apps should be kept in /data/app, rather than /system/app. i have replaced many apps with older (much smaller) and more efficient apps. i don't need the latest greatest features, particularly those i don't need or use or the battery-drains.

apps which have been trashed are listed below:
google play -> replaced by google market 1.82 (613k)
google maps -> replaced by waze & rmaps
google search
google talk -> replaced by slick
gmail -> replaced by k-9 mail
email -> replaced by k-9 mail
home apps

apps which i have added for core functionality
f-droid
simple home

i uninstall google play/market apps and replace them by their equivalent open-source apps from f-droid. i routinely replace apps of larger size by smaller size equivalents. i have 225 apps installed, which i could not dream of previously. almost all apps are installed in /data, except a very few on /sdcard. i still use the original 2g sdcard.

my battery lasts about 4 days now!! :D

update: i have found some devs maintaining roms with the same thoughts
http://www.modaco.com/topic/359058-11112012-eco-cm7-a-minimalist-cm7-build/#entry2051035
http://www.modaco.com/topic/350875-romgen2-swedish-snow-rls7-android-235/#entry1886183

rom downgrade (Android 2.3.5)

have you ever downgraded? was it too painful to switch from more to less?

i believe, less is more! more than what you really need or actually consume is inefficient & wasteful. i keep learning from experience... bloatware (in any way, shape, or form in life) cripples us!!

i miss my old nokia phones. i could charge those, and not worry about battery running out for about a week and then some... :-)

i like my smartphone, and without it now i would feel handicapped. what a change from the good old days, eh? all you could do was call or text... now that is something we do the least on our phone.

yet, this is called a smartphone for a reason - it needs to be a phone first & foremost, and then the rest of it's smartness is just the icing on top. when i carry it around, the most important priority is for it to be available to receive/make calls. if the battery does not last long enough, because some google (or another) app wants to continue running or transfer your data sneakily in the background, my requirement has failed!

hence why i'm on a continuous mission to prune my phone of bloatware. the more stuff sneakily running in the background, the less useful it becomes to me.

this next episode downgrades my android phone from 2.3.7 to 2.3.5. i'd been thinking for a long while to go back to the manufacturer's stock rom, and prune it down ending up with only what i really use. at the very least, i will have a stable platform with optimum battery use. the next best thing is a mod of the stock rom, improved(?) upon by folks like more experienced.

so my journey takes me to the Swedish Snow. read more about it at http://modaco.com/topic/350875-romgen2-swedish-snow-rls7-android-235/. KonstaT is a highly respected developer. i like him particularly because he is ruthless with bloatware like me. bells n whistles are nice-to-haves, but only after primary requirements are satisfied.

i chose his all-in-one tpt install, which will downgrade my clockworkmod recovery from v5.0.2.0 to 4.0.1.5. i am not sure what i will lose, but cwr can be easily flashed again. if you find a changelog for clockworkmod, please let me know.

this tpt further slims down /system leaving more for /data. /system should be static, and only used for frozen apps, not for volatile apps like google apps which ideally should be in /data. as market insists on putting yet another update in /data, we have no need for apps in /system too, especially when /system space is kept limited. my internal storage will be re-partitioned to 128m /system, 326m /data, 2m /cache.

my partition layout with cm7.2 is 138m /system, 316m /data, 2m cache. if i wanted to keep this layout, i need not have used the tpt install. it so happens that my system is <128m. i am hoping to keep this partition size if/when i change roms again. i will need to remember to prune (easily done) any roms before i install. if i was not using the tpt method, i'd just flash the rom from recovery. since i want a clean slate, i'd format each partition, except /sdcard!
clockworkmod recovery -> mounts and storage -> format ...
NOTE: DO NOT FORMAT /sdcard! did you hear that?

so we have the tpt downloaded into the root of sdcard. now unzip that file.
$ unzip Swedish-Snow-RLS7-TPT.zip

now we are ready to proceed. all systems go!

step 1:
first things first: take a full nandroid backup of the whole system... remember the milk?
pull this backup off the phone, just in case :-)
$ adb pull /sdcard/clockworkmod/backup/

now read this whole post from top to bottom, and undertand it, before you do anything.

step 2:
power off the phone. pull the battery out for >10s.

press & hold volume+ menu power buttons, till you see green text on the screen. skip the rest of this step.

if you see the green android, this didn't work. repeat step2 again.

if your tpt is corrupt, step2 will not be successful. recreate/download your tpt again. verify the checksums yourself.
$ md5sum -c nandroid.md5

tpt reference: http://amphoras.co.uk/index.php/downloads/blade-tpts

step 3:
enjoy your new rom! :-)

android app cache

i do quite a bit of fiddling around inside the internals of android. i have noticed that occassionally rebooting helps to stabilise the system. although i could never work out the need, as android is essentially linux. but sensing what google wants to do it, i suspect it might be heading the microsoft windows way.. becoming bloatware (it probably already is)!

the next step is to clean out the cache. though you could do so by manually clearing the filesystems, i find it simpler (and safer perhaps) to do so from the recovery. i used clockworkmod. there are two caches - the dalvik cache and the system cache. both can be wiped from recovery. you might reclaim some diskspace too. android will create the required caches from scratch, on the next reboot. this boot will take a rather long time - be warned! watching the phone doesn't help. find something else to do and come back in good time. patience is of essence here.. :-)

there are some other ways to hack out some more space in /data, which is where all user apps are installed.

we can move some app caches to sdcard. this might make those apps slower, if your sdcard is not that fast. for some apps with huge caches, we might be more concerned about reclaiming disk space and sacrificing some speed. note that caches might not necessarily be a bad thing.

let's identifying the apps with the biggest caches. do this after you have been using the phone regularly for a few days without any reboots/cleanup, for best results.

$ du -s /data/data/*/cache | sort -n

if the above command didn't work for you, enable superuser mode and try again.
$ su

the next step is to move some of these caches to the sdcard. we need to decide on some rules to identify the best candidates. i have focussed on the biggest caches where this process actually makes a noticable difference. for me the two apps are market and browser. you need to consider the security implications, as chmod permissions don't work on sdcard fat filesystems, i.e. your sdcard content is world readable.

now move each of them to sdcard, like so

$ mkdir -p /sdcard/cache/browser
$ cd /data/data/com.android.browser
$ rm -r cache
$ ln -s /sdcard/cache/browser cache


note that the app should not be running, not even in the background. go to settings -> applications -> manage applications and verify whether they are running. force close them if necessary. it might be far simpler to boot into recovery and do everything there!

most popular posts