Sunday, July 24, 2016

Cyanogen Mod & Pure Android, Why?

So last summer, I purchased a ZTE Zmax when my phone was stolen as it had a great recommendation from a nerdy friend in my speech class.  My first six months of ownership were amazing and I was extremely happy with the device except I desired root access which wasn't available.  Somewhere along the way, I installed an application that was a system optimizer and it ran and munged things up.  Then I found root and just waited for the time to wipe and reinstall.  This day arrived on Thursday and I started by rooting and installing a custom recovery partition.  Then I found an ADB command to turn off the write protection in the boot loader thus making the system partition writeable when booting a custom ROM.  Next I downloaded nandroid backups of the factory ROMs for this device and placed them all on the SD card.

Meanwhile, I had already used the recovery program to factory reset the phone and had installed and added most of the APPs that I regularly use.  I made a nandroid backup before I wiped and then again once I had everything perfect.  I then proceeded to install the CM 31.1 nightly that I found on an Android Nerd Website, Android Authority, I think.  There is that moment when you flash a ROM and reboot when it's finished and your heart seems to stop beating as the boot-up process begins.  I find myself holding my breath until I see the Android desktop.  Everything seemed to work fine and I immediately set about flashing the proper Gapps from Open Gapps.  There are multiple packages based on what you want to install and I screwed up multiple times which meant I had to re-flash the ROM to ensure it was all installed properly. 

Somehow, the permissions did not get set properly and that seemed to be a habitual problem as a total re-flash didn't fix the problem. So, with the help of Google and the million member Android Army, which is where I found all of the information to do everything I have described here, I slowly found out how to resolve each pop-up error about a Google service failing that prevented me from using the device or doing anything else but clicking on the OK button.  There was a video on YouTube of another user with the same problem on another device and his fix was to painstakingly fight to bring up the Android Settings and then Applications and then locate each offending application and give the proper permissions.  Needless to say, this took a while and when I was done, Android 6.0 is so much nicer then the 4.4.4-Kit-Kat that I had been using that it was rewarding to have successfully fixed the permission issue even though it was frustrating.

Everything seemed to work but the LTE wireless data and the 3G and 2G data seemed spotty at best as did cellular calling.  Remember I did most of my setup over Starbucks Wi-Fi and my home Wi-Fi and not Carrier data.  Googling the issue indicated the problem stemmed from the Radio ROM I was using so, I downloaded the correct radio.  Further research indicated it was more then just the radio, so I downloaded a ROM that flashed all of the necessary changes to make the radios work properly with CyanogenMod and AOSP based ROMs.  On first reboot everything appeared to work as I wanted.

Now, it may sound like all of this was trivial, it wasn't and required a significant investment of time to read forum posts and get to the correct solutions.  Then add in my relative n00b status in Android hacking and the time compounds exponentially.  My Google contacts weren't syncing and that took a bit of time and effort to get working properly.  Then add to that the problem didn't go away until I rebooted my device and only then did everything seem to work properly.  Flashing the proper modem files was a nightmare as every copy failed the signature check and only through Google did I find that this was because they couldn't be signed.  Turned off the signature check and crossed my fingers and flashed.  When it rebooted and appeared to resolve the problems, I took a deep breath.

So, why did I do this?  I like the idea of a pure Android phone and my next device will be as close to pure Android as possible because that increases the likelihood of frequent updates and almost guaranteed compatibility with the next version of Android.  Nexus devices are pure Android with the addition of Google's applications for accessing their services.  Motorola offers a purer version as well and ultimately even if the manufacturer doesn't make an update available, as I have shown with the ZTE Z-Max, the community will step in and do it on it's own.

Updates are important and Apple has one of the next track records in this regard, with ensuring that older devices receive updates for a guaranteed period of time and security patches for even longer.  I bought a phone for my wife from Motorola back around the time of the first Galaxy Note, the N-7000 and it never got an updated that I could find even though it was a business class device with a fingerprint reader.  We just recently replaced it with a Blu device purchased from Best Buy because she had a gift card.  Her Motorola device was acting peculiar because of the heat and most of the developers had stopped supporting her version of Android including her browser.  So, she had to upgrade to continue to use the device for anything more then a dumb phone with an iPod built on.

This is scary on multiple levels because it forces people to upgrade in order to continue using the device the same way they always have.  It is also scary because there have been major security flaws in Android that have been discovered that were never patched.  Imagine if a defect was found in a modern car and the manufacturer didn't issue a recall or tell anyone who had purchased one from then new?  When it was discovered, there would be a Senate enquiry to find out the details of who, what, when, where, how and why.  This is becoming more of an issue as more and more personal data is contained on devices and users begin to use them for more and more purposes in their daily lives.

Now that everything is working properly, I am going to slowly begin blogging about each application I install and use regularly along with why I use them.  I am doing this as a guide for some of my friends who are less technical, to help them be able to make the move from a proprietary version of Android like that produced by Samsung or HTC where their overlays often delay and or prevent the release of updates for devices.  One of my primary functions is to show how security can be implemented in a manner that adds to and enhances the existing security.