[Samsung Galaxy Note 8 Questions and Answers] btyeh:
Successful OEM stick + TWRP + Magisk root + Xposed on Dr.Ketan ROM N6

Okay guys, after almost a month coming in and out of jail, I believe I have found a method that keeps has OEM immediatately before 7 days (168hrs), and the option survives successive reboots (including rebooting from TWRP, more on that later). This is a mishmash of various other XDA members' trials and errors, so thank you to you all!

=============================

Background Information:

Phone model: SM-N950F/DS (Dual SIM)

Purchase location: Taiwan (Outright/Unlocked)

Shipped firmware version: N950FXXU1AQI8 (BRI)

Available for download from Sammobile here (just for reference): https://www.sammobile.com/firmwares/galaxy-note8/SM-N950F/BRI/download/N950FXXU1AQI8/190032/

OEM Unlock option was NOT available out of the box. Had to activate Developer Options (Settings > About Phone > Software Information > tap Build Number until option appears).

An Australian carrier: OPTUS SIM card was always inserted. Also a microSD card.

=============================

My goal at this point was to root a STOCK ROM with TWRP, Magisk, and Xposed.

Round 1 - Initial Setup: (Note: Does not work)

Coming from an Galaxy S7 Edge and skipping the Galaxy S8 (where the OEM Unlock issue first started appearing I believe?), I believed it was easy.

Download Mode > Odin + flash TWRP > TWRP flash Magisk > Reboot.

