Skip to content

Degoogle Your Phone
With LineageOS and MicroG

LineageOS microG LineageOS microG

Carrying a phone compromises privacy, yet abandoning it feels extreme. An overwhelming majority of the world's population uses smartphones, with three-quarters favouring Android over iOS. Moreover, half of the world's population engages with Meta's platforms, such as Facebook, WhatsApp, Instagram, or Messenger.

Linux-based or fully open-source phones would be better for privacy. Projects like the Librem 5 or Pinephone are promising but still developing. Choosing de-Googled Android versions like LineageOS or CalyxOS offers a practical compromise.

What is LineageOS?

For non-Pixel phone users, LineageOS for microG presents a potential alternative to CalyxOS. Derived unofficially from LineageOS, the project integrates microG, a free software clone of Google's proprietary core libraries. LineageOS supports numerous phone models, ensure your handset is on the device list!

Compatibility and Security Considerations

Warranty: Exercise caution while flashing LineageOS on your device. This action voids your phone's warranty and, if done incorrectly, might render it unusable. Assume sole responsibility for any resulting damages or data loss.

App Compatibility: Before switching to LineageOS, be aware that though most functions operate smoothly, specific apps such as Android Wear, Google Fit, Google Cast, or Android Auto may encounter issues. There are great FOSS alternatives available, but not for everything. Some banking apps for example will not work due to the unlocked bootloader. Using paid apps outside Google's Play Store could also present certain challenges.

Security: While LineageOS remains a strong alternative to Googles Android, it won't be the most secure option. The installation process involves unlocking the bootloader, reducing your phone's security. Physical access could allow an attacker to install software without decrypting the phone, posing risks like password logging. Additionally, LineageOS for microG has experienced delays in security updates; regular check for updates. Some phones may no longer receive updates for proprietary components like bootloader or firmware, introducing potential security vulnerabilities. Evaluate these risks based on your threat model.

Should I choose LineageOS for microG or CalyxOS, or something else?

It depends on your phone model, as well as your threat model. LineageOS for microG is compatible with many phone models, at the cost of lower security. CalyxOS is more secure, but compatible with less phone. Here an overview of both mobile operating systems:

Features LineageOS for microG CalyxOS
Degoogled phones(1) 99% 99%
Usability(2) Good Good
Performance(3) Good Good
Automatic security updates(4) Limited Yes
Verified boot(5) No Yes
Signature spoofing(6) Yes Yes (if using microG)
Supported devices Available to hundreds of devices Google's Pixel line only
F-Droid Installed Installed
Ease of installation(7) Hard Medium
Documentation Good Medium

(1) While not entirely open-source, LineageOS for microG and CalyxOS get rid of Google apps and limit the amount of proprietary code to a strict minimum.

(2) Considering aspects such as app compatibility, push notifications, access to maps, and so on. While most apps work just fine with LineageOS for microG or CalyxOS, some programs don't play nice. Also, using paid apps without Google's Play Store can be a little tricky.

(3) Considering aspects such as battery, storage and CPU usage. microG only takes up 4 MB, compared to over 700 MB for the full Google Apps stack.

(4) CalyxOS automatically receives security updates. LineageOS rolls out manual security updates: while these regularly include patches for Android, patches to the devices's kernel or drivers are not consistent.

(5) CalyxOS can lock the bootloader. This maintains the ability for verified boot, in line with Android's security model. LineageOS on the other hand runs with the bootloader unlocked. This is a security issue, which can be exploited by an attacker with physical access to the phone, or by persistent exploits able to survive a reboot, e.g. from malicious apps or browser exploits.

(6) microG uses signature spoofing, which can present certain security vulnerabilities. On CalyxOS, signature spoofing is implemented in a very restrictive manner.

(7) Setting up LineageOS for microG can seem quite complex and lengthy. You might run into unforeseen issues, especially if it's the first time.


LineageOS backup

Backup your phone

During the LineageOS installation, your device will erase all data. Don't risk loss, back up your phone!


USB debugging Android

Enable USB debugging

Enable USB debugging to connect your phone to the computer using the Android Debug Bridge (ADB). Detailed instructions follow.

