Moto G - Switch from CyanogenMod to Stock ROM and remove bloatware
This article assume a certain knowledge of Android.
The reader is considered to have a certain knowledge, especially about the usage of adb
and fastboot
.
Be warned that it’s possible to brick your device by following these instructions
Introduction
For the past 4 years I was a happy CyanogenMod (CM) user. Installing CM was the first thing I did on my new Moto G. But after using it for ~ 3 months, I was very disappointed. The performance and stability was not was I expected. And the current maintainer of the CM version for the Moto G doesn’t seem to be very active, e.g. the latest snapshot release is still M6. So I decided to switch back to the stock ROM, knowing that Motorola’s Android is pretty close to the vanilla version and not heavily uglified like Samsung’s Android.
Installing the stock ROM on the Moto G
Installing the stock ROM comes down to 1. downloading the stock ROM from http://sbf.droid-developers.org/phone.php?device=14 and 2. using fastboot to flash the ROM parts on the device.
I used RETAIL-DE_FALCON_KLB20.9-1.10-1.9.1_cid7_CFC_1FF_v8.xml.zip
for my German Moto G and executed the following commands after entering the recovery via adb reboot recovery
:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
I always experience some device having problems receiving the flash data when they are in recovery mode and connected over an USB hub. If get error reports from fastboot
, try connecting your Android device directly to your PC, i.e.. without intermediate USB hub.
Pros and Cons
After running the stock ROMs for a while, I noticed that there are some CyanogenMod features I miss:
Cons
- No landscape rotation when locked
That’s something really annoying when you have a car dock in landscape mode. Now I have to enter my PIN/unlock pattern in portrait mode, even if the phone is in the car dock in landscape. But it appears to be fixable by setting an Android ‘prop’
- No indication that there is GSM (Mobile)/WiFi traffic
I never understood why Google removed that from Android. I really miss it, just like I would miss the good old HDD LED, as it provides an easy mechanism to determine if there is still something going on or if the connection doesn’t provide any data.
- No flashlight tile in the quick settings
Often very handy and the reason no one needs an flashlight App on CM
- No WiFi-Tether tile in the quick settings
Also a nice quick tile CM provides, but I can live without as Toggles Pebble user.
Pros
- Stable system, the logcat output looks now very clean compared to how it was with CM
- Trusted Bluetooth devices
But the stock ROM comes with a bunch of Motorola bloatware. It appears to be less bloatware that is usually shipped with e.g. Samsung devices, but includes some long running services that consume precious RAM. So let’s remove or disable those Apps we don’t use.
Removing Bloatware from the Moto G
First Step: Root the Moto G stock ROM
Rooting is possible thanks to Motorola providing the ability to unlock the Bootloader, which allows us to install a custom recovery, which again allows us to root the stock ROM.
- Unlock the Bootloader
- Flash CWM Recovery as described in http://wiki.cyanogenmod.org/w/Install_CM_for_falcon
- Download SuperSU: http://forum.xda-developers.com/showthread.php?t=1538053 Ignore Chainfire’s statement which says “SuperSU requires a rooted device”, what he really means is that SuperSU requires a custom recovery/unlocked bootloader
- Boot into recovery, select
install zip
→install zip from sideload
and install the SuperSU, e.g. viaadb sideload UPDATE-SuperSu-v2.02.zip
. - When rebooting, select
Yes - Fix root (/system/xbin/su)
Note that some versions of CWM recovery use Vol-Down
for scrolling the menu items and Vol-Up
for selecting a menu item!
Look at the help text on the bottom of CWM recovery.
Second Step: Remove and disable the bloatware of the Moto G
Android provides two mechanisms to get rid of bloatware: 1. You can uninstall it and 2. you can disable it. I decided to uninstall some apps and disable some others, as it’s dangerous to uninstall bloatware which is installed as system app because of unknown side-effects that could affect the systems stability or even ability to boot. Disabling packages has the advantage that those packages can be easily re-enabled. The only disadvantage compared to uninstalling them is that they still consume storage.
List of app packages I uninstalled:
- HP Print Service:
com.hp.android.printservice
- Motorola Alert:
com.motorola.bodyguard
- Motorola Migrate:
com.motorola.migrate
In order to uninstall a package run;
adb shell
su
pm uninstall <package>
e.g. pm uninstall com.hp.android.printservice
List of packages I disabled:
- MotorolaOTA:
com.motorola.ccc.ota
- Motorola Service Main:
com.motorola.ccc.main
- Motorola Services:
com.motorola.ccc.cce
- Motorola Checking:
com.motorola.ccc.checkin
- Motorola Care:
com.motorola.motocare
- Motorola Care Int:
com.motorola.motocare.internal
- Motorola Device Management:
com.motorola.ccc.devicemanagement
In order to disable a package (Titanium Backup term here is “freeze”) run:
adb shell
su
pm disable <package>
e.g. pm uninstall com.motorola.ccc.ota