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!

mbr in linux

fdisk /mbr
ever used the above in dos? but this doesn't work in linux. there are times when i have a need for this. i usually install bootloaders on specific partitions than on the mbr.

dd can be used for such requirements. the following will wipe your mbr clean

# dd if=/dev/zero of=/dev/xxx bs=446 count=1
where xxx is your disk.

how/where do i use this? i have been playing with many different os for a long time. every os wants to install their own bootloader into the mbr. but, we can't really have that, can we? not if we want them to exist simultaneously on the same disk.

i always install the bootloader on the same partition as the os, and wipe the mbr clean. then use fdisk to make a partition active and reboot to load that os. an os could do whatever with its bootloader and not bother me. this method can also be used to play with multiple bootloaders, each on a separate partition. i arrived at this method, after much grief from trashed bootloaders.

caution: just in case, make a backup of your mbr, before you wipe it.
# dd if=/dev/xxx of=xxx-mbr.raw bs=446 count=1

and restore it, like so
# dd if=xxx-mbr.raw of=/dev/xxx

opera 12 issues

just installed opera 12, and rolled it back right away. this is not a stable version.
issues: toolbars (specifically main-menu), multimedia (flash videos), indic fonts (malayalam?)


opera 12.00 starts up with a useless empty bar on top with just one button, wasting screen estate. see image below.


don't bother trawling through the opera forums, as opera developers seem to be windows kiddies. after eating some more of my leftover hair, i find a workaround. go to

Opera -> Settings -> Preferences -> Advanced -> Tabs -> Additional Tab Options -> Show close button on each tab (enable)


this is not ideal, as now every tab has an unnecessary " x" at the end. but is better than an empty line of wasted screen estate.



the next issue is flash. i just can't play any videos. instead i see an empty static black box, where the video is supposed to be. no buttons, no clicks, ...nothing. like this


opera 12 has "Experimental hardware acceleration WebGL support" which need to be activated by enabling two settings in opera:config, ie set them to 1 (autodetect), or 2 (on). they are initially set to 0 (disabled).
opera:config#UserPrefs|EnableHardwareAcceleration and opera:config#UserPrefs|EnableWebGL

i play with different combinations of these settings wondering if these were the cause of my youtube problems. but every permutation i try gives me the same static black box in youtube.

back to opera forums "Opera for *nix - Linux/FreeBSD", and the first sticky is this post: Flash problems on Linux?
it seems a bit dated for 14/12/2009, but as opera lists this at the top, i expect this to be current. so i trawl through this, and do what it asks:

$ find / -name 'libflashplayer.so' 2> /dev/null
/usr/lib/flashplugin-nonfree/libflashplayer.so

$ ldd /usr/lib/flashplugin-nonfree/libflashplayer.so
linux-vdso.so.1 => (0x00007fff560a7000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fda2350f000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fda232fc000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007fda23094000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fda22df5000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fda22bbe000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fda229a1000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fda22799000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fda22158000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fda21ea3000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fda21c80000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fda21a55000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fda21834000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fda21627000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fda2132c000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fda210de000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fda20e8e000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fda20c8a000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fda20992000)
libssl3.so => /usr/lib/x86_64-linux-gnu/libssl3.so (0x00007fda20751000)
libsmime3.so => /usr/lib/x86_64-linux-gnu/libsmime3.so (0x00007fda20524000)
libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so (0x00007fda201e7000)
libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so (0x00007fda1ffc1000)
libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so (0x00007fda1fdbd000)
libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so (0x00007fda1fbb7000)
libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so (0x00007fda1f978000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fda1f774000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fda1f4f1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fda1f16a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fda24d48000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fda1ef4a000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fda1ed42000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fda1eb27000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fda1e910000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fda1e6e5000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fda1e4e3000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fda1e2e1000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fda1e0da000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fda1dd88000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fda1db86000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fda1d97c000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fda1d77a000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fda1d56a000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fda1d362000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fda1d158000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fda1cf30000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fda1cca9000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fda1caa5000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fda1c89b000)
libffi.so.5 => /usr/lib/x86_64-linux-gnu/libffi.so.5 (0x00007fda1c68d000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fda1c450000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fda1c24c000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fda1c047000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fda1be42000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fda1bc21000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fda1ba0b000)


at this point, i give up on that post and go back to troubleshooting on my own.

http://youtube.com/html5 tells me this:

What does my browser support?
Video tag [y], h.264[!], WebM [!]

Note the answer to the above question, when a few lines above it says that Opera 10.6+ supports WebM. What does [!] mean?

opera:plugins lists all plug-ins and their status.

then i wonder, if youtube has any other issues. so i uninstall opera 12.00, reinstall opera 11.64, and try youtube. voila... it works! so it has to be opera 12 and not anything else on my system!


update: for now, i have installed opera 12.00 & 11.64 side-by-side on the same system. i don't seem to have the above issues on 11.64. so i guess, i'll continue using 11.64 for now.

i'm still sticking with opera, as i find it to be lean, small & fast, when all the others are going bloatware. i only use iceweasel (firefox, for the uninitiated ;-) when opera doesn't suffice. for eg, when i need to work with indic fonts, which opera won't render properly.

reclaiming android foss

i am gradually removing google apps, as they continue to bloat.

if you are looking to buy a new phone, i will only recommend those phones which have a sizable open-source developer community behind it. if you don't want to end up with a paperweight, do not buy any phones, which can't be openly hacked!

android roadmap?

i'm not sure which way google are going, but they seem to want to turn the android into a desktop os, rather than a handheld os. google are doing to android, what microsoft did to windows.. make it bloatware & proprietary locking everyone out, till people give up and move to alternatives.

most viewed