Wednesday 24 December 2014

    Add Exchange account to Gmail 5.0 on older android versions

    I installed unofficial CM 12 with Android 5.0.2 today. Earlier I was using stock Android Lollipop and it had the option of adding Microsoft Exchange account. Unfortunately CM12 didn't seem to have it.

    After doing some research I figured out that only devices running stock Android 5.0+ are capable of having exchange accounts. And CM12 although runs on Android 5.0, doesn't have this feature. On doing further research I found out that Android 5.0+ have something called Exchange services which enables gmail 5.0 to handle exchange accounts.

    Download Exchange Services

    Then, install and restart your device. Walah! Gmail will be able to add exchange accounts!

    Note: This method is not just for CM

    Friday 5 December 2014

    How I fixed bootloop on my Nexus without loosing data

    I was playing around with framework-res.apk and SystemUI.apk to get Ambient Display on my Nexus 4. When I restarted my phone, it seemed to have stuck in a bootloop. I knew that factory reset might've worked. But I didn't want to lose any data.

    Fortunately adb was working. When I did adb logcat , it was logging an error saying:
     /system/framework/framework-res.apk is neither a file nor a folder (type=0)

    I realized that there was some problem with permissions of that file. I used adb shell and changed the permission of framework-res.apk and SystemUI.apk to 0644. But this was of no use. However I came to know that if I could somehow reset /system partition the problem would be solved.

    • So I downloaded the factory image of my phone. For nexus devices it is available here
    • Extract the contents of the to get the file system.img.
    • Then ran the following:
      adb reboot bootloader
      fastboot flash system system.img
    • This will wipe the /system partition and reset it without touching any other partitions. Hence you will not lose any data.
    • Restart. It took a while to start the phone completely. But it solved the problem!
    This is how I was able to reset my framework-res.apk and SystemUI.apk!