Simple right? Nope! I got the "Only official released binaries are allowed to be flashed" red message, and refused to boot further. (issue #1)

Round 2 - Next, followed the initial guides in this massive thread: (Note: Does not work)

Had to reflash official firmware (from above), and go through the initial setup.

Factory Reset again. Initial setup + connect to Wi-Fi + sign in to Google & Samsung accounts. Activate Developer Options, and left the phone on & connected to the internet for 7 days.

Upon 7 days, OEM Unlock appears. Activated it. Rebooted to test if it sticks. It does stick through reboots up to this point. :good:

Power down, enter Download Mode, flashed TWRP 3.1.1-0 Greatlte V3, and let it reboot the phone automatically (issue #2).

When you do this, OEM Unlock DISSAPEARS for another 7 days. Same as above, connected to the internet, left on, did not reboot.

Once again after 7 days, OEM Unlock appears. Rebooted to test if it sticks. It does stick through reboots up to this point. :good:

Reboot into TWRP, flash Magisk 14.3(1437), then reboot. Once again, OEM Unlock dissapears for 7 days (Noticing a trend here?).

Here is where I got stuck and had to completely abandon this method: After 7 days again I rebooted into TWRP to try install Xposed. However I realised I had not copied the file to the external SD, and did not flash anything. (Note it wasn't a failed flash, I went TWRP > flash file > backed out > system reboot) (issue #3).

Once again, I expected that I had to wait 7 days. However, after 7, 8, 9, 10 days... OEM Unlock still had not come back. I have read about people never getting OEM Unlock, but not people that had it, and then dissapeared. I am not sure what happened by just rebooting into TWRP and backing out doing nothing, but the OEM Unlock toggle seemed to have dissapeared for good.

Issues Explained:

Issue #1 - Unlearn all previous Samsung root methods you've had on your previous Samsung phones (unless you're lucky enough to have a device in a part of a world that does not have the OEM Unlock issues). We may be dealing with this from Samsung phones from here on out.

Issue #2 - Allowing Odin to reboot automatically seems to somehow toggle OFF OEM Unlock (without any patches), which coupled with either root or custom recoveries installed, causes a bootloop.

Issue #3 - Still no idea what happened here. I have not read a single report of OEM Unlock dissapearing by just LOOKING AROUND in TWRP, and not doing anything.

=============================

Round 3 - A Different Approach (i.e. Custom ROM): (Note: Try this, as it worked for me)

A theory of mine after so long was that there may be something in the stock ROM that I was using that was not being discussed in the entire thread here. Or, I was just not doing something right. Having heard other people have better luck with OEM Unlock with custom ROMs such as Renovate, Ice, or Dr.Ketan, I decided to give them a try.

Now I chose not to use some custom ROMs that have OEM Unlock activate, but HIDE the button, because I would like to know whether it is active without rebooting into Download Mode, Recovery, whatever (as a repeat of issue #3 above).

I decided to give Dr.Ketan a try. Available here: https://xdaforums.com/galaxy-note-8/development/29-09-17-dr-ketan-rom-jio-volte-n1-t3681163

And specifically, the N6 version.

Files to have on the external SD:

Dr.Ketan ROM

Xposed

Back to reinstalling a fresh stock firmware again + waiting 7 days. As above, did exactly the same process from Round 2 - Steps 1, 2, and 3.

On the stock firmware, having made sure OEM Unlock sticks through normal reboots, reboot into Download Mode + open Odin on your computer.

Now, download the custom ROM into external SD.

Select the recovery (in my case TWRP), under the AP section of Odin. NOW WAIT, DO NOT PRESS START.

Time to do some finger-yoga. What you will need to do is to press the relevant buttons to go into Recovery, BEFORE pressing Start in Odin to flash TWRP, because the flashing process goes by really quickly, and we need to prevent the phone from booting into the system.

(To reboot into recovery, press and HOLD, NOT TAP, Vol.Up + Bixby + Power until recovery appears. I messed that up on more occasions than I care to admit.)

The Setup:

Computer mouse over Odin's Start button, but do not press yet.

Finger on Vol.Up, another on Bixby, and one more on the Home button.

One more finger back on left-click of mouse.

The Process:

Press the Recovery buttons on the phone, then immediately press the Start button on Odin, while continuing to press the Recovery buttons on the phone until you actually enter Recovery.

The Timing:

I'm going to try to make a graph to show the timing of what must be done (in seconds):

0 sec ---------- 1 sec ---------- 2 sec ---------- 3 sec ---------- 4 sec ---------- 5 sec ---------- 6 sec ---------- 7 sec ---------- +

/\ Press and hold Recovery buttons ______________________________________________________ /\ Let go of Recovery buttons.

-------- /\ Press Start on Odin here.

---------------------------------------------------------- /\ Screen should change here.

------------------------------------------------------------------------------------------------------------- /\ Should see Recovery bootup here.

The Goal:

Odin has the option to untick auto-reboot, but I have not managed to be able to reboot into recovery after Odin has finished flashing a custom Recovery, and is just idling. That is why we need to let it reboot automatically but interupt booting into the system.

UNDER NO CIRCUMSTANCES DO YOU REBOOT AT ALL UNTIL THE VERY END. ANY PROMPT TO REBOOT MUST BE SKIPPED.

Now that you're in recovery, select and flash Dr.Ketan's custom ROM.

When the Recovery setup has completed, Dr.Ketan's own ROM setup will take over.

You will eventually come across an "OEM Patch" option. Select YES to the patch.

Complete the ROM setup, and you will jump back out into Recovery.

Now flash Xposed.

After Xposed is done, wipe Dalvik Cache, and ONLY NOW, reboot into system.

Having done all of that, now not only should you get a close-to-stock ROM with root + xposed, but OEM Unlock is available immediately and sticks after reboots. :fingers-crossed:

The only issue I have found so far is upon rebooting, there is a small red message on the top left, "Kernel is not seandroid enforcing". Not quite sure what that means but I am able to boot past with no issues. I'll come back to that later.

=============================

In Summary, Files Used:

Stock Firmware: N950FXXU1AQI8 (BRI)

Main page: https://www.sammobile.com/firmwares/galaxy-note8/SM-N950F/BRI/download/N950FXXU1AQI8/190032/

Custom ROM: Dr.Ketan Note 8 ROM (version N6)

Main page:

Download: http://www.drketanrom.com/note8.html

TWRP: TWRP 3.1.1-0 Greatlte V3

Main page: https://xdaforums.com/galaxy-note-8/development/recovery-twrp-galaxy-note-8-exynos-t3674036

Download: https://drive.google.com/file/d/0B7EuVd0yZ8ErSE5EQW12TVEtcVk/view?usp=sharing

Magisk: 14.5

(Included in Dr.Ketan's ROM, v14.5)

Xposed: xposed-v88.2-sdk25-arm64

Main page: https://www.xda-developers.com/official-xposed-framework-android-nougat/

Download: https://androidfilehost.com/?fid=889964283620762478

=============================

(Optional) Further Reading:

I saved the posts that gave me the inspiration to try all the things that I did above; some which are not listed (but does not work anyway). I've saved them in the order I came accross them, and if the methods above do not work for you, maybe by reading these specific posts below, we will be able to find another method that works:

zerenx:

https://xdaforums.com/showpost.php?p=74162894&postcount=1561

krabman:

https://xdaforums.com/showpost.php?p=74183349&postcount=1619

j3yps:

https://xdaforums.com/showpost.php?p=74071348&postcount=1126

dr.ketan:

https://xdaforums.com/showpost.php?p=74763412&postcount=2350

note2clie:

https://xdaforums.com/showpost.php?p=74869326&postcount=2778

(As you guys may or may not have noticed, I've spent a total of up to 5-6 weeks in jail. If I didn't have an S7 Edge to keep me sane I would of full-on raged for having to jump through so many hoops where it was so easy before. :rolleyes:)