[OnePlus 5 Guides, News, & Discussion] bcas9472:
OB4 and Root with Magisk

A couple disclaimers before I start. For those that have OB4 and Magisk working, this is going to be "TLDR" for you. For those that are still having an issue getting Magisk, No Decryption and Certified Play store working, you may want to give this a read. I never really post on forums, so if my formatting sux or I have run on sentences please don't criticize. If you think I am just plain nuts, or this is all jargon for you, sorry I just wanted to share something with the forum for the first time.

Some may thing this was a bunch of unneeded work, or maybe I am a bit crazy for going through so much hassle for such a measly task that we have all done a million times from the start of buying our OP5. All I can say is I really got obsessed with trying to get my normal setup working and for whatever reason, OB4 gave me a ton of trouble for the very first time.

I have been watching this thread for two days to see if anyone could explain why some of us are having issues rooting OB4. I also spent a fair amount of time trying to install Magisk on OB4 but didn't have any success - until this morning.

I can't explain why the normal process of installing OB4 and installing Magisk resulted in a bootloop or hung boot animation, or hung boot logo for me and others quoted above in this post.

The combinations I tried that DIDNT work was the OB4 zip named OnePlus5Oxygen_23_OTA_005_all_1801130013_83d321bc46d64270.zip flashed Locally from within Oreo OB3, and flashed from Internal in stock recovery, and flashed from TWRP.

The Magisk versions I tried that didnt work with the above said methods were Magisk-v15.2(1520).zip, Magisk-v15.2-180111.zip, Magisk-v15.3.zip, Magisk-v15.3(1530).zip, Magisk-v15.3-180112.zip and Magisk-v14.5(1456).zip.

I keep stock recovery installed, and use fastboot to boot to TWRP rather than flash it.

The TWRP versions I tried that didn't work with above said methods were

twrp-3.2.1-x_blu_spark_v8.61-op5_op5t.img, twrp-3.2.1-0-oreo-codeworkx-cheeseburger.img, twrp-3.2.1-cheeseburger-127-20180106-190542-CET.img, twrp-3.2.1-0-oreo-8.0-codeworkx-dumpling.img, twrpop5oreo.img, twrp-3.2.1-0-universal-codeworkx-dumpling.img and several others from AFH.

The Decrypt/No Verity zip I tried flashing was no_verity_mod_For_OOS_Oreo_by_HatriGt.zip.

I tried flashing Magisk from TWRP and the No Verity zip, and also tried patching stock boot.img from the Magisk Manager app in OB4. Each attempt resulted in the same result, it either hung on boot, or I would get through the setup process and Magisk Manager was not in my application list, or the Magisk Manager app was there, but said Magisk wasn't installed.

I imagine the file most are using to install OB4 is file named OnePlus5Oxygen_23_OTA_005_all_1801130013_83d321bc46d64270.zip, MD5 bb90102246db4af2899c4bd62f1a25bb.

I found a different zip for OB4 on AFH that has a different name. The file name is OnePlus5Oxygen_23_OTA_005_all_1801130013_02adaa076eb5bf9.zip and it also has an MD5 of bb90102246db4af2899c4bd62f1a25bb, exactly the same MD5 as the other.

Not sure why it is the same file with different names, we would have to ask Tito where he got it.

Anyways, I felt like using a different process this morning would give me some better luck, and it did.

The way I got it to work was the following.

Unzip OB4 zip.

In Linux, use sdat2img.py to convert system.transfer.dat/system.new.dat to system_raw.img, and img2simg to convert the system_raw.img to system_sparse.img

Unlock Bootloader

Reboot to Bootloader

fastboot -w

fastboot flash boot <stock OB4 boot.img>

fastboot flash recovery <stock OP5 recovery.img>

fastboot flash system <converted system_sparse.img>

fastboot boot twrp-3.2.1-0-oreo-8.1-codeworkx-dumpling.img (On AFH - that was the TWRP version that ultimately worked for me)

in TWRP, flashed no_verity_op5_v2.zip (On AFH)

Following no verity zip install, flashed Magisk-v15.3(1530).zip

Rebooted to system and this time, Magisk Manager was there, and it showed that it was installed.

The following steps I always use to make sure Play Store is Certified instead of Un-Certified which will hide Netflix which I hate.

On the startup, I skip as much stuff as possible and never put in my Google ID. This gives me the chance to get to Magisk Hide, and hide Magisk from all Google Apps.

Once Magisk is hidden from Google Play and Play Services, I safely put in my Google ID and go to Google Play to verify it says Certified. If your Bootloader is Unlocked and you dont Magisk Hide Google Play, sometimes it will say Un Certified which hides certain apps.

After Play was setup, I went to Magisk and did a SafetyNet check, and it was green all the way :)

The results from all that was my normal setup. Hopefully no one has to go through what I did but just wanted to share what worked for me.