Installing CyanogenMod 13 on a Moto X Pure Edition smartphone

I decided to take the plunge and install CyanogenMod 13 on my Motorola Moto X Pure Edition when I saw that it had now been added to the list of officially supported devices on the CyanogenMod website.

I followed the instructions to first install atb and fastboot on my PC. Since I use Debian 8 (Jessie), this part was easy:

# apt-get install android-tools-adb android-tools-fastboot

Then, I went to the Settings > About Phone on my Moto X and tapped the Build number 7 times in a row to make the Developer options visible.

Coming from the Linux world I find this kind of secrecy to be bizarre. In Linux, everything is open and above-board and nothing is deliberately hidden in a way that a normal person couldn’t find it if looking. Nobody would ever find this secret 7 tap maneuver if they didn’t have the instructions. This is just one more reason why I don’t want to be under the thumb of corporations who believe that it is their duty to protect me from myself. I also don’t fancy using an operating system which is deliberately designed to dump as much of my personal information into Google’s gaping maw as possible.

Once the Developer options were visible, I was able to enable USB debugging and OEM Unlock. Yippee!

Then, I connected a USB cable between my Linux PC and Android phone, so that I could use fastboot, but my Linux desktop started going crazy. Every 30 seconds a new window would popup on the screen with an error message like:

Unable to open MTP device ‘[usb:001,023]’

Where the second number would increment by one from the last annoying error message. Soon my screen was covered with these alarming messages. In my Android phone, 2 notifications would appear for a second about USB debug mode and setting to charge mode when the USB cable is connected. Normally the two notifications would disappear before I could open them. Sometimes, I was able to change from Charge Mode to MTP Mode to be able to mount files, but then it kept getting reset back to Charge Mode after I closed the window. My PC was able to see the Android device, but never able to mount its file system.

After fiddling with it for a while, I figured out that USB debugging was causing the problem, but I needed to have USB debugging in order to send commands from my PC to the Android phone over the USB cable. Hunting on the internet, I found this bug report describing a similar problem. One of the commenters said that killing gvfs would fix the problem, so I tried it:

$ killall gvfs-gphoto2-volume-monitor
$ killall gvfs-mtp-volume-monitor

After that, the annoying error messages stopped appearing on the screen, but Linux was not able to mount the file system from the Android device. Still, it worked for my purposes, since I was now able to use USB debugging and send commands to the device using adb. I issued the command in Linux to restart the phone in fastboot mode:

 adb reboot bootloader

Then, once it was in fastboot mode, I issued the command to obtain my bootloader unlock code:

fastboot oem get_unlock_data

Then, I went to the Motorola Bootloader Unlock website and followed the instructions to unlock the bootloader on my Moto X Pure Edition. Motorola presents me with all sorts of scary warnings about how unlocking the bootloader will void the warranty and cause the sky to fall on my head:

  • You will lose all media and content on your device and will need to reinstall all applications downloaded from Google Play.
  • Applications may not work anymore.
  • You may lose encryption support.
  • You may lose some key functions like telephone, radio, and audio playback.
  • You could cause permanent/physical damage to your device.

Then just to make extra sure that I got the message, the warnings continued:

  • Unlocking your bootloader is not for the faint of heart. Unlocking your device and installing your own software might cause the device to stop working, disable important features and functionality, and even make the device unsafe to the point of causing you harm. Neither Motorola, nor your wireless carrier or retailer from whom you purchased the device, will be responsible for such damage, so please do not unlock or load any software unless you know what you are doing.
  • You have only yourself to blame. Unless you have a Developer Edition device, once you get the unlock code, your device is no longer covered by the Motorola warranty; in other words, please don’t blame us if things go wrong, even if they appear unrelated to unlocking the bootloader.
  • The law still applies. You still need to operate your device in compliance with all applicable laws, rules and regulations prescribed by the FCC, and any other governmental agency for that matter. Your wireless carrier may prohibit unlocked devices from operating on their network.
  • And now a word from our lawyers. Finally, in order to unlock your device, you need to agree to important legal terms, which can be found on the next page. Agreeing creates a binding legal agreement, so be sure to read them carefully.Still undaunted? If you are ready to accept all the implications of unlocking the bootloader, which -except for Developer Edition devices- includes completely voiding your device’s warranty, then let’s get started.

