Your warranty is now void.
I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about this procedure before doing it! YOU are choosing to make these modifications.
OP6 rooting without TWRP
Checklist before preceed:
- Working Fastboot
- Be on software OOS 5.1.5 | 5.1.6 | 5.1.7 | 5.1.8
- Unlocked bootloader (Instruction here, but remember to enable OEM Unlocking first)
Please double check that you have unlocked bootloader!
A few users has reported that instaling magisk with locked bootloader or wiping phone (using stock recovery) with patched boot.img can soft brick your phone! Please avoid doing this for now. If you've already done this and you are stuck with only fastboot working please follow this post https://forum.xda-developers.com/showpost.php?p=76608874&postcount=31 to restore your device to working state. Thank's to @SaiBork for more detailed instructions available here https://forum.xda-developers.com/showpost.php?p=76632484&postcount=82
- Make sure that you have UNLOCKED BOOTLOADER. DO NOT attempt to patch boot.img using Magisk Manager without unlocked bootloader because it WILL CAUSE SOFT BRICK!!!
- Boot device using patched boot.img.
For OOS 5.1.5 it can be downloaded [here]
For OOS 5.1.6 it can be downloaded [here]
For OOS 5.1.7 it can be downloaded [here]
For OOS 5.1.8 it can be downloaded [here]
It can be also patched manually (see bottom of this post).
To do this you need working fastboot. Fire up your cmd/terminal and cd to directory where you've downloaded/placed patched boot image. When you are in correct directory just type in cmd/terminal:Code:
fastboot boot patched_boot_magisk1642_518.img
- Once the phone has booted install Magisk Manager app and open it. It can be downloaded here or here.
- Magisk Manager App should show that your phone is rooted - but at this stage it's just temporary, until next reboot (nothing flashed yet).
Go to settings and Tap on "Update channel" and change it to Beta.
- Go back to Magisk main screen and make sure that "Preserve force encryption" and "Preserve AVB 2.0/dm-verity" are checked!
- Tap on "Install" and select "Direct Install (Recommended)".
- Wait until boot.img is patched and flashed and reboot your device when prompted to do so.
To check SafetyNet status just open Magisk Manager once again and tap on "Tap to start SafetyNet check". It should be all green.
wOOt wOOt you just got rOOt!
Video showing rooting process:
XDA user @GizmoFreak has made a video showing the whole procedure for 5.1.5! Thank you very much.
How to do an OTA update preserving root
- Install OTA. It will be installed on the inactive slot. Do not restart your OP6 when installation finishes.
- Start Magisk Manager app.
- Tap on Install.
- Tap on Install to Second Slot (After OTA).
- Reboot your device.
- Check if you got root and if safety net checks are passed.
How to extract from OTA and manually patch stock OOS boot.img using Magisk Manager:
- Install python3 and PIP manager on your system .
- Use pip to install "protobuf" module:
pip3 install protobuf
- Download payload_dumper.py and update_metadata_pb2.py from this gist https://gist.github.com/ius/42bd02a5df2226633a342ab7a9c60f15 and save them in one directory.
- Download full update zip with OOS (containing payload.bin). It can be downloaded from this great thread by @Titokhan
- Extract payload.bin from update zip to same directory where payload_dumper.py is located.
- Use payload_dumper.py to extract original boot.img
python payload_dumper.py payload.bin
- Install Magisk Manager app on your OP6.
- Place that dumped boot.img on your phone storage.
- In Magisk Manager app tap install, and select "Patching boot image file". Select boot.img that you've just uploaded to your phone.
- Magisk Manager will patch boot.img and save it on Phone's internal storage in "MagiskManager" directory (file called "patched_boot.img").
- Download this patched file to your computer and just use it to boot using fastboot