Archív značiek: MicroG

Howto degoogle your Android phone – Marián Mižik

https://mizik.eu/blog/howto-degoogle-your-android-phone/index.html

Howto degoogle your Android phone

There are many reasons to degoogle your phone and there are 2 main ways how to do it. The hardcore way and the second one, for the sake of this article, can be called the „gracefull degradation way“. Both of them end with your stock android OS replaced by a custom ROM that will lack all of the the Google apps and background services.

Why should I bother?

Degoogle is a process made of multiple steps which require some effort, maybe some money, but definitely time and attention. Degoogling your phone is no exception. You will have to get used to new apps, maybe mourn some nice features. You will be more incompatible with the mainstream people that will send you links to Google services and you wouldn't be able to log in, or use native app to handle the link. They will search for you on Messenger and/or Twitter and won't be able to get in touch with you using their default standard ways. Being different than masses always takes its toll. It is your call if the benefits are bigger than problems that this action causes. For me its worth it. I like that when I tail logcat on my phone and I don't use it, it stays still, because there is almost no background stuff going on. I like that my data are not being checked or processed. I like that I can backup them, migrate them, I like my 2+ days battery life and I don't like being dependent on something/someone.

Blue pill or red pill

So you decided to degoogle? Then you already took the red pill once. Now it is time to make the decision again 🙂 Android OS itself is open source, although, it is developed mostly by Google, so it is made according to Google's plans. Unfortunately, there are many important APIs that are not opensourced and huge amount of apps rely on them. Libraries like Play Services, Google Maps API, Google Cloud Messaging, Network location provider API and so on. Taking the red pill means, you will replace your stock rom for the custom one and won't install any of the Google's proprietary apps. Your phone will be functioning well and battery life will get better, you will use F-Droid or other free store as your app store. But if you will need some app that is only on Google Play, downloading and installing the apk manually won't work if that app will try to use any of that missing APIs. It will most likely stop working during the start, or it will return some kind of error message. This is many times true for mobile banking apps, big companies apps or official government apps.

Thank god there is a blue pill, the „gracefull degradation way“. It is called MicroG. What this set of apps does? They are basically replacing Google's proprietary libraries by impersonating them. They publish the same APIs so the apps relying on it won't crash. In some cases, the MicroG alternative really does the same and returns meaningful data, in other cases it returns dummy data just to comply to given API. Last thing needed to make this all work is to persuade everyone that the MicroG app is really Google app. This means to provide the google package name with a valid signature. This can not be done by Microg itself. It needs an OS level patch called „signature spoofing“ that will allow any app to ask for a permission to directly access signing certificate. Some custom ROMs has this patch applied, some does not. The most popular and widely known custom ROM is LineageOS (before called Cyanogenmod), bude unfortunately, they do not have signature spoofing turned on and they denied proposed PR from MicroG team. More information regarding this topic is here. This is why MicroG offers custom LineageOS builds with signature spoofing turn on and all MicroG apps preinstalled.

What does it all mean for you? For example let your device be good old Google Nexus 6 (codename shamu). Go to the MicroG LineageOS pages for shamu and download the ROM zip. Then go to the twrp recovery pages for shamu and download the img file. And that's it! Now you can follow the standard LineageOS installation instructions for shamu. The only difference will be, that you won't use the img and zip linked in that manual but you will use the previously downloaded twrp img file during recovery flash procedure and the MicroG LineageOS build zip during the ROM installation. Congratulations! Now you have a degoogled Android phone ready to serve you well.

Real life scenario

Now you may say. Ok, I have booted up the device and have nothing besides calls, sms and camera. Let's quickly cover how to setup the device to standard use. You already have browser and photo apps in the initial installation too.

  • Your new app store is F-Droid. Application is part of the initial installation. Open the app, search and install whatever application you need. We will list a few now.

  • My default email client of choice on Android is K-9 mail. It supports POP, IMAP, SMTP, multiple accounts, unified inbox and GPG to name a few.

  • I use „Silence“ for sms, as it gives you encryption options and it has amoled pure black theme which I use throughout the system.

  • NewPipe is my youtube client, it doesn't need the Google account, because it is not using the official API, it only scraps the web itself

  • Tibor Kaputa, a fellow Slovak developer, has a beautiful set of basic apps. He called them „Simple Mobile Tools“. I use almost all of them. I use Simple Calculator, Simple Calendar Pro, Simple Clock, Simple Contacts, Simple File Manager, Simple Flashlight, Simple Gallery Pro and there are others. They are clean, nice to use, they require only necessary privileges, they don't track you, they are ads free and they are open source. If you like them, don't hesitate to support him and then download Simple Thank You app, that will allow you to set unified theme for all of the apps.

  • There are some more advanced apps I use. For example Termux as a terminal emulator, OpenVPN for Android, Scrambled Exif as a tool to strip image meta information before I share it out from my phone and so one. F-Droid has thousands of apps and they will cover most if not all of your needs.

The /e/ platform

There is another alternative called /e/. Man behind this project is Gaël Duval, former founder of good old Mandrake Linux. /e/ has a bit different strategy. They are trying to provide the whole ecosystem so even non tech people that care about privacy can have all of the things I wrote above in one interconnected functioning ecosystem, which replaces Google but is privacy friendly. Basically, from OS point of view, it is a fork of LineageOS with signature spoofing turned on and with MicroG installed. (they were the main sponsor of MicroG project in 2020!) From the app point of view, they forked many of the favourite open source apps, gave them unified look and feel and reimplemented/preconfigured them to be able to connect to /e/ ecosystem of services like email, calendar, contacts, notes, cloud storage for images, videos, backups and so on. They even sell new and refurbished smartphones with warranty and with /e/ already preinstalled. I haven't studied it much so I can't speak for the final result they deliver. I just wanted to point out another alternative, that may suit your needs. You can read more on their pages.

Some tuning

LineageOS (or other custom ROMs) comes with some apps preinstalled. These apps can not be uninstalled using GUI settings. But you can uninstall them from command line using adb:

  • connect your phone and ensure you have developer tools and debugging enabled

  • in terminal type: adb shell

  • now you are in the phone shell and you can execute uninstall command:

      pm uninstall -k --user 0 com.android.gallery3d 

    Replace com.android.gallery3d with package name of the app you want to uninstall. You can find it in the app info screen.

Also, there may be a situation, when you need to keep some application that you don't want installed and you would like to block its internet access. You can do so with NetGuard. This app act as firewall, but it doesn't require root privileges, because it does not utilize iptables, but rather acts as a VPN service. Because of that, whole OS traffic is comming through the app and app can then restrict traffic based on your rules. Unfortunatelly, this can be applied only if you don't use real VPN, as Android won't let you run two VPNs simultaneously.

Summary

It is much easier to degoogle your phone these days than it was in the past. Up to date and easy to follow step by step installation manuals of LineageOS together with MicroG are the reasons why it is available to much broader spectrum of people. If privacy matters something to you and you're not frequent Google Play Store downloader or mobile gamer, this setup is arguably the best what you can get in the Android world. Of course, you have also other options, for example running mobile linux distribution like Mobian, Manjaro ARM, or OpenSUSE. You will need a very specific device for these distros though. (e.g. PinePhone, Librem5 or some phones from the Nexus and Pixel family) and the resulting usability is drastically behind the average Android experience.