How to install Magisk on OnePlus7?

I just installed /e/ on my OnePlus7 and I wanted to also install magisk, but i can’t seem to figure it out and I don’t want to be a cowboy and brick it.

This is the official guide for Magisk: https://topjohnwu.github.io/Magisk/install.html

Important:

  1. I installed TWRP as recovery.
  2. The latest Magisk only has an apk that is supposed to patch the boot.img and then it has to be manually flashed by ADB

I managed to extract the boot.img from the official /e/ ROM, but when I try to patch it with Magisk it fails. Also, after the failed attempt, TWRP seems to have been replaced by the /e/ custom recovery.

I need instructions,
Thanks.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

@SuzieQ do you have any insight/direction on this or who to possibly reach to?

Update: I managed to install magisk.
I replaced the .apk extension of the file with .zip and then I flashed it using TWRP.

Now Magisk is runnig, but it fails both basicintegrity AND ctsProfile. I can assume this is because of the unlocked bootloader, unrecognized ROM or something else… I’m not even too concerned about it, except that I will need to try Barclays app… and that one is sensitive.

1 Like

Hello @derei, having noticed your problems with Magisk and using it on my Oneplus 6 I think the ramdisk/recovery installations are very similar. You seem to have tried topjohnwu’s instructions for patching the boot.img which I do’t think was really necessary.

To get a working TWRP recovery which is essential since the /e/ recovery has limited features, I would follow the advice on the Lineage site for guacamoleb install:

Note: Newer fastboot releases dropped legacy A/B support, so it might attempt to flash to boot__a / boot__b rather than boot_a / boot_b if you try to flash boot. In this case, you must manually specify which slot to flash to based on what slot fastboot failed to flash to. For example, if fastboot fails to flash to boot__a, you must flash to boot_a.

You have to use the command:

./fastboot set_active a

Then flash the TWRP recovery

./fastboot flash boot_a twrp.img

At this point you need to reflash the mauronofrio zip file for TWRP which activates his recovery on both slots permanently. Then you can either flash the magisk zip file from recovery or what I did was simply run the apk file once rebooted because the image on the topjohnwu page shows if you have the ramdisk - which I’m sure is the case - and so you just click on the install icon and it will do the flashing for you. Hope this helps.

@Grendel as I managed to flash magisk (see my second post), do you think the steps you suggested are still necessary?
I mean, do you believe that my attempt to flash it may have been faulty and this is why is not passing SafetyNet? Or as i have it up and running, that part is okay?

Sorry @derei I missed your second post. I assumed you were still stuck with the /e/ recovery. If you’ve got TWRP back as your recovery then my message is superfluous.

As for checking your Magisk installation I would install the apk version which makes the different modules of Magisk accessible from the app. It also reminds you when there is an update available. I have the same problem of it not passing the SafetyNet but as none of my apps require it, I haven’t bothered to try and fix it. Apparently there are methods of doing this, but they seemed too complicated to make it worth the effort for me. My main use for Magisk is to use Titanium Backup and AFWall+ which enables me to block more trackers and keep my users apps backed up.