It's that time of year again - the Android fairy has sprinkled its dust across Nexus devices around the world, and Android M (6.0) is here! Alas though, with every new version of Android, the deep level of integration with Google services has increased.

While, for the most part, Google are good at keeping their AOSP APIs open (see this post by Dianne Hackborn for an example of some of the discussion about separation of Google and AOSP), there are always some people (like myself) who'd rather minimise the risk of a device being in contact with external services, and who prefer to keep Google out of their device.

Nonetheless, with M being here, there will undoubtedly be a few people trying out M, who would like to learn more about some of the ways to protect themselves, and most of this guide can apply to other software as well, so it also serves as an introduction to managing permissions and data on Marshmallow, and some of the quirks of how the new user interfaces work.

For most people, the idea of running Android without Google services is unthinkable, but it can actually be quite refreshing and liberating

This guide is based on a Nexus 7 (2013) device, so beware that some things may be different on other devices. Most notably, you may require a no-verity kernel on devices that use hardware encryption, since it appears those are shipping with dm-verity enabled. For more about what this means, check out this portal article.

Getting Started

Note that the "Skip" option is disabled
Note that the "Skip" option is disabled

The first thing you'll encounter on Android Marshmallow, after a (for me at least) ridiculously long boot-up (dear Google, please make images using WITH_DEXPREOPT), and a sparse welcome screen, is the requirement to log onto WiFi. Unfortunately though, there's no option to skip this, at least by default. One can only presume this is an attempt to carry out a reactivation lock check (for anti-theft reasons). Nonetheless, it's certainly possible you might want to set up a tablet while you don't have internet access, or might simply not want Google to "phone home". In this case, you'll want to bypass this. Boot into TWRP (or a similar custom recovery, offering a root shell), and mount /system (note, doing this will stop a device booting if it enforces dm-verity).

From there, run the following command, which will remove the connectivity requirement from the setup wizard:

sed -i 's/ro.setupwizard.network_required=true/ro.setupwizard.network_required=false/g' /system/build.prop

This changes the line requiring a network during setup, such that no network is required. While you're here, you may also want to prevent the system from overwriting your custom recovery with the stock one. To do this, simply rename the file /system/recovery-from-boot.sh to something else, like /system/recovery-from-boot.disabled:

mv /system/recovery-from-boot.sh /system/recovery-from-boot.disabled

At this point, you'll be met by the glorious launcher. Full of Google software! But hey, that's what this article is for, so let's get stuck in! You don't need to go online until the very end of this process, unless you want to. Just for the truly paranoid!

Lots of Googly bits on the stock launcher - let's get started!
Lots of Googly bits on the stock launcher - let's get started!

Android Device Manager

By default, Google enables the Android Device Manager feature. If you're following this guide, you'll want rid of that (it has Device Admin privileges) - head over to Settings > Security, Device Administrators, and uncheck the box.

Now on Tap (Assist API)

A new feature of Android 6.0 is the "assist" API, designed for personal assistant style apps (Google Now, Cortana etc) to get access to whatever is on your screen, for the purpose of offering context-sensitive suggestions. When you invoke the assist feature (by holding down the home button), the selected app will receive the contents of the current screen, unless the app being shown opts out. There's more information available in the API release notes. Anyway, since we're here to remove anything Google, and get a stock Nexus image pared back to as minimal an install as possible, it's time to disable this.

Here you can select the assist app you want to use (or none)
Here you can select the assist app you want to use (or none)

Fortunately, Google has added a control for the Assist API feature. It's available at Settings > Apps > Cog (top right) > Default Apps > Assist & Voice Input. It's not easy to discover, and a cynic would argue this is perhaps deliberate, to make it hard to find or disable. But once you get there, you can tap "Assist App" (not the part with the cog), and you'll be able to select "None". You can also choose what access an Assist app has, if you want to leave one activated here.

To take a critical angle on this, it certainly seems like the use of the no-entry sign on "None" is potentially designed to subtly discourage you from selecting it. That's probably fair enough for end users, but fear not dear reader, your phone or tablet won't implode by picking this. You can also enable it again in future if you wish to.

Disabling Permissions

An overview of your apps' permissions on Android M
An overview of your apps' permissions on Android M

Android 6.0 offers a rather nifty feature to control the permissions used by apps on your device. It also works on system apps, although this is somewhat hidden from view. Let's head on over, and take a look at how to control the permissions in use by Google's software. Go to Settings > Apps > Cog (top right) > App Permissions. You'll see an overview of the various permissions in use by apps on your device.

From here, you can enter a category to see the applications with access to a given set of data. One thing to note though, is that what you see isn't the full story. Under the overflow menu is an option to show system applications. You'll want to use this every time you view this menu, if you care about the pre-installed apps on your phone.

 

See the apps using permissions, note the overflow menu option to see system apps
See the apps using permissions, note the overflow menu option to see system apps

Once you enable the system option, you'll get a better idea of what other apps have declared a permission (although not all will have them enabled initially). Notice here that Google Play Services has made an appearance, and is indeed enabled. You can go ahead and disable access to all these permissions, if you want. If you want to rid yourself of Google, it's probably wise to go ahead. Most can be removed, as we'll be disabling these apps entirely in a minute.

Google Services Framework has made an appearance
Google Play Services has made an appearance

Time to Disable

It's now time to go about disabling things you don't need. At this point, it might be a good idea to turn off device location (since anyone following this guide probably wants to have location disabled unless they choose otherwise) - the setting is in the usual place, either in the Settings menu, or in the pull-down quick settings area.

You can remove pretty much everything from Google on Marshmallow

