A few android hacks (2014)

Notes for myself to remember...

Replacing AOSP gallery (Gallery2) with GalleryGoogle

Say you don't want to reflash the whole device just to get a more recent gallery app (e.g. you happen to install CM and old-ish gapps on top). Fix is rather simple:

  1. Go here and download the proper stock package
  2. Check ZIP for optional/gallery. I found the following interesting
    • lib/libjni_*.so
    • mako/app/GalleryGoogle.apk
    ...copy those on your device.
  3. The following happens on the android machine:
        mount -o rw,remount /system
        rm /syste/app/Gallery2.apk # or whatever was the name
        cp /sdcard/stuff/lib* /system/lib
        cp /sdcard/stuff/GalleryGoogle.apk /system/app
        chmod 644 /system/lib/libjni_*.so # better only put the .so's you copied here, to be safe
        mount -o ro,remount /system # be safe
    
  4. Reboot android. Most probably your gallery app is gone. Just reinstall the apk you copied. Didn't yet check how the apk registration works in android so...... :)
  5. Voila, photo sphere and friends work now

Manual disk mount in Android

...should work similarly to linux. E.g. using the busybox mount binary:

mount -t vfat /dev/block/sda1 $mountpoint

Attention: the devices appear under /dev/block, instead of just /dev!