NOTE: You will be asked to sign up/register for My Moto Care to continue on.

You would think that I was agreeing to kill someone’s baby from the number of warnings I received. Then I had to agree to a whole page of legalese which I blithely ignored when I continued to the next page. Then, I had to create an account at the Motorola website and give them my email address, just to make extra sure that they not only know which device no longer has a warranty, but who owns that device.

At that point, I discovered that CyanogenMod 13 still wasn’t considered stable for my phone and only nightly builds were available. I had assumed that if it appeared on the list in the CyanogenMod web site, that a stable version was available. Since I had already downloaded half of the 472MB build file and already voided my warranty, I decided that I might as well keep going.

Some people might consider the loss of a warranty to be a huge risk, but the modern smartphone has very few points of failure which would be covered by a warranty. Although my Moto X Pure Edition contains roughly 2 billion transistors, which is as many as the standard PC, and has a higher screen resolution than most monitors and laptop screens, it is much less prone to failure than a PC. The Moto X Pure Edition contains almost no moving parts, aside from the Power and Volume Up/Down buttons. The three Android buttons are built into the screen and the case is water resistant. In comparison, my laptop has a spinning harddrive and an optical drive whose delicate stepper motors can fail over time. It has two hinges, a cooling fan, 105 keys on its keyboard, 3 mouse keys and a touchpad that can break.

Since I fix my laptops, rather than just junking them when they break, I have replaced broken CPU fans, harddrives, optical drives, keyboards, florescent bulbs in the screen and power adapters. I have also seen the power cord break at the plug, the touchpad stop working and the ethernet port stop functioning (because its wire connectors got bent). My laptop has 10 ports or plugs that can fail, whereas most smartphones just have a 3.5mm audio jack and a microUSB port.

There is the possibility that a smartphone is poorly designed, so it will fail over time. For example, Apple designed its iPhone 6 and 6 Plus to be as thin as possible, so its case can be bent under pressure. Since Apple didn’t bother putting any underfill between its ball grid array (BGA) solder joints on its IC Touch chip, its solder joints are less resistant to flexing and cracking. Apple made the doubly bad decision of placing that chip on a circuit board that bends under pressure, so many iPhone 6s have developed the “touch disease,” which causes the touchscreen to start failing and eventually die.

I have often questioned why any sane person would buy a device from a company like Apple, which purposely designs their electronics to be unfixable black boxes based on planned obsolescence. Unfortunately most of the electronics industry is now following Apple’s lead in designing unopenable cases with non-standard screws, non-removable batteries, RAM and NAND Flash memory soldered to the motherboard, and lack of expandable memory, so that electronics will be junked rather than fixed or upgraded to extend its lifespan. However, it is very rare that a smartphone will be badly designed so that it will fail over time like the iPhone 6.

The vast majority of manufacturing defects are either caught by testing at the factory or are noticed within the first couple weeks of owning a phone. After that, it is very unlikely that a smartphone will fail due to manufacturing defects within the first year of ownership. Statistics from SquareTrade, which offers extended warranties for smartphones, shows that the vast majority of failures in smartphones are caused by accidents such as dropping the phone on a hard surface or dunking it in water, which aren’t covered by the manufacturer’s warranty. SquareTrade reports that the iPhone 4 has a malfunction rate of 2.1% within the first 12 months, but it has an accident rate 13.8% over the same time period. Over 80% of iPhone 4 accidents come from drops and SquareTrade reports that the iPhone 4 is 68% more likely to suffer accidental damage than the iPhone 3gs and 82% more likely to crack its screen than the iPhone 3gs.

Although this study was conducted 6 years ago, its findings are significant, because the iPhone 4 was the thinnest smartphone in the world in 2010 and one of the first phone’s whose front was entirely covered with glass. Today, most smartphones are designed like the iPhone to be as thin as possible, so they are easily bent, and covered in glass, so their screens are often shattered by a fall. A 2014 survey by SquareTrade found that 26% of iPhone users reported that they had broken their screens, so more recent iPhones suffer the same problems.