If you head back to Settings > Apps, you can now start to look at disabling the Google software on the phone. This lets you get rid of most of the proprietary services added to your device before you got it. Again though, first things first! Go to the overflow menu, and ensure you tap "Show system", to stop the system hiding some of the more deeply entrenched parts of Google's services. At this point, we should give Google credit where they're due - while they do tangle their services tightly around the ROM (to the point they are potentially under investigation for anti-trust due to bundling), they do at least give you the option to get rid of them (disabling a package is pretty much the same as getting rid of it, as any bloatware-removal enthusiast will probably attest).

If you want rid of everything Google, I have tried to highlight anything you might want to remove. To remove an application, tap it on the list, and use the "disable" button in the next screen to banish it to the depths of the disabled app area. While you can do this in any order, I suggest doing it in this order, in case your get different behaviours (in testing for this article, I found some situations where you couldn't fully disable some parts of Google's core services, and I suspect this may be due to disabling those parts last). Note that you probably won't want to get rid of all these, but it's up to you - it's all about having the choice to do so, and making up your own mind.

App Name

Notes

Google Play Services

The core of Google's service offerings - getting rid of this will break apps using Play Services, but it's a good first step to fully banishing Google from your device

Google Services Framework

The twin brother of Google Play Services. If you're getting rid of one, get rid of both!

Calendar

Why use a "proprietary" Google calendar when there's an open source, near-identical one on F-Droid?

Camera

I'll leave this one up to you, although you should note that the shipped Camera might not be identical to the one in AOSP. If you care about software freedom and reproducibility, you might want to use the AOSP camera instead.

Chrome

A proprietary browser linked to Google's services - you might want to take a look at the open-source Firefox browser, or a source-built version of Chromium.

Cloud Print

I'd rather not print via the cloud - I assume likewise from anyone reading this.

Contacts

Hopefully someone will make a standalone version of the AOSP Contacts app, just like the Calendar one above.

Device Policy

It's got a Google icon in the middle of it! It looks to be related to applying enterprise policies to your device. You probably don't need this, and it's probably already disabled for you anyway by default

Docs

Want Google to see all your documents you edit? No, me neither. Disabled, and looking forward to progress on LibreOffice on Android.

Drive

Want to store all your files on Google's servers? Nah, didn't think so. Disabled, check out OwnCloud for an open alternative in terms of storage

Gmail

By this point, you probably get the idea - do you want your emails scanned by Google for profiling and advertising? Nope... Let's get rid of it - the stock email app (you'll need to compile it from AOSP now Google killed it off), or K9, both work fine for IMAP and Exchange mail (AOSP is better for this).

Google Account Manager

Well, by this point you won't need a Google account, right?

Google App

If you'd rather not have your device always listening, in case you happen to say "OK Google", or if you just generally don't like Google, get rid of this.

Google Backup Transport

If you've made it this far, there's no way you're going to be letting Google get their hands on your backups, so let's get rid of this!

Google Connectivity Services

Probably something to do with Fi? Anyway, in absence of a source repository, probably wise to get rid of it, if you care about running only open source software where possible.

Google Contacts Sync

Google don't need to know who you talk to - take a look at DavDroid for an open-source standards-compliant solution, allowing you to sync contacts with a self-hosted CardDav server like OwnCloud.

Google Keyboard

It contains some proprietary code for handling swiping, so you might want to install another keyboard and remove this.

Google One Time Init

If you aren't using Google, might as well get rid of it for cleanliness!

Google Partner Setup

No Google partners needed here!

Google Play *

If you don't want Google on your device, no point in leaving these. They all depend on the other Google services anyway

Google Text-to-speech engine

 You probably don't want to send text to Google to get it read back to you?

 Google+

By this point you get the idea. Anyone getting this extreme doesn't use social networks!

 Hangouts

 Well you won't be sending messages through Google's servers for them to mine, right? An open source alternative XMPP chat client is Conversations.

 Keep

 Keep your hands off our shopping lists, Google! Open source alternatives

 Maps

Well, you won't want anyone tracking you. There are plenty of nice open source mapping solutions out there.

 Market Feedback Agent

 No way are you using Play Store by this point, so no point in their feedback software running

 Photos

 These seem related to Google+ Photos service, and you won't want Google learning face recognition over your private photos.

 Print Spooler

 People actually print from their phones and tablets? Well, you probably disabled Cloud Print anyway!

 Sheets

 Spreadsheets via Google? No thanks

 Slides

 Presentations via Google? No thanks, check out something like Impress.JS, which can make HTML viewable slides

 Sound Search for Google Play

 No thanks, I'd rather not have you able to listen to what I hear

 YouTube

 You could always access YouTube via an open source web browser like Firefox, and use uBlock to prevent Google's tracking. Or you could look at open-source media platforms.

Congratulations if you made it to here. You've now got as much of a Google-free device as you can really get, without going and compiling AOSP from scratch.

Look Ma, no Google!
Look Ma, no Google!

In Closing

I suggest you take a look at F-Droid if you want to download software - F-Droid is a collection of open source software you can freely download, share, use, inspect, modify and learn from. Obviously this isn't for everyone - for most people, the idea of running Android without Google services is unthinkable, but it can actually be quite refreshing and liberating - if you're not too tied into Google services, you can get a perfectly serviceable phone with astounding battery life, while still having access to email, and other apps you need.

This article was designed to take a look at how separated Google services are from Android, and it's reassuring to note you can remove pretty much everything from Google on Marshmallow. Apart from the very first step (to stop the device using WiFi during setup), none of this required root.

Do you think you could manage without any Google services on your phone? Are you someone who removes Google services already? Let us know your thoughts in the comments below. Oh, and you can go and enable WiFi now, and stock up on some tinfoil supplies or get some Faraday pockets.