Step-by-step guide

On your Android phone

Steps Description
1 Open Settings ► About phone.
2 Tap seven times on Build number to enable developer options.
3 Open Settings ► System ► Advanced settings ► Developer options.
4 Scroll down, and check the Android USB debugging or USB debugging boxes.
5 Plug your Android device into the Windows computer.
6 Change the USB mode to file transfer (MTP).

On your Windows computer

Steps Description
1 Download ADB for Windows.
2 Extract the content of the .zip file.
3 Open the Windows Explorer and browse to the folder containing the extracted ADB files.
4 Right click within this folder and select the entry Open command window here or Open PowerShell window here.
5 Run the following command to launch the ADB daemon:
adb devices
6 A dialog should pop up on your Android phone, asking you to allow USB debugging. Check the box Always allow, and click on OK.
Step-by-step guide

On your Android phone

Steps Description
1 Open Settings ► About phone.
2 Tap seven times on Build number to enable developer options.
3 Open Settings ► System ► Advanced settings ► Developer options.
4 Scroll down, and check the Android debugging or USB debugging boxes.
5 Plug your Android device into the macOS device.
6 Change the USB mode to file transfer (MTP).

On your macOS device

Steps Description
1 Download ADB for macOS.
2 Extract the content of the .zip file.
3 Open the terminal and browse to the folder containing the extracted ADB files.
4 Run the following command to launch the ADB daemon:
adb devices
5 A dialog should pop up on your Android phone, asking you to allow USB debugging. Check the box Always allow, and click on OK.
Step-by-step guide

On your Android phone

Steps Description
1 Open Settings ► About phone.
2 Tap seven times on Build number to enable developer options.
3 Open Settings ► System ► Advanced settings ► Developer options.
4 Scroll down, and check the Android debugging or USB debugging boxes.
5 Plug your Android device into the Linux (Ubuntu) device.
6 Change the USB mode to file transfer (MTP).

On your Linux (Ubuntu) device

