Skip to content

Instantly share code, notes, and snippets.

@Samffy
Last active June 1, 2023 20:23
Show Gist options
  • Save Samffy/f8eaa4ce9d6c80862407cf4184d68df2 to your computer and use it in GitHub Desktop.
Save Samffy/f8eaa4ce9d6c80862407cf4184d68df2 to your computer and use it in GitHub Desktop.
Install Magisk and the Safetynet fix on OnePlus 6 with LineageOS

Magisk + Safetynet fix on OnePlus 6 with LineageOS

Why ?

To enable Google Pay, Paypal and make Netflix available in the Play Store.

Information

Warning

⚠️ I only tested this steps on OnePlus 6 (enchilada) running Lineageos 19 and 20 from a laptop running on Linux (Ubuntu)!

Installing Magisk will not swap your data, but keep in mind that you follow these steps at your own risk and I will be not responsible of any error/problem that can happen 😇

This tutorial assumes you understand how to use adb and fastboot and that developer mode is enabled on your phone.

You will have to redo steps 2 to 8 after each Lineageos update.

Usage

Magisk with Zygisk option enabled will make Google Pay and Paypal run on your phone.
The Safetynet fix module will make the Play Store think that your phone firmware is certified and display applications that will not appeared on uncertified phones, like Netflix.

Following the Magisk installation documentation, OnePlus 6 has boot ramdisk so we have to patch the boot.img of Lineageos.

Ramdisk

There is a vmbeta partition in the original firmware, I did not patched it in this tutorial as this is an optional step.

Legend

  • ☎️ : this action must be done on your phone
  • 💻 : this action must be done on your computer

Magisk install

  1. ☎️ Install Magisk APK on your phone by downloading it from https://github.com/topjohnwu/Magisk/releases

  2. 💻 Download the boot.img of the Lineageos version installed on your mobile device https://download.lineageos.org/devices/enchilada/builds (:warning: do not use another version than the one jou installed on your phone!).

  3. 💻 Copy the boot.img on your device

adb push boot.img /sdcard/Download

(you can check that your phone is connected by using the adb devices command)

  1. ☎️ Patch boot.img using Magisk on your phone by selecting "Install" and selecting boot.img.
    Result will be the path of the patched image.

  2. 💻 Copy patched boot.img on your PC

adb pull /sdcard/Download/magisk_patched-[random_strings].img
  1. 💻 Reboot your phone in fastboot mode:
adb reboot bootloader
  1. 💻 Flash the patched boot image to your phone:
fastboot flash boot magisk_patched-[random_strings].img

(you can check that your phone is connected by using the fastboot devices command)

Then restart.

  1. ☎️ Enable Zygisk and Enforce Denylist options in Magik settings.

Settings

Certified your phone using the Safety fix module

☎️ Go to https://github.com/kdrag0n/safetynet-fix/releases and download the latest version on your phone.
Install this version on your phone using Magisk by going in the "Modules" section and choosing "Install from storage" option and finally selecting the downloaded archive.

Modules

You will be able to see that your phone is certified in the Google Play Store:

Parameters > About > Play Protect Certification

ℹ️ It may require one day or two before the Play Store said that your phone is certified by Play Protect.

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment