Mastodon IzzyOnDroid


Say thanks!
↓ Your product here? ↓
Das Inoffizielle Android-HandbuchAndroid kennenlernen, Tipps & TricksDas Inoffizielle Android-Handbuch
Android kennenlernen, Tipps & Tricks
Buy at Amazon for EUR 16,99
Das Inoffizielle Android SystemhandbuchTiefer ins System einsteigenDas Inoffizielle Android Systemhandbuch
Tiefer ins System einsteigen
Buy at Amazon for EUR 7,00
Die besten Android-AppsDen Androiden austattenDie besten Android-Apps
Den Androiden austatten
Buy at Amazon for EUR 5,00
 
dehelp

Android without Google 5: Free your Droid!

Free Droid
Free your Droid
© IzzyOnDroid (CC-BY-NC-SA)

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:

Started before this series, but clearly belonging here:

Root

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.

Installation instructions

  1. Boot to Recovery (e.g. with adb reboot recovery)
  2. Wipe everything: Cache, system, Dalvik
  3. Just to be safe: From the “partition menu”, also format /system and /data
    (in my case, somehow the old GApps survived without that)
  4. Install update from SD: CM 9.1 - buzz.zip
    (the custom ROM – file name will certainly be different for you)
  5. Install update from SD: mapsapi.flashable.zip
    (failed for me, alternative below)
  6. 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")
  7. Reboot to Recovery again
  8. Go to “partition menu” → “Mount /system
  9. 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):

  1. “partition menu” → “Unmount /system
  2. back to main menu, select “advanced” → Wipe Dalvik
    (required for Blankstore at least when original Playstore was installed before, but cannot hurt otherwise either)
  3. Reboot

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):

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.

F-Droid

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).

FreeYourAndroid.org
FreeYourAndroid.org Sticker
© Iwan Gabovitch (CC-BY)
Source: Flickr

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).

Done!

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.

appshowto


  1. At Android.SE you can find an index with possible solutions for quite some devices: How do I root my Android device? ↩︎

  2. there are devices where no compatible custom recovery exists – in which case you’re out of luck. ↩︎

  3. for possible sources, you can e.g. see Where can I find stock or custom ROMs for my Android device? at Stack Exchange ↩︎

  4. There’s a thread at XDA-Developers discussing them, offering downloads, and giving advice. The code itself is hosted at Github. ↩︎

  5. Details on that you can find in the file lacells-1.0.0.zip in the Download area↩︎

  6. The Free Software Foundation Europe (FSFE) on its site has a few pages dedicated to that ↩︎

2014-08-25