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
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.