Loosing Motorola’s one year warranty on my phone represents a minuscule risk after the initial weeks where most manufacturing defects will be noticed. I have seen the Volume Up/Down button break and the solder joints crack on a microUSB port, but this kind of damage usually occurs after years of usage, so the one year manufacturer’s warranty offers little protection.

Once I installed CyanogenMod and rebooted, I was greeted by an alarming warning screen by Motorola telling me that my phone might be at risk because the bootloader had been changed. First Motorola takes away my warranty and now it subjects me to all sorts of frightening messages. I understand why some message should be displayed to alert the user of a modified bootloader, but it should be understated and respect the choices of the owner of the phone. It shouldn’t blare in my face every time I reboot the phone like I am some sort of criminal for installing an OS that does not come from Motorola. Yes, some message should be displayed to let people know that the bootloader has been modified, but it is a poor security feature, since anyone who is has hacked your phone by replacing the bootloader is probably smart enough to also replace the splash screen to not show Motorola’s warning message. In any case, the vast majority of bootloaders which are replaced are done purposely by the owner, so the alarming messaging from Motorola is a needless aggravation. It so annoyed me to see that warning screen, that I followed DroidView’s instructions on how to restore Motorola’s default splash screen, but I will probably overwrite it with my own custom bootup graphic in the future so I don’t have to stare at Motorola’s corporate logo every time I bootup my phone.

CyanogenMod 13 is a lovely adaption of Google’s Android Open Source Project 6.0. The ability to customize the interface in CyanogenMod is wonderful for tinkers like me, and the fact that Google is no longer collecting data about me is truly liberating. I manually installed the F-Droid repository, which only has open source software and explicitly tells me the license of every app, unlike Google’s Play Store, which only tells me if something is free in price, rather than free as in free speech. Unfortunately, the app I helped create, SimiDic, is not in F-Droid. I can install our app manually, but I often need to demonstrate how to install it to other people, so I decided to install the pico version of opengapps, which only includes Google’s Play Store.

Once I had the Play Store available, I found that I could not resist installing WhatsApp and Skype, because so many of my acquaintances use them, so now both Facebook and Microsoft are collecting data about me, as well as the NSA. I am working to convert my friends to Signal, but it has been an uphill battle so far.

The only inconvenience I have encountered is the low volume on the microphone. People who I call complain that they have trouble hearing my voice. I’m not sure if I have fully fixed this, but I tried to switch from using the front and back microphones with noise cancellation to just the front microphone without noise cancellation, which is reported to fix the problem.

I connected the phone to my Debian laptop with a USB cable and issued the following commands:

$ adb devices
$ adb root
$ adb shell
# mount -o rw,remount,rw /system
# nano /system/build.prop

Note: The nano editor was previous installed with the termux app, by issuing the command:

apt install nano

In the build.prop file, I changed the line:

ro.qc.sdk.audio.fluencetype=fluence

To:

ro.qc.sdk.audio.fluencetype=none

Some people also report that microphone needs to be switched in the /system/etc/audio_platform_info.xml file, but it seems that the Moto X Pure is already using the front microphone. There are a number of other suggestions on the internet about editing the values in the /system/etc/mixer_paths.xml file to increase the microphone gain. I fiddled with some of the mixer values, but haven’t figured out anything that sets the microphone to the same level as in Motorola’s OS.

As much as I advocate for computing liberty and promote free and open source software (FOSS), I realize that installing CyanogenMod is not for everyone. Most people would be deterred by the risk of loosing their warranty and the hassle of fiddling with configuration files. Just figuring out how to install adb and fastboot are beyond the technical ability of many, and the vast majority would regard the potential loss of functionality in their phones to be unacceptable.

In my case, the camera probably does not work as well since it doesn’t have Motorola’s software to process the images, but I am gaining the ability to manually change many of the camera’s settings, which Motorola’s software does not allow. Using Motorola’s stock build and the most popular apps (Google Apps, Facebook, WhatsApp, Youtube, AngryBirds, etc.) is the far easier course, but it also plugs me into a system where everything I do is tracked and monetized by some company. Once my data is collected in corporate databases, it becomes a convenient target for governments who want to monitor the actions of citizens.

