De-Google My Life
Ever wanted a lightweight version of Android that doesn’t rely on Google services? Welcome to the world of Android OS Mods!
The following documentation is derived from and based on the following guide. Make sure to download the Cyanogen 12.1 nightly build file and the TWRP (Team Win Recovery Project) file : https://cyanogenmodroms.com/grouper/
The tablet I am working with is the Asus/Google Nexus 7 tablet from 2012 (internal codename “grouper”). This tablet actually has a large online support base and seems to be a common choice for restorations and mods.
My OS of choice is CyanogenMod as despite being out of support, there is great documentation, and the OS + kernel are both available on Github.
This project can be done on any operating system, but for this iteration I have elected to use Windows.
Software Requirements for Windows:
SDK Platform Tools - https://developer.android.com/tools/releases/platform-tools
Google USB Driver - https://developer.android.com/studio/run/win-usb
The key components of this project are ADB (Android Debugging Bridge) and fastboot which are used for file transfer and system control.
Hardware Setup:
You can easily pry the plastic back off the tablet off of the device and expose the internals.
When restoring one of these tablets that has been in storage for a while, it is necessary to ‘jump-start’ the battery as the charge circuit in the tablet does not work when the battery has been dead for too long. To do this, I cut a USB cable and attached the power and ground lines directly into each cell of the battery, using a 5V 2A power brick.
There is a power and ground for each of the cells, with the outermost ones belonging to a single cell, and the innermost ones belonging to the other. Once I measured over 3.3V from both cells of the battery, I plugged the battery connector back into the tablet and the display turned on while charging over USB Micro-B (this voltage was determined through trial and error).
Now, with a working tablet, the custom OS installation can begin!
Go into device settings and enable developer mode (tap the build number in about device ~7 times).
Now you can go to developer mode and enable USB Debugging. Connect the tablet to your computer and if you have added the Android toolchain to your PATH, then type “adb devices” in a terminal. Otherwise, enter the download folder and run “.\adb.exe devices” instead. This will list the ADB-supported devices connected to your computer.
If this does not work (mostly on Windows), enter device manager and install the Google USB driver to the android device with a yellow warning sign next to it in the list view.
Run “adb reboot bootloader” to enter the device bootloader, which is what is responsible for booting device operating systems. In this mode, Use the volume keys to scroll through ooptons and power button to select them.
Now “fastboot oem unlock” to unlock the bootloader for user modification.
Once the device has restarted, run reboot to the bootloader through adb again. This time use the Android SDK took “fastboot”, and run (depending on PATH config and directory location) “fastboot devices” or “.\fastboot.exe devices” to list all of the fastboot-compatible devices. This only works when you are in the bootloader.
TWRP is a custom recovery used for installing custom software on your device. It is FOSS (Free and Open Source), which matches a theme of this project in the first place. Flash this to your device using “fastboot flash recovery your_recovery_image.img”.
Once this has completed, boot to system recovery mode by holding Volume Up, Volume Down, & the Power button at the same time until the screen comes on. This will boot into TWRP
From here, push the CyanogenMod zip file to tablet storage using “adb push filename.zip /sdcard/”.
sdcard refers to the internal storage of the device in this case, not an external storage device.
Wipe the device using wipe -> slide to confirm, and then go to install -> zip file -> slide to confirm without selecting any additional install options.
Once the operation has been completed, reboot, and now the new OS should be installed, as seen below:
Now that the OS installed, new applications can be downloaded. To do this without using Google Play Services, F-Droid is a good alternative: https://f-droid.org/
F-Droid is an installable catalogue of FOSS applications for the Android platform. While the applications aren’t exactly anything mainstream, there is an application for most needs. Plus, battery life is generally better when there are few services running in the background (unlike Android or Windows …).
Install the APK for Android 5.1 here https://f-droid.org/docs/Running_on_old_Android_versions/ as the newest version is not supported by this version of CyanogenMod.
Like earlier, we can push this APK file to the tablet storage from our laptops using “adb push filename.zip /sdcard/”.
However, this time you should install to the “downloads” folder (sdcard/Downloads)
as the APK file needs to be installed locally on the tablet.
Next, go to the files application on the tablet and select the APK -> install. You may need to enable installation from unknown sources in settings.
Now, we have a tablet with an open source operating system running an open source store for installing open source apps!