This is how I installed LineageOS on a OnePlus7Pro including...
- LineageOS (stock) as operating system Android "without" Google
- Priviliged access "root" to the phone using Magisk. A rooted phone allows us to install
- Firewall AFWall+ to allow/block apps system wide (root required)
- Add Blocker AdAway to block trackers system wide for all apps (root required)
- Some other protection measures
- redirect check of internet connection from Google to a dezentralized server (captive portal checkin)
- DNS over TLS
- deactivate telephone book search
- deactivate location via WLAN/Bluetooth
- deactivate aGPS
These instructions where tested at 14.04.2021.
Summary of this page
- Make sure your computer has adb and fastboot.
- Enable USB debugging on your device
- Enable OEM unlock in the Developer options under device Settings, if present.
Terminal of your computer...
adb reboot bootloader fastboot devices fastboot flash boot lineage-18.1-20210411-recovery-guacamole.img
Reboot to Recovery (alternativly: power off and Volume Down + Power)
You should now be in Recovery mode.
Factory Reset > Format data / factory reset > format
Apply Update”, then “Apply from ADB”
adb sideload lineage-18.1-20210411-nightly-guacamole-signed.zip
Install Magisk (root)
1. ADB sideload (in recovery mode)
Download "Magisk-v22.1.apk" two times from and
- rename one copy from "Magisk-v22.1.apk" to "Magisk-v22.1.zip"
- leave the other copie as it is "Magisk-v22.1.zip" to use it later on
In recoverey mode on the phone...
"Advanced" >"Reboot to Recovery" --rebooting--> "Apply Update"
adb sideload Magisk-v22.1.zip
Confirm "yes" on the mobile.
"Reboot System now"
2. APK install (in LineageOS)
In LineageOS copy "Magisk-v22.1.apk" to the phone and install. Follow, summary for settings in Magisk
- check MagiskHide
- click systemless host file
Install AFWall+ (firewall)
Install via F-Droid. Then follow
Captive Portal Check - Method A
In the computers terminal...
adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de"' adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de"' adb shell 'settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de"' adb shell 'settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de"'
Check if successful
adb shell 'settings get global captive_portal_https_url'
Some apps might not work using this method, example FloraIncognita.
This app seems to check for the "small cross" (icon in status bar for wlan and/or mobile data) and if it "sees" the cross it thinks there is no internet connection (although there is one).
Captive Portal Check - Method B
(I personally prefer this method.)
Activate the Terminal app.
Settings > System > more > Developer Settings > USB-Debugging > on
Settings > System > more > Developer Settings > Local Terminal > on
Open Terminal app .
Grant root privilege (a question will pop up).
su pm disable com.android.captiveportallogin settings put global captive_portal_detection_enabled 0 settings put global captive_portal_server localhost settings put global captive_portal_mode 0 reboot
To avoid using the Terminal app and typing long commands on the phone you might use the terminal of the computer "adb shell ..." as in method A.
Install AdAway (block trackers)
Install via F-Droid then follow, summary for settings
- choose root based blocker (instead of VPN based at first time start of AdAway)
- Settings > root based > bypass IPv4 (Umleitungs-IPv4): change to 0.0.0.0
Deactivate WLAN- and Bluetooth tracking
Settings > Location > WLAN- and Bluetooth search > deactivate, see
DNS over TLS
Settings > network & internet > more > private DNS > example: fdns1.dismail.de, see see
- Deactivate telephone number search
- Deactivate aGPS (this will slow down the position finding)
Installed via F-Droid
- FairMail (Mail)
- Conversations (XMPP) > dismail.de (example: email@example.com)
- Element (Matrix) > bau-ha.us (example: @coolname:bau-ha.us)
- davx5 (calDAV, cardDAV = calendar and address book synchronization)
- Wewb browsers
- TorBrowser (anonymously reading web pages. Hint: activate repostitory Guardian Projekt in F-Droid)
- PrivacyBrowser (if something does not work in TorBrowser or to download files)
- Fennec, addon uMatrix (to use sites requiring logins)
- OSMand (maps, gpx tracks and navigation. Hint: Do NOT use TTS for speach synthesis)
- CWA (Corona Warn App)
- FloraIncognita (identify plants)
- NewPipe (download from youtube)
- ZAP (German public TV)
- llcrop (shrink pictures without quality loss)
- Briar (messenger over TOR, WLAN, Bluetooth - still without picture/files)
Installed via F-Droid - Repository Guardian Project
TorBrowser - anonymously reading web pages. Hint: activate repostitory Guardian Projekt
Installed via F-Droid - Repository MicroG
- Add the microG repository to F-Droid.
- Install "microG Service Core" in F-Droid
Q: When to install microG?
A: To use the gCam, a modification of Googles camera app on your phone without having installed gAPPS
Install gCam - Google Camera Port
Requirement: microG is installed.
Why: Many want to take full advantage of the good camera of the OnePlus 7pro:
- use all three lenses (wide angle, tele, ultra wide angle)
- reduced noise
- improved dynamic range
Go into the settings to activate the telephoto and wide angle lenses. It is a little bit hidden there under additional settings (German Zusatzlinsen).