Individually my act of defiance by installing an operating system that I control may not make much difference, but each person who takes control over the technology helps create an example for others to follow. The presence of a growing and viable alternative forces the ICT industry to treat everyone better. Companies like Google, Facebook, Microsoft, Verizon (who now owns Yahoo!), Lenovo (who now owns Motorola), and Huawei (ties to the Chinese government) know that there is an alternative that people can turn to if the mining of our personal data and surveillance becomes too abusive and intrusive, so there are checks on their bad practices. In the same way that the small, but vibrant, community of Linux and BSD users helped check abusive practices from Microsoft and Apple, the community of smartphone modders helps curb potential abuses by smartphone manufacturers and app providers, because they know there is a viable alternative.

I am loosing convenience of a preconfigured device for the freedom to play with my hardware, but on a larger level I am gaining the ability to control the technology and not be subjected to the control of any one company. Since ITC technology increasing defines what we can do, what we create and how we express ourselves, it is vitally important that we control it, rather than letting it control us.

This control has benefits beyond our personal empowerment. Once I no longer depend on Motorola to provide me with updates to the operating system, I am freed from the planned obsolescence currently being promoted by the smartphone industry. Most phones will only receive one or two major updates to the operating system before the manufacturer stops supporting them, but I can now keep upgrading my smartphone to Google’s latest operating system as long as there is an active community of modders supporting my phone.

Unfortunately, there are serious limits to our technological independence, because we are dependent upon the corporate decisions of Google about its operating system. Google has decided that only smartphones that support OpenGL ES 3.1 or Vulkan 1.0 will be allowed to run Android 7 (Nougat). Google decided that apps in Android 7 should have guaranteed access to the latest graphics capabilities, which means none of the Snapdragon 800 and 801 phones produced in the 2014 like the Nexus 5 and the Sony Xperia Z3 can be upgraded to the latest version of Android. A Snapdragon 801 processor is certainly capable of running Android 7, as is evident from the fact beta versions of Android 7 were released for the Xperia Z3.

Google can force every smartphone manufacturer to comply with this decision, because every manufacturer needs access to Google’s proprietary Play Services and its proprietary apps, such as Chrome, Play Store, Gmail, Maps, YouTube, Contact Sync, Drive, Google Keyboard, Google+, Hangouts, Calendar, Play Music, Photos, Search, Now, etc. To get all these goodies, which would be very costly to obtain elsewhere, they have to comply with the Android Compatibility Test Suite (CTS) and Android Compatibility Definition. Plus, most smartphone manufacturers are members of the Open Handset Alliance, which means that they have already promised not to produce any devices which use forked versions of Android, like Amazon’s Fire OS, Blackberry’s PrivatOS, Alibaba’s Alyiun OS or Baidu Yi. At any rate, every manufacturer wants to be the good graces of Google, so that Google engineers will answer their technical questions about implementing Android on their hardware and Google will consider partnering with them to produce its next Nexus device.

For most people, who bought a phone in 2014 or earlier, the only way to get the new features in Android 7, like quicker multi-tasking, multi-windows and drag-and-drop, is to junk their current phone and buy a new one. At this point, it is unclear whether CyanogenMod and other custom mods will figure out how to run the Android Open Source Platform 7 on Snapdragon 800 and 801 devices, but at least we have the opportunity to try and resist planned obsolescence. Of the 1.5 billion smartphones which will be produced this year around the globe, most of them will be junked within two years.

Life cycle assessment studies show that the majority of the environmental impact of smartphones lies in their initial fabrication, rather than the energy to operate the phone. If we guesstimate that the average smartphone and its charger weighs 150 grams and its manufacture emits roughly 100 kg of CO2-equivalent, then this year’s global production by the smartphone industry will generate 225,000 metric tons of e-waste and 150,000 metric tons of CO2-e. Being able upgrade the software in smartphones and thus extend their lifespans will help reduce the frequency that new smartphones are manufactured and lower their total environmental impact.

In this context, installing CyanogenMod is not simply the geeky whim to fiddle with the software on my phone, but part of a larger struggle for digital rights, personal privacy, freedom from surveillance and environmental sustainability. Maybe figuring out how to install CyanogenMod on my phone isn’t such a bad way to pass a Saturday afternoon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s