During this series, we dealt with a couple of details on “Android without Google”: Why to think about it, how to establish our “private/personal cloud”, how to get rid of bloatware, what alternatives do exist for several of the often pre-installed Google Apps. Now it’s time to put things together, and free our droids!
You’re probably a bit sceptical whether that can work out. And cautious to not lose the “operability” of your precious device. I can understand that, as I feel the same. Hence, for a proof-of-concept, I just re-activated my good old HTC Wildfire to find out. In this article, I will describe step-by-step what I did (and refer to the previous articles for details, where possible). If you have the same device, you should be able to follow it almost by the letter. A bit unlikely; so you might have to substitute at some places: picking a different ROM, or a different version of the one or other app. The picture to the right gives you a raw outline of the steps we need to perform (click it for a larger and better readable version of itself).
Android without Google:
- 1: Introduction
- 2: ownCloud
- 3: Getting rid of unwanted bloatware
- 4: App Replacements
- 5: Free your Droid!
- 5a: microG (update to NOGAPPS in part 5)
- 6: Self-Experiment (still running)
- 7: Where do I get my apps now?
Started before this series, but clearly belonging here:
A pre-condition for our goal is root access to the device – there’s no way around that, if we want to fully free our Droid. Actions required for this step might be device dependent, or have been so in the past1. This year brought us a surprise called Towelroot, which should work for all Android devices, at least up to Android 4.4.2 (for newer versions, the “loophole” might already have been closed). Grab it, install it, start it, hit the button – and you should be done.
Cleaning the device
For this, our graph above shows two paths: either stay with the stock ROM and get rid of the bloat (as described in part 3 of this series), or get rid of the stock ROM and install a custom recovery plus custom ROM. The first path will be a bit tricky, and involves a lot of manual work: you will have to identify all parts, and make sure there are no dependencies the manufacturers might have built upon. I’m not 100% sure if that way will be fully successful, so I decided for the other option.
First we need a custom recovery here. Depending on the device, there might be one solution available, multiple options existing, or none2. The two most popular custom recoveries are ClockworkMod (which is what is installed on my Wildfire) and TeamWin Recovery. As installation instructions pretty much depend on the device and recovery used, I skip that here. Same for the installation of a custom ROM afterwards: again, there might be different custom ROMs available for your device3. In my case the choice was CyanogenMod 9.1 – bringing the device, the official support ended with Android 2.2 already, to Android 4.0.4 as a side effect. Custom ROMs usually do not ship with Google Apps (which you have to install separately), so as a result we have our device cleaned.
Replacements for Google Services
A Google-free device also means several Google Service we took for granted are gone. Over most of them we won’t shed any crocodile tears, as exactly this was our goal. But instead of “network location”, our devices only know how to deal with GPS now. And of course, we no longer have access to the Playstore.
But luckily there’s an open source pendant not many of you might heard of yet: at XDA, you can find the NOGAPPS4 project. From there I’ve picked the
NetworkLocation.apk (including the hints on how to create my own up-to-date CellID database for cell-tower based location5), the Google Maps API (so apps depending on that will be working), and the
BlankStore.apk (for access to the Playstore). Full instructions below.
Using the BlankStore is an option for those who cannot live without the load of apps on Google Play. Everybody else can simply pick the
.apk files from F-Droid and Aptoide (downloadable via your web browser), to use those instead. Also included with my instructions below.
- Boot to Recovery (e.g. with
adb reboot recovery)
- Wipe everything: Cache, system, Dalvik
- Just to be safe: From the “partition menu”, also format
(in my case, somehow the old GApps survived without that)
- Install update from SD:
CM 9.1 - buzz.zip
(the custom ROM – file name will certainly be different for you)
- Install update from SD:
(failed for me, alternative below)
- Reboot once, go to Settings→Developer
- make sure USB Debugging is enabled (by default, it is)
- make sure root is enabled for ADB (by default, it is for "apps only")
- Reboot to Recovery again
- Go to “partition menu” → “Mount
- From the ADB connected computer, apply the following steps:
## Push our stuff and adjust permissions adb push NetworkLocation.apk /system/app/NetworkLocation.apk adb push BlankStore.apk /system/app/com.android.vending.apk adb shell "chmod 0644 /system/app/*.apk" # Only if flashing the MapsAPI failed above, unzip the archive, and apply the following steps: adb push system /system adb shell "chmod 0755 /system/addon.d/10-mapsapi.sh" adb shell "chmod 0644 /system/etc/permissions/com.google.android.maps.xml /system/framework/com.google.android.maps.jar" # Install the certificate to use with ownCloud and DavDroid. # This example again assumes `d123456` as the certificate hash: adb push d123456.0 /system/etc/security/cacerts/d123456.0 adb shell "chown root:root /system/etc/security/cacerts/d123456.0" adb shell "chmod 0644 /system/etc/security/cacerts/d123456a.0"
Finally, back on the Droid again (still showing the Recovery menu):
- “partition menu” → “Unmount
- back to main menu, select “advanced” → Wipe Dalvik
(required for Blankstore at least when original Playstore was installed before, but cannot hurt otherwise either)
Some adjustments to the settings
On the device, go to Settings and enable your WiFi. In Settings→Location services, you also might wish to enable ”Google’s location service” (I assume that’s for our
NetworkLocation.apk replacement now). Some additional settings you might wish to check (some of them might be specific to CyanogenMod):
- Developer options: scroll all the way down, tick “Kill app back button” (enables you to kill the foreground app by long-pressing the “back” button)
- In “Credential Storage”, select “Trusted credentials” and check whether your ownCloud certificate shows up (should be in the ”System” section)
- tick “Unknown sources”, as we will need that to be able installing apps from F-Droid and Aptoide
- Accounts & sync: You might wish to add your “BlankStore account” here to access the Playstore.
Apart from those: the usual stuff you‘ll need to do manually, as there probably was no “Welcome wizard” (which is part of the Google apps). Set your language, time zone, lock screen, etc.
If you downloaded the
.apk already, it now can easily be sideloaded:
adb install FDroid.apk (similarly for Aptoide if you wish:
adb install Aptoide.apk).
After starting F-Droid, we first need to update the repository: search etc. takes place locally on the device, so we need to download the corresponding data (think of APT on Linux, same principle). By default, the main repository is already activated; so simply hit the menu key, and select “Update Repos”. Wait until download and processing have finished. Now search and install DAVdroid, and whatever other apps you like (consider also installing KeypadMapper to support the OpenCellID project which now provides you with Google-free location).
You’re done – welcome to the world of really free Android! Unless you’re a heavy user of Google Now, there will not be much you are missing. If it is for some apps available on Google alone, you can either use the BlankStore – or have some other “Android slave” you’ve not yet freed downloading them, capture the
.apk files e.g. with AppMonster, and side-load it. Or keep buzzing the devs to make their apps available at one of the other stores: at least for apps coming at no charge, there should be no reason against that. If the dev hesitates, scan the QR-Code from this articles Teaser image to be led to a page giving you more arguments6.
there are devices where no compatible custom recovery exists – in which case you’re out of luck. ↩︎
for possible sources, you can e.g. see Where can I find stock or custom ROMs for my Android device? at Stack Exchange ↩︎