Thursday, August 7, 2014

Uninstalling apps that just.wont.uninstall.

And I'm tinkering again. This time, with my recently-rooted and flashed Android phone.

As I mentioned I'd been experiencing random reboots; one suspect was an app called Mirror, developed by CM Guru Koushik Dutta. I came across his thread in Google+ and, curious (as always), I installed the app. 
Unfortunately, it force-closed almost immediately; and worse! It wouldn't uninstall using any of the following:

  • adb uninstall com.koushikdutta.mirror
  • Settings > Apps did not even have an Uninstall option.
  • adb shell >>> pm uninstall com.koushikdutta.mirror
The fact that there was no Uninstall option made me think that perhaps the app installed itself as a system app.

So - thought I'd write this guide for myself as well as for any hapless newly-born tinkerers out there.

Launch adb with root access

  1. Root access for adb is usually disabled. Visit CyanogenMod's Developer Options and set Root access for adb (Settings > Developer Options > Root Access > "Apps and ADB") 
  2. Run adb root.
  3. Now launch a root-enabled shell.

Mount your /system partition and delete the app's data

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm /system/app/your_app
rm /data/data/your_app

Edit /data/system/packages.xml and /data/system/packages.list

Remove any references to your suspect package in /data/system.
  1. First pull it to your machine as adb pull /data/system/packages.xml
  2. Edit it in your favorite editor (mine's Emacs on Windows)
  3. Push it back as adb push packages.xml /data/system
  4. Repeat the same steps for packages.list

Monday, August 4, 2014

Installing CM 11 on the Galaxy Grand Duos

It happens to the best of us. And to me, it happened one rushed evening. I crowded into an already-super-crowded Mumbai Local. When I got off at the next station, barely 5 minutes later, my phone was missing, presumed stolen.

(And that should also explain my relative absence).

Surprisingly enough, I wasn't too sad. Gadget cravings have mostly abated thanks to a never ending stream of devices and Android versions. As a result of which, beyond the initial starry-eyed delight, every Android device is pretty much exactly the same. It's the iPhone-ification of Android - to make every phone boring.


Anyway... I took this as an opportunity to install CyanogenMod 11 on a Galaxy Grand that my wife generously gave me. 


Word of warning: CM11 on the Grand keeps randomly rebooting. I'm unsure if this is due to the ROM or the phone or both. Haven't had the time to investigate as yet.


1. Install ClockworkMod Recovery


If you've done this before, it's a piece of cake. If not, ClockworkMod Recovery is the first thing you need to do.
The link above is already well-written so I won't go into the details.
Words of warning though: 

  1. This will void your warranty and/or brick your device if you are not careful.
  2. Some links above may be dead.

2. Install CM 11

Source.

I followed the advice in the above link. 

3. Install Google Apps

The last thing you need to do is install Google Apps. Due to Copyright issues these are not bundled with the install. You can get them here.

And that's it - done!

Review


Pros
  • CyanogenMod is great! And with the Galaxy Grand, even better as you don't have to contend with Samsung's crappy TouchWiz UI any more.
  • There are some little features that make a huge difference. For instance; in the notification shade, tapping toggles a quick setting while long-pressing takes you to more options for that setting. Just the way it should be. 
Cons
  • Perhaps it's due to the fact that the Galaxy Grand release is unofficial. But I'm facing random phone reboots - mostly when sharing an image or capturing a photo. I haven't had the time yet to look at the logcat logs.
  • Why so many Hexagons??