Steps Description
1 Open the terminal with the shortcut CTRL + ALT + T, or click on the Applications button on the top left and search for Terminal.
2 Run the following commands to update your system packages:
sudo apt update
sudo apt upgrade
3 Run the following commands to install ADB Fastboot:
sudo apt install android-tools-adb
sudo apt install android-tools-fastboot
4 Run the following command to start the ADB server (if it hasn't auto started yet):
sudo adb start-server
5 Run the following command to launch the ADB daemon:
adb devices
6 A dialog should pop up on your Android phone, asking you to allow USB debugging. Check the box Always allow, and click on OK.


LineageOS bootloader

Unlock bootloader

The bootloader is the first piece of code that executes when powering on a phone. It’s often locked by manufacturers to prevent modifications. Installing LineageOS for microG necessitates unlocking the bootloader. Consult the LineageOS wiki, find your phone model in the supported devices list, and refer to the instructions in the section Installation > Unlocking the bootloader. For additional assistance, visit the LineageOS community or Reddit.


TWRP apk

TWRP recovery

Android phones feature Google's stock recovery software for restoring settings or OS updates. To install LineageOS for microG, replace the stock recovery with a custom recovery called Team Win Recovery Project (TWRP).

Step-by-step guide

On your Android phone

Steps Description
1 Plug your Android device into the Windows computer.
2 Change the USB mode to file transfer (MTP).

On your Windows machine

Steps Description
1 Browse to the TWRP website, select the correct phone model and download the appropriate TWRP version. For the purpose of this tutorial, let's assume the file has been downloaded to /Downloads/twrp-x.x.x.img.
2 Open the Windows Explorer and browse to the folder containing the downloaded .img file.
3 Right click within this folder and select the entry Open command window here or Open PowerShell window here.
4 Run the following command to reboot the phone into bootloader mode:
adb reboot bootloader

Alternatively, reboot the phone into bootloader mode by powering it off, and then holding down both Volume DOWN and POWER buttons. Release them once the word FASTBOOT appears on the screen. The combination of buttons might change from device to device. More information here.
5 Run the following command to make sure the computer can detect your phone:
fastboot devices
6 The terminal should prompt something similar to this:
$ 0077fxe89p12 fastboot
7 Run the following commands to navigate to the folder containing the custom recovery file (adjust accordingly) and flash the custom recovery to your phone:
cd /Downloads
fastboot flash recovery twrp-x.x.x.img
8 The terminal should prompt something similar to this:
$ sending ‘recovery’ (8450 KB)…
$ OKAY [ 0.730s]
$ writing ‘recovery’…
$ OKAY [ 0.528s]
$ finished. total time: 1.258s
9 Run the following command to boot directly into TWRP:
fastboot boot recovery twrp-x.x.x.img
Step-by-step guide

On your Android phone

Steps Description
1 Plug your Android device into the macOS device.
2 Change the USB mode to file transfer (MTP).

On your macOS device

Steps Description
1 Browse to the TWRP website, select the correct phone model and proceed with the TWRP download. For the purpose of this tutorial, let's assume the file has been downloaded to /Downloads/twrp-x.x.x.img.
2 Open the terminal.
3 Run the following command to reboot the phone into bootloader mode:
adb reboot bootloader

Alternatively, reboot the phone into bootloader mode by powering it off, and then holding down both Volume DOWN and POWER buttons. Release them once the word FASTBOOT appears on the screen. The combination of buttons might change from device to device. More information here.
4 Run the following command to make sure the computer can detect your phone:
sudo fastboot devices
5 The terminal should prompt something similar to this:
$ 0077fxe89p12 fastboot
6 Run the following commands to navigate to the folder containing the custom recovery file (adjust accordingly) and flash the custom recovery to your phone:
cd /Downloads
sudo fastboot flash recovery twrp-x.x.x.img
7 The terminal should prompt something similar to this:
$ sending ‘recovery’ (8450 KB)…
$ OKAY [ 0.730s]
$ writing ‘recovery’…
$ OKAY [ 0.528s]
$ finished. total time: 1.258s
8 Run the following command to boot directly into TWRP:
sudo fastboot boot recovery twrp-x.x.x.img
Step-by-step guide

On your Android phone

Steps Description
1 Plug your Android device into the Linux (Ubuntu) device.
2 Change the USB mode to file transfer (MTP).

On your Linux (Ubuntu) machine

Steps Description
1 Browse to the TWRP website, select the correct phone model and download the appropriate TWRP version. For the purpose of this tutorial, let's assume the file has been downloaded to /home/gofoss/Downloads/twrp-x.x.x.img.
2 Open the terminal with the shortcut CTRL + ALT + T, or click on the Applications button on the top left and search for Terminal.
3 Run the following command to reboot the phone into bootloader mode:
adb reboot bootloader

Alternatively, reboot the phone into bootloader mode by powering it off, and then holding down both Volume DOWN and POWER buttons. Release them once the word FASTBOOT appears on the screen. The combination of buttons might change from device to device. More information here.
4 Run the following command to make sure the computer can detect your phone:
sudo fastboot devices
5 The terminal should prompt something similar to this:
$ 0077fxe89p12 fastboot
6 Run the following commands to navigate to the folder containing the custom recovery installer (adjust accordingly) and flash the custom recovery to your phone:
cd /home/gofoss/Downloads
sudo fastboot flash recovery twrp-x.x.x.img
7 The terminal should prompt something similar to this:
$ sending ‘recovery’ (8450 KB)…
$ OKAY [ 0.730s]
$ writing ‘recovery’…
$ OKAY [ 0.528s]
$ finished. total time: 1.258s
8 Run the following command to boot directly into TWRP:
sudo fastboot boot recovery twrp-x.x.x.img


TWRP recovery apk

Install Lineage OS

Once the phone successfully boots into recovery (TWRP), proceed with the installation of LineageOS for microG. Detailed instructions below.

Step-by-step guide

On your Windows machine

Steps Description
1 Find out which code name is associated with your phone model on the LineageOS website. For example, the code name of the LineageOS Fairphone 2 is "FP2", the Nexus 5X is called "bullhead", the Samsung Galaxy S9 is called "starlte", and so on.
2 Look for the same code name on the LineageOS for microG website. Click on the corresponding folder and download the latest version of LineageOS for microG. For the purpose of this tutorial, let's assume it has been downloaded to the location /Downloads/lineage-XX.X-202XXXXX-microG-CODENAME.zip.
3 Open the Windows Explorer and browse to the folder containing the downloaded .zip file.
4 Right click within this folder and select the entry Open command window here or Open PowerShell window here.
5 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 TWRP custom recovery should now load. Swipe the slider to enter the main screen.
2 Tap the Wipe button and then the Format Data button. Caution! This will remove encryption and delete all files stored in the internal storage. Make sure you backed up your data!
3 Return to the previous menu, tap the Wipe button and this time tap the Advanced Wipe button.
4 Select Cache, System and Data and swipe the slider Swipe to Wipe at the bottom of the screen.

On your Windows machine

Steps Description
1 To make sure the computer can detect your phone, type the following terminal command:
fastboot devices
2 The terminal should prompt something similar to this:

$ 0077fxe89p12 fastboot
3 Run the following commands to navigate to the folder containing the LineageOS for microG file (adjust accordingly) and copy the .zip file to the internal storage of your phone:
cd /Downloads
adb push lineage-XX.X-202XXXXX-microG-CODENAME.zip /sdcard/

Alternatively, copy the .zip file manually from your computer to your phone, using the file manager.
4 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 Navigate to TWRP's main screen and tap on the Install button. Choose the LineageOS file lineage-XX.X-202XXXXX-microG-CODENAME.zip.
2 Swipe the slide Swipe to confirm Flash, wait until LineageOS for microG is installed and reboot the phone (this time, a "normal" reboot, not a "bootloader" or "recovery" reboot).
3 The first start can take a while. Congrats, LineageOS for microG is installed on your phone!
Step-by-step guide

On your macOS machine

Steps Description
1 Find out which code name is associated with your phone model on the LineageOS website. For example, the Fairphone's code name is "FP2", the Nexus 5X is called "bullhead", the Samsung Galaxy S9 is called "starlte", and so on.
2 Look for the same code name on the LineageOS for microG website. Click on the corresponding folder and download the latest version of LineageOS for microG. For the purpose of this tutorial, let's assume it has been downloaded to the location /Downloads/lineage-XX.X-202XXXXX-microG-CODENAME.zip.
3 Open the terminal.
4 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 TWRP custom recovery should now load. Swipe the slider to enter the main screen.
2 Tap the Wipe button and then the Format Data button. Caution! This will remove encryption and delete all files stored in the internal storage. Make sure you backed up your data!
3 Return to the previous menu, tap the Wipe button and this time tap the Advanced Wipe button.
4 Select Cache, System and Data and swipe the slider Swipe to Wipe at the bottom of the screen.

On your macOS machine

Steps Description
1 To make sure the computer can detect your phone, type the following terminal command:
sudo fastboot devices
2 The terminal should prompt something similar to this:
$ 0077fxe89p12 fastboot
3 Run the following commands to navigate to the folder containing the LineageOS for microG file (adjust accordingly) and copy the .zip file to the internal storage of your phone:
cd /Downloads
sudo adb push lineage-XX.X-202XXXXX-microG-CODENAME.zip /sdcard/

Alternatively, copy the .zip file manually from your computer to your phone, using the file manager.
4 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 Navigate to TWRP's main screen and tap on the Install button. Choose the LineageOS file lineage-XX.X-202XXXXX-microG-CODENAME.zip.
2 Swipe the slide Swipe to confirm Flash, wait until LineageOS for microG is installed and reboot the phone (this time, a "normal" reboot, not a "bootloader" or "recovery" reboot).
3 The first start can take a while. Congrats, LineageOS for microG is installed on your phone!
Step-by-step guide

On your Linux (Ubuntu) machine

Steps Description
1 Find out which code name is associated with your phone model on the LineageOS website. For example, the Fairphone's code name is "FP2", the Nexus 5X is called "bullhead", the Samsung Galaxy S9 is called "starlte", and so on.
2 Look for the same code name on the LineageOS for microG website. Click on the corresponding folder and download the latest version of LineageOS for microG. For the purpose of this tutorial, let's assume it has been downloaded to the location /home/gofoss/Downloads/lineage-XX.X-202XXXXX-microG-CODENAME.zip.
3 Open the terminal with the shortcut CTRL + ALT + T, or click on the Applications button on the top left and search for Terminal.
4 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 TWRP custom recovery should now load. Swipe the slider to enter the main screen.
2 Tap the Wipe button and then the Format Data button. Caution! This will remove encryption and delete all files stored in the internal storage. Make sure you backed up your data!
3 Return to the previous menu, tap the Wipe button and this time tap the Advanced Wipe button.
4 Select Cache, System and Data and swipe the slider Swipe to Wipe at the bottom of the screen.

On your Linux (Ubuntu) machine

Steps Description
1 To make sure the computer can detect your phone, type the following terminal command:
sudo fastboot devices
2 The terminal should prompt something similar to this:
$ 0077fxe89p12 fastboot
3 Run the following commands to navigate to the folder containing the LineageOS for microG file (adjust accordingly) and copy the .zip file to the internal storage of your phone:
cd /home/gofoss/Downloads
sudo adb push lineage-XX.X-202XXXXX-microG-CODENAME.zip /sdcard/

Alternatively, copy the .zip file manually from your computer to your phone, using the file manager.
4 Run the following command to reboot the phone into recovery mode:
adb reboot recovery

Alternatively, reboot the phone into recovery mode by powering it off, then holding down both Volume UP and POWER buttons. Release them once the logo appears on the screen. The combination of buttons might change from device to device. More information here.

On your Android phone

Steps Description
1 Navigate to TWRP's main screen and tap on the Install button. Choose the LineageOS file lineage-XX.X-202XXXXX-microG-CODENAME.zip.
2 Swipe the slide Swipe to confirm Flash, wait until LineageOS for microG is installed and reboot the phone (this time, a "normal" reboot, not a "bootloader" or "recovery" reboot).
3 The first start can take a while. Congrats, LineageOS for microG is installed on your phone!


microG apk download, micro g apk, microg download, download microg

MicroG

microG, a free counterpart to Google's core libraries, allows for push notifications and location services without Google Services Framework (GSF). LineageOS users can access GSF-dependent apps with microG while minimizing data exposure. Where possible, try using GSF-independent, open source apps to reduce data leaks.

To achieve independence from third-party providers, determine your phone’s location using a local cell tower database. Further details below.

Step-by-step guide

Steps Description
1 Open F-droid and install an app called Local GSM location.
2 Head over to the microG settings app. Navigate to Location modules and enable GSM Location Service as well as Nominatim.
3 Navigate to Self-Check and verify whether everything is set up properly.

LineageOS lowers reliance on Google's services. An exception exists: many apps use Google Cloud Messaging (GCM) for push notifications. microG enables limited GCM usage, facilitating push notifications. Details are provided below.

Step-by-step guide

Steps Description
1 Open the microG settings app.
2 Navigate to Google device registration and register your device.
3 Navigate to Google Cloud Messaging and activate push notifications.

How can I trust LineageOS if it uses Google Cloud Messaging?

Registering your device and opting for push notifications is optional. This may provide limited data to Google, including a unique ID. microG, however, removes identifiable elements. Enabling push notifications can potentially allow Google to (partly) access your notification content, depending on how apps use Google Cloud Messaging.

F-Droid, an app store dedicated to free and open-source applications, was discussed in a previous chapter on FOSS apps. Enable microG's repository in F-Droid following the detailed instructions below.

Step-by-step guide

Steps Description
1 Launch F-Droid.
2 Navigate to Settings ► Repositories.
3 Enable the microG repository.

Installing paid apps without Google's Play Store can be a little tricky. Here a practical workaround.

Step-by-step guide

Steps Description
1 Browse to Google's online play store.
2 Buy apps with an old or disposable Google account.
3 Log into Aurora store with the same Google credentials.
4 Download the purchased apps.


Degoogle your phone, degoogle Android

Support

For further details or questions, refer to LineageOS's documentation or community for help.

Lineage OS 18, LineageOS 18.1, Lineage OS 17, LineageOS 19