FORUMS
Remove All Ads from XDA
OnePlus 6 Development Program

How to update OOS 5.1.6, Install official TWRP and magisk - tested working!

1,644 posts
Thanks Meter: 606
 
By carlos67, Senior Member on 9th June 2018, 04:22 PM
Post Reply Email Thread
Hi guys,

Here is my complete foolproof guide on how to update your system. Please note that there may be other maybe easier ways that cut-out some steps but this worked for me. It is intended for Noobies so I apologise to more advanced users if it seems tedious and long-winded. But that's how Noobies like it with everything explained in detail.

IMPORTANT NOTE: If you have previously used parallel apps then before doing any of this process you must delete user 999 from the system, otherwise you backups will not work!!!

From a terminal window (I use terminal emulator from play store ) type su and enter. Now type the command pm remove-user 999 and enter. Now you shouldn't have to worry about parallel apps messing up your backups.

Thanks to @dgunn for this
https://forum.xda-developers.com/one...2#post76760812

Also, please note that I have NEVER previously installed an un-official twrp on my device (wanted to wait for official ), however, I was unlocked, and rooted with magisk v16.0 and on stock oos 5.1.5 before beginning this upgrade process.

If you already have an un-official twrp installed, then I cannot guarantee that this guide will work for you. It might, it might not

Disclaimer: This is a guide for helping others. It is your choice to follow it and I take no responsibility for any problems you encounter as a result of following this guide. You do it at your own risk

Ok, lets get started......................

Actually, before we do let's get one thing clear that is confusing a lot of people regarding fastboot and twrp. There are 2 ways of putting twrp recovery onto your phone. A temporary way (disappears after rebooting and goes back to stock recovery) and a permanent way (the best way that stays put - what we all want right?). This guide assumes that you don't currently have twrp on your phone.

In order to put a permanent official twrp on your phone, first we have to boot (NOT flash!) into a temporary version of twrp. The fastboot command for this is "fastboot boot path_to_temporary_twrp.img" (without the quotes of course )

The difference between temporary twrp and permanent twrp is in whether we either fastboot boot or fastboot flash.

Ok, let's begin

First of all, as a precaution, disable all security on your device like pin, pattern, password, fingerprint. Make sure that when you wake your phone it goes straight to the homescreen without any prompts for pins etc etc. May not be needed but it's what I did

1. Download the following files to the following locations....

a. Official oxygen OS 5.1.6 zip file (full zip) > to root of sdcard .
b. Official twrp installer ZIP file > to root of sdcard. (This is our permanent twrp file)
c. Magisk root zip file (I used v 16.0 but v16.4 zip file should be okay too) > to root of sdcard.
d. Official twrp installer IMG file > to your PC in the same folder as your fastboot files. (This is our temporary twrp file)

These files are available for download in other threads on XDA just search for them.

Once that is done proceed as follows.....

2. Go to settings>system updates and click the gear icon in the top right and choose "local upgrade" and then select the Oxygen 5.1.6 zip file from your sdcard. The system will now begin to update itself. Once finished it will prompt you to reboot, do this, and the system will boot back up into Oxygen OS 5.1.6

3. Now, long press your power button and select reboot and select bootloader option and your phone will reboot into bootloader (fastboot) mode.

