Get the most out of a Sony Xperia P

 Xperia P was one of the most impressive smartphones by Sony in 2012. I personally felt it way better than it's big brother Xperia S. The only thing that bothered me all the way was it's battery backup. With a mere capacity of 1305mAh and a non-removable battery, it was difficult to survive more than a day with it. Using a 3G network was a luxury this phone could not afford. However, it was a great phone that suited my purpose which were

  • Aesthetic looks(the transparent strip embedded with buttons)
  • Handles most of the games
  • Brilliant screen(with auto brightness which is missed in Xperia S)
  • Decent camera(not really great though)
  • Solid build(not much damages, apart from scratches after almost 2 years)
  • NFC, WiFi hotspots, Bluetooth, OTG and all those features cramped into the device
  • And... updates(which started to disappoint recently)
Although the phone was shipped with Android 2.3(Gingerbread), I did not have to wait long before getting a taste of Ice Cream Sandwich. It was a good update, with the look and feel adding to the aesthetics of the phone. And the down the road came the Jelly bean update too, which kind of refreshed the longevity of using the phone to me. But with that did come a few irritating bugs too, the ones which bothered me a lot are
  • Battery draining was off the chart, the phone barely survived 8 hours
  • Call logs got really laggy(know issue apparently). A factory reset did not resolve this, trying third party apps wasn't quite the experience
  • And the fact that I wouldn't get to taste KitKat on Xperia P
To get myself distracted from these, I starter using other launchers. The Windows 8 launcher entertained me for sometime, then I moved on to other popular launchers like GoLauncher, Nova Launcher etc. But these never lasted, I was back to the stock experience in a while.

So the inner geek in me pushed me for more, and the thoughts of rooting/unlocking/custom rom began roaming in my brain. But I was a tad bit reluctant on getting into the flow for some reason. But then one day, I decided to get in, and the post that guided me was this - Techglen

Let me summarize what, how and why I did stuff on my phone

What am I doing?
  I am installing a Custom ROM on my phone. Custom ROM? What's that? It's like installing another OS to your PC/laptop. Except the issue here is every phone required a particular type of ROM, unlike the concept of a Windows or Ubuntu on any PC.
 So someone should take in the Android sources, tweak it for the particular phone, and publish it. That's what CyanogenMod ROMs specially do(there are lot more out there too). So some guy(tons of thanks to him and team) picked up the sources and ported it on Xperia P. 
 But is it as easy as installing a new OS on a PC? Sadly no.
There are a few things you have to take care before going into this process
  • Take a backup of your phone. You don't want to lose your contacts, messages and other app info
  •  It's likely that your phone gets screwed up in the process(known as bricking), which is a risk you take
  • To take a complete backup, you might have to Root your phone. Rooting is similar to sudo su in Linux or Run as Administrator in Windows. Normally phones do not give admin privileges to users, and thus some exploits are used by developers to get this access. 
  • Unlock the bootloader. If you know what a bootloader is, you might as well understand what this does. All phones have a bootloader, which is bound to load only specific ROMs. In this case, the bootloader only identifies ROMs provided officially by SONY. Manufacturers provide an option to unlock bootloaders, which comes at a price - which is warranty void. My phone is almost 2 years old, and I certainly do not care about that. If you still do not get what a bootloader is, then in Ubuntu terms it's like uboot and in Windows terms something like BIOS(the blue thingy that sometimes comes during boot). 
  • Find if a Custom ROM for your device exists, and it is stable. These ROMs are published by developers, who continuously work on improving the experience. But they are not paid employees, they do this because they love to. Don't expect the terms "guarantee/timeline/deadline" etc. from them. They'll try their best to make it work.
If you can dig in a bit, please find all info you need here - XDA developers

How did I do it?
 Techglen gives a detailed description on the details. Here is a summary of the steps you need to do.
  • Download required stuff
    • ADB drivers(not required if on Ubuntu)
    • Custom ROM
    • Flashtool(Available for Windows and Ubuntu). For Ubuntu check here
  • Prepare the phone
    • Root and use and appropriate backup mechanism(I used Titanium Backup)
    • Unlock the bootloader
    • Copy the custom ROM into your SD card
  • Do it!
    • Flash the custom bootloader available along with the ROM(Follow detailed steps)
    • Enter CWM recovery(Power on and then tap Volume up/down buttons, varies with devices)
    • Flash the ROM
    • TADA! And you are done :)
Why did I do this?
 Apart from the reasons I mentioned above, the experience with custom ROM has been really great. 
  • The phone works well(better than it was), 
  • KitKat looks great, has some neat features
  • Tons of customization possible
  • I'm getting a way better battery backup. To improve on this, I installed Greenify(hibernates the apps if not used), disabled all auto sync(Gmail, Play store, Google Now etc. ). My phone survives more than 24 hours now
Please not that this might have bugs. I found some issues with WiFi(found workarounds as well), and the ROM officially has some bugs with Bluetooth, NFC. But these are something that doesn't come in my day-to-day routine, and there is mostly a workaround for everything.

So in short, the experience with my phone looks better than before, and I'm still exploring the options! It's almost like you have a brand new phone to play with(I should say this is one big disadvantage for Windows/IOS based phones)

Don't hesitate to shoot any questions :)