Replacing Android with LineageOS
Tabula Rasa
Anyone installing a system of a different type, be it a change from the default Android to Lineage or a newer LineageOS version, now needs to trigger a factory reset (Wipe in TWRP, the Factory Reset, is preselected (Figure 7)). All the installed apps are lost but not the data, such as music files or photos. It goes without saying that a backup of this data is recommended, in addition to the system backup with TWRP.
The Titanium Backup [7] smartphone program gives you an option for backing up the installed apps, including settings before wiping, but it requires the device to be rooted up front (Figure 8). In principle, you can use this option to transfer apps purchased in the Play Store to a smartphone without using Google's services because Titanium saves the associated APK installation packages, which can then simply be copied. In practice, the apps usually check whether they are running on a device registered to the buyer and refuse to work or cannot be installed at all. The MicroG framework [8], an open source replica of Google's services, promises a remedy.
The MicroG services also need to contact the Google server for license management but will conceal your personal data, according to their developers. Their location services work offline, for example. Most apps start without problems in the environment, but some do not [9].
Although MicroG continuously transmits the device IP to Google, many users might be more trusting of an open source app – for example, when it says that it does not read and transmit the GPS coordinates if the location services are disabled. If you insist on a completely Google-free smartphone, you have no choice but to restrict yourself to the alternative F-Droid app store (Figure 9). There are far fewer apps available there but still around 4,500.
MicroG cannot be post-installed on LineageOS because it has to spoof signatures to Google – LineageOS does not allow that at the system level. However, there is the LineageOS fork LineageOS for MicroG [10], which integrates MicroG into an otherwise unmodified LineageOS system. /e/OS [11] goes a bit further, with its own app store and many free apps from the Play Store.
Install
After running the backup function, the next step is flashing. Click the Install button in the main menu to get the flashing started. This step installs the ZIP images [2] of the LineageOS distribution. You just need to tap on an archive file in the file manager on the Install screen.
In the next screen, the software offers you the option of flashing additional ZIP archives onto the new system (Add more Zips), for example, a root extension for LineageOS or the Google Play Store (see box entitled "LineageOS Add-Ons"). You can launch the actual flash process by dragging the Swipe to confirm Flash slider to the right.
LineageOS Add-Ons
Many power users root their system, as rooting is the only way to adblock, control cells with a tool such as Tasker [12], or tune the kernel settings for better performance and improved power consumption. However, current LineageOS releases no longer offer the option to root via a checkbox in the developer options. Instead, the project recommends installing Magisk [13]. Rename the downloaded Magisk-
VERSION
.apk file to Magisk-
VERSION.zip
, and TWRP's Install function will recognize it as an installation image that you select with Add more Zips before flashing the main system. On a rooted system, install the original Magisk-v2x.x.apk
package, which refreshes the app without launching the rescue system.
LineageOS does not ship Google Play Store or other company services and apps by default. If you want to use the Play Store or paid apps, you need to install OpenGApps [14] before starting the new system for the first time. Apps are also available as ZIP files, which you can add to the flash process in TWRP by selecting Add more Zips. On the OpenGApps page, select the correct variant based on three properties: the processor platform (see the LineageOS wiki page for your device: Architecture), the Android version (also in the LineageOS wiki), and the Variant, that is, the content scope of the OpenGApps package. The stock option sets up the full scope installed on Nexus phones. The nano option includes all items not available through the Play Store and is recommended for users who want to build their own systems.
Quickly Served Up
Sideloading lets you you transfer files directly from your computer without requiring you to manually copy the files on the SD card. (TWRP still needs enough storage space for the image on the SD card.) Sideloading also lets you install several ZIPs one after another.
For a sideload, with the smartphone connected to the PC and the TWRP system running, first call adb devices
to check if the mobile device can be accessed. The adb tool is in the android-tools-adb (Ubuntu) or android-tools package. The adb call should return a line with a device identifier, followed by Recovery. Select Advanced | ADB Sideload on the TWRP homescreen and drag the appropriate slider to the right.
On the PC, run adb sideload IMAGE
. Again, the percentage value displayed on the PC console is not very meaningful; it often remains at 0% for a long time. In our lab, the transfer even supposedly aborted at 49 percent, but TWRP reported a complete installation and the new system booted flawlessly.
Now you have a clean Android system without bloatware, either with or without Google App Store, and with the resource-saving Trebuchet homescreen app (Figure 10), which is perfect for many users. You can select the home app in the Android settings below Apps and Notifications | Default Apps | Start App.
The Android web browser, a calendar, a picture viewer and camera app, a telephony app, email, a text message app, a simple audio player, a voice recorder, a calculator, and a file manager are pre-installed.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.