4. On your PC go to your fastboot folder and open a command prompt in that folder (don't forget you previously put the temporary twrp image file in here)

5. Now plug your phone into the PC

6. At the command prompt enter following command fastboot devices
and your phone should show up as connected and recognised.

7. We are now going to boot the phone into the temporary twrp. Type the following command fastboot boot <name of temporary twrp file (from your fastboot folder)>.img

8. Your phone will now boot into the temporary twrp recovery and from here we can now flash the permanent version of twrp that we previously put on our sdcard.

9. On your phone, select Install, then find the twrp zip file on the root of your sdcard, select it and swipe to flash.

10. Once this has flashed successfully, we now need to reboot into this new permanent recovery. DO NOT REBOOT TO SYSTEM AT THIS POINT! Now, select "Reboot" option and select "Recovery". Your phone will now reboot into the new permanent twrp. You can now forget about the other temporary twrp from earlier

11. Once the phone goes back into recovery select Install option and find the Magisk root zip file on your sdcard and select it. Now swipe to flash it. After successfully flashing Magisk, you are now ready to enjoy the fruits of your labours

Go back to the twrp homepage and select Reboot>system.

The system will now boot normally and if you have followed these steps to a Tee you will be on OOS 5.1.6 and rooted!

I have also done a successful twrp backup without any error messages. Your previous data will be untouched and you can now set-up your security again.

One final thing to note - because the boot and recovery partitions are now combined, this means that everytime you flash something to your boot partition, your new permanent twrp recovery will be lost and you will have to re-install twrp again from scratch initially through fastboot.

Enjoy
The Following 29 Users Say Thank You to carlos67 For This Useful Post: [ View ] Gift carlos67 Ad-Free
 
 
9th June 2018, 06:42 PM |#2  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by carlos67

From a terminal window (I use terminal emulator from play store ) type su and enter. Now type the command pm remove_user 999 and enter. Now you shouldn't have to worry about parallel apps messing up your backups.

I bet the terminal command should be:
pm remove-user 999
9th June 2018, 06:55 PM |#3  
Obi-Wan's Avatar
Member
Flag Turin
Thanks Meter: 7
 
More
I've made almost the same without problem
9th June 2018, 07:05 PM |#4  
InflatedTitan's Avatar
Senior Member
Thanks Meter: 1,169
 
More
After many years of being actively involved in unlocking, flashing, and tinkering. I feel I'm starting from scratch. This quick guide is exactly what I've been waiting for as I'm in the same situation with being simply unlocked and rooted lol. I'll be replicating these steps shortly 👍.

Only thing I'm wondering, once everything is done and running... If I flash a rom with the official "permanent" twrp, it's gone gone? Let's just say, renovate ice ROM?

Maybe it's the 16 hour day I worked and lack of sleep... But having it replaced upon a single rom flash and carrying the name "permanent" seems like 2 opposing ideas lol
9th June 2018, 07:15 PM |#5  
carlos67's Avatar
OP Senior Member
Thanks Meter: 606
 
More
Quote:
Originally Posted by Kiddman

I bet the terminal command should be:
pm remove-user 999

Yes, well spotted and corrected

Quote:
Originally Posted by InflatedTitan

After many years of being actively involved in unlocking, flashing, and tinkering. I feel I'm starting from scratch. This quick guide is exactly what I've been waiting for as I'm in the same situation with being simply unlocked and rooted lol. I'll be replicating these steps shortly 👍.

Only thing I'm wondering, once everything is done and running... If I flash a rom with the official "permanent" twrp, it's gone gone? Let's just say, renovate ice ROM?

Maybe it's the 16 hour day I worked and lack of sleep... But having it replaced upon a single rom flash and carrying the name "permanent" seems like 2 opposing ideas lol

If you were to flash a full OTA official update then yes, your "permanent" twrp will be gone because the boot partition gets flashed to stock and you'd need to re-install twrp starting in fastboot. However, for custom rom flashes, it depends if their is a kernel bundled in with the rom. If not then twrp should remain, if yes then as with official update, re-install twrp.

It's more normal for a custom rom to simply overwrite system partition without touching boot partition and twrp, but, sometimes custom rom's like Renovate come bundled with a kernel (TBalden's) and wipe out twrp.

If I'm wrong on this I stand to be corrected.
9th June 2018, 07:19 PM |#6  
Senior Member
Thanks Meter: 53
 
More
Quote:
Originally Posted by Kiddman

I bet the terminal command should be:
pm remove-user 999

Yes you are correct because this was my finding and thank you OP for not giving credit

My findings of the 255 error (999)

https://forum.xda-developers.com/one...e-999-t3801632
9th June 2018, 07:24 PM |#7  
carlos67's Avatar
OP Senior Member
Thanks Meter: 606
 
More
Quote:
Originally Posted by dgunn

Yes you are correct because this was my finding and thank you OP for not giving credit

My findings of the 255 error (999)

https://forum.xda-developers.com/one...e-999-t3801632

My apologies, an oversight, corrected
The Following User Says Thank You to carlos67 For This Useful Post: [ View ] Gift carlos67 Ad-Free
9th June 2018, 07:27 PM |#8  
Senior Member
Thanks Meter: 53
 
More
Quote:
Originally Posted by carlos67

My apologies, an oversight, corrected

Thank you sir. And great write up btw
9th June 2018, 09:14 PM |#9  
Jaysp656's Avatar
Senior Member
Thanks Meter: 42
 
More
Something to note is the Renovate ICE 1.0 magisk module messed with the text in settings on OOS 5.1.6. It went back to normal when I disabled that module.

I thought it was the VoEnabler module initially but I wasnt correct.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180609-160157.jpg
Views:	420
Size:	218.6 KB
ID:	4522414  
9th June 2018, 10:04 PM |#10  
Senior Member
Flag SLC
Thanks Meter: 48
 
Donate to Me
More
I put the zip in the root folder (Not the actual folder named root) but the local upgrade isn't showing anything in there.
I'm on 5.1.5 rooted with Magisk 16.0 and have 5.7 magisk manager installed along with xposed and gravity box.
Any idea why my local upgrade isn't detecting the upgrade zip? I downloaded it from Funk Wizards post. I got clicked the "official" link for OOS 5.1.6
9th June 2018, 10:07 PM |#11  
Lownita's Avatar
Senior Member
Flag Germany
Thanks Meter: 343
 
More
I have a custom kernel and magisk installed, can I still follow this guide?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes