yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S9 & S9+ Cross Device Development] Denis Meissner1990:
Huge thanks buddy :)

Yeah, as I wrote, I wouldn't do anything before I absolutely know what I'm doing to prevent the 7 days

So I'm at the same point.

If I toggle, I get the factory reset warning -.- so I cancelled it directly

But I think I will try option 3

Only thing that would happen is a factory reset right?

If I can't flash anything, nothing would happen I think

I only have this device, it will be very hard if it doesn't boot anymore :/

So I save all my data and try

Perfect, now I understood the step by step with OP's instructions

I will give feedback if it worked with directly boot to Download Mode after toggle, otherwise I have to wait :(

Is it right that I shouldn't restart my phone in this 7 days? Or lose my internet connection?

what should I put attention on?

Thank you very much :)
[Samsung Galaxy S9 & S9+ Cross Device Development] muhammadshais:
U can restart and loose Internet connection just don't reset the phone from settings or flash anything via odin or reset from recovery.
[Samsung Galaxy S9 & S9+ Cross Device Development] Denis Meissner1990:
Yeah?

Okay perfect

I have read anywhere those things, don't restart, hold internet connection...

Okay, so thank you :)

Now I will save my data and then try

C Ya
[Samsung Galaxy S9 & S9+ Cross Device Development] Alarand:
My oem unlock option just showed up after the initial 7 day wait, was hidden when I got the phone. As jesec suggested, I was able to boot into download mode and flash twrp etc after toggling oem unlock and accepting the factory reset prompt, prior to the phone rebooting and completing the reset.

Haven't rooted yet but no prenormal in download and oem and frp = off
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
You are lucky. When I did the reset, Prenormal prevented me from being able to do anything. After toggling OEM unlock, Prenormal kept me from installing TWRP, so had to wait another 7 days before I could go any further.

When I first toggled it out of the box, no reset was required, so very confusing as to Samsung's BS here - its all over the map.
[Samsung Galaxy S9 & S9+ Cross Device Development] Alarand:
If you don't actually allow the factory reset to happen then you shouldn't* get prenormal as far as I'm aware
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Even if you do allow the reset, you don't (necessarily) get lumbered with RMM prenormal status.

I had OEM Unlock available right away, as soon as I had turned on the device for the first time and opened up the Developer Options. I toggled it, accepted the reset of the device, and rebooted into download mode. OEM Lock and FRP Lock were off, and there was no mention of RMM. I installed TWRP according to the OP here, and everything was fine.
[Samsung Galaxy S9 & S9+ Cross Device Development] Alarand:
Did you actually boot into system from the required reboot or did you accept the prompt then immediately boot to download when the phone turned off? I was trying to say I did the latter. Worked for me anyway.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Yes, I let it boot into system, and only then booted into download mode to install TWRP.

Before I turned on OEM Unlock, I also did a firmware update to ARCC via wi-fi.
[Samsung Galaxy S9 & S9+ Cross Device Development] tiskewlio:
From my understanding, oem unlock option is available as soon as developer options are turned on? And only goes to jail if it completes the factory reset?

My new G960F/DS did NOT have the oem unlock option out the box so I assume it is in jail and will need to wait 7 days before it appears. Anyone else go straight to jail from new device?
[Samsung Galaxy S9 & S9+ Cross Device Development] Denis Meissner1990:
Yeah, that could be my text :D

Exactly what i had ^^

??? to Samsung and welcome to twrp, root and Custom Rom's on my Galaxy S9

To answer [MENTION=5258828]Alarand[/MENTION] : when you switch the toggle, you get the notification about factory reset, the trick by Samsung is, it shows that the reset would happen after YOU restart your phone next time. But Samsung does it immediately, so one second I was confused what to do now because this was a step I never read anywhere in this thread. But I was lucky, totally confused and brain afk, I immediately hold the buttons to restart to download mode, so DON'T let it boot to system and you're lucky

I saw the FRP and OEM lock Off, nothing about RMM, okay, I tried the steps in OP to get twrp

So far it worked, but:

After flash it booted to twrp, I saw the twrp "bootsplash" but I didn't get into it, my phone has restarted into sysyem automatically, so another time I was confused, also never read

But, I hold Volume Down, Bixby and Power to shut off and then immediately switched to Volume Up, Bixby and Power and then after a few seconds, Tadaaa, I was in twrp and followed step 2 in OP, after that I installed my preferred Rom and done :)

Edit: 1 Minute after I posted this, I got a message about an OTA is ready to install ??? Version ARD1

How is that possible?

Edit: solved it, was Rom related :D

Okay so I'm well done now
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
No, your details differ slightly from mine on one key point.

To be clear, I did not reboot directly to download mode after toggling OEM Lock. I let the device perform the factory reset that toggling OEM Lock triggered, and only then did I reboot to download mode.

I keep reading warnings from other XDA users that RMM will not be triggered if you avoid the factory reset that toggling OEM Lock usually causes, so I want to make absolutely clear that even allowing that reset to occur had no negative effect on RMM on my device. When I rebooted to download mode, there was still no mention of RMM at all.
[Samsung Galaxy S9 & S9+ Cross Device Development] jesec:
Just check the sources and mechanisms of Android by yourself.

ro properties are read-only. Whatever get set first stays.

/efs/factory.prop is loaded by /system/build.prop which is loaded earlier than /vendor/build.prop so the ro properties stay (in system's way) while the changeable properties will be overridden by props loaded later.

Whether you have RMM problem or not depends on your model, region and/or carrier.

Please stop misleading people. NOT EVERYONE IS AS LUCKY AS YOU.

If you don't have RMM problem when you get the device, it is unlikely that you will get any RMM problems later.

But for majority of people, their devices come with RMM problem so they will encounter it whenever they reset the device.
[Samsung Galaxy S9 & S9+ Cross Device Development] shouren04:
Most Exynos models have the RMM state feature but not all. For example N models usually aren't affected. Most F models are but not all. If you don't have RMM state in download mode, then your phone should not be affected by the 7 day jail crap but don't take my word for it.

I don't know the reason why some F models are not affected but for example, my N950F had OEM Unlock from day 1 & it has never disappeared, I have never been in jail. But my Note 8 is from the UK & originally had regional lock. The seller I purchased from inserted a sim from that region, placed a 5min+ call to lift the region lock before shipping to me. I believe that is the reason why my phone is not affected. There is no RMM state in download mode on my phone. Also makes no difference if I have vaultkeeper set to 1.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
You sound foolish.

I haven't misled anyone. I've stated exactly what happened in my individual case, and repeated in this and other threads that I have been very lucky.

You are responding to a comment I made in response to another user who said that his experience was exactly the same as mine, but in the details he gave, it was clear that it was not quite the same. I was just pointing that out for the sake of accuracy, because details can mean the difference between success and failure with something like this.

Indeed. Which is why I wrote:

Note the expression "don't (necessarily)".

---------- Post added at 11:17 ---------- Previous post was at 11:12 ----------

My S9+ is a 256 Gb unbranded F/DS unit for the generic Dutch market (PHN), just in case that information is useful to anyone.
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
FYI - I got into unlock and no reset (and no RMM of course at this time) out of the box also, and went straight to tarp, the security zips (but apparently an RMM for S8 that did not work), and the custom roms.

When it crashed, it would not boot and could not flash anything as TWRP was gone. So had to ODIN stock, but after 7 days (I also did a reset after Odin), OEM unlock was back, but after toggling it, it said to reset and I unfortunately did it, so prenormal popped up and took 7 more days.

So sometimes it doesn't bring up factory reset, but often it does, so what to do ?

In one case here, apparently the reset did not cause an RMM problem. However, no way to know what will happen before toggling it..

That is why i and others would like to know if after selecting the reset but then going from there into download mode- what shows on the screen (locks and prenormal) ???
[Samsung Galaxy S9 & S9+ Cross Device Development] _alexndr:
I have updated [MENTION=6911575]BlackMesa123[/MENTION]'s fix to work with S9/S9+ and contacted him to replace it in his post :cool: It will avoid future "failures" if somebody prefer his RMM fix habitually:

https://xdaforums.com/showpost.php?p=75360965

You're right, I have not noticed "import /efs/factory.prop" before :o

This is great idea then, because your fix "should" work even in case of flashing stock ROM :good:

There is one thing that I do not like in your security-patcher.sh - it performs r/w operations to /efs every time when your dm-verity fix is flashed - even if it is NOT really necessary!

patch_prop() {
print "Adding security property overrides..."
sed -i '/vaultkeeper/d' /efs/factory.prop
sed -i '/pst/d' /efs/factory.prop
echo "ro.security.vaultkeeper.feature=0" >> /efs/factory.prop
echo "ro.frp.pst=/dev/block/dummy" >> /efs/factory.prop
}

Modifying /efs should not be done unnecessarily, especially that your script does not perform /efs backup

I would suggest you to change it as below:

patch_prop() {
print "Adding security property overrides..."
cat /efs/factory.prop | grep "vaultkeeper.feature" >/dev/null || echo "ro.security.vaultkeeper.feature=0" >> /efs/factory.prop
cat /efs/factory.prop | grep "frp.pst" >/dev/null || echo "ro.frp.pst=/dev/block/dummy" >> /efs/factory.prop
}
[Samsung Galaxy S9 & S9+ Cross Device Development] jesec:
With all due respect, I don't think you truly understand how things work. Please improve your knowledge base, take a look at sources and understand how EFS works before you present things like this.

EFS is mounted as RW quite frequently. It is mounted as RW when in system. It is mounted as RW before this patch happen. This patch can't possibly corrupt EFS especially given its limited function and we know what we are doing.

It is absolutely unnecessary to do a check or something like that.

If you genuinely want to do a check given that you don't want to corrupt EFS, the correct flow should be mount it as RO, check, mount as RW if not patched and then patch.
[Samsung Galaxy S9 & S9+ Cross Device Development] _alexndr:
I thought I would get it in the face (because I dared to advise you) :p

I know that /efs is mounted r/w all time we are using our phone, you do not have to pay attention to it.

I understand that performed operation is just elementary text edit operation, but why not restrict it if it is not needed at the moment?

Theory is theory, but practice shows something completely different. I have some long-term experience and I know that over 99% of /efs failures (I mean things like lost IMEI and/or unable to make a call/transfer data) are caused by installing something through TWRP. It sometimes is ROM or MOD which even did not mounted /efs at all (just unexplained & unexpected failure)

With all due respect, booted Samsung's system and its services are much more trusted environment to mount and/or perform r/w operations to /efs than ANY TWRP

And YES - my ROM's installer mounts /efs r/o since a long time (if I need just to check CSC). It mounts /efs r/w only to perform physical changes (if these are really necessary)
[Samsung Galaxy S9 & S9+ Cross Device Development] rm501:
I would like to point out something that may help those attempting to install TWRP.

After I had flashed TWRP in ODIN I held Vol up + bixby + power while it restarted as per instructions.

It booted into TWRP HOWEVER it ran some operations/scripts very quickly and rebooted automatically. I quickly held the same combo again (Vol up + bixby + power) just in time and it booted back into TWRP. And then I could follow the rest of instructions.

If I wasn't quick enough, it could have booted into system and thus problems.

So that's a quick heads up, to be aware of and prepare for.

Hope it helps. Good luck
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
There are instructions in the OP to turn auto reboot off in ODIN so it doesn't reboot and mess things up.
[Samsung Galaxy S9 & S9+ Cross Device Development] rm501:
Not in ODIN, in TWRP.

The first boot to TWRP, it automatically ran some scripts and automatically rebooted the device without warning. I'm not sure if it was going to boot back into TWRP or SYSTEM, but I held the button combo anyways just to be safe.
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
Must have been the TWRP setting that comes up, and based on your choice, it does run something. It would have gone back to TWRP.
[Samsung Galaxy S9 & S9+ Cross Device Development] rfb813:
A week ago I got into TWRP and somehow must of hit a wrong button and it rebooted into the base software and was running correctly. Later when I had turned if off and started again it indicated it could only flash accepted binaries. I the installed stock software and the phone is working perfectly. How ever now after 8 days since I lost TWRP I have not gotten a OEM unlock, Would the 7 day begin after I installed the now software?

OK it just went on! Hope all goes well this time.
[Samsung Galaxy S9 & S9+ Cross Device Development] Poukhovitch:
Hello

After installing [ROM] [ALEXNDR] * U1ARCC * DevBase v5.6 * on my SM-G965F

the OEM unlock is present but wants me to do the "reset all the data" then I followed to see.

After installation I check in DOWNLOAD mode

OEM: OFF

FRP: OFF

NO mention of RMM

After I installed TWRP by ODIN

In TWRP I format the data

And install: 1) no-verity-opt-encrypt-samsung-1.0.zip

2) I REINSTALLED [ROM] [[ALEXNDR] * U1ARCC * DevBase v5.6 *

3) flashkernel 1.1.0

4) magisk v 16.3

Everything is functional

No prison of 7 days?

How to solve the problem of oem?

Sorry for the bad english
[Samsung Galaxy S9 & S9+ Cross Device Development] Python_69:
Hi, I found this information.

Is this true?

"While setting up a new phone, Samsung asks you to set up a Google Account and a Samsung Account. If you have already added both these accounts, the OEM Unlock option will appear after 7 days. If you skipped adding accounts at the startup, you are not going to get the option even after 7 days.

So, to enable missing OEM Unlock on Galaxy S8, S9 and Note 8, you simply have to go to Settings > Cloud and accounts > Add your Samsung account and sync it with your phone. Similarly, go to Settings > Google > Add your google account. Now wait for 7 days and the option will pop up under developer options. To enable developer options, you have to go to Settings > About phone > Software Information > Tap the build number for 7 times. You will get developer options in Settings now.
[Samsung Galaxy S9 & S9+ Cross Device Development] _alexndr:
Let's summarize: you have TWRP, my ROM, custom kernel, magisk and "everything is functional". So what is the problem?

I suppose that you just have OEM unlock toggle in "off" position - this is (reportedly) possible with some custom kernel(s) but in fact it is enabled (othervise it would not be possible to run custom binaries). It bothers you and everytime you are trying to enable it - the only effect is that system wants "reset all the data". Just leave it alone and don't touch OEM toggle ;)
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I can confirm that this happens. I have Soldier's ROM installed (with custom kernel), and even though he says OEM Unlock has been removed from the ROM, it still shows up in Developer Options for me. Although it shows as being turned off, that simply must be inaccurate, or the phone wouldn't work. Its legitimate status can be checked in download mode, and there it shows OEM LOCK OFF.

So yeah, leave that setting alone now. :)
[Samsung Galaxy S9 & S9+ Cross Device Development] ingalaxyz:
Hey guys, just a question.

I finally got the OEM unlock switch in the Dev options after flashing the stock rom twice and waiting about 7 days inbetween.

Went into download mode and there is no RMM state, only OEM and FRP on.

I assume that I can now safely turn OEM unlock on and start flashing.

Is there any chance I can flash TWRP and the verity / unlock patches, root and then wipe data? So I can have a full titanium backup?

Because I've already flashed stock ROM twice and without root I cannot use Titanium, therefore cannot make a backup of my apps + data, spent hours everytime to set them up again.

Searched extensively, no apps to backup apps + data without root ( unfortunately Helium crashes)
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
I use smart switch instead of titanium for most of the work and you don't need root.
[Samsung Galaxy S9 & S9+ Cross Device Development] abrahamjones:
Thanks for your effort.

Is it possible to flash "dm-verity and force encryption disabler" without formatting data (skipping Part 2 / 3 and 4) ? I am coming from 7-day period, OEM unlocked without needing to format data. I really do not want to format data. Any help is appreciated.
[Samsung Galaxy S9 & S9+ Cross Device Development] metal450:
So I got my new device 7 days ago (SM-G960F, 128gb dual sim). Turned it on, enabled developer options, & have been looking longingly at it as I wait for the days to tick by.

Settings->About Phone->Status->Up time just officially passed 168 hours...yet...there is no OEM Unlock in Developer Options. Is it supposed to just appear right away? Could there be a delay? Why wouldn't it have appeared? :(

Edit: Nevermind! It appeared at 168h7m - I guess there is a delay. Woo hoo, off I go!!
[Samsung Galaxy S9 & S9+ Cross Device Development] zimmerAndy:
[MENTION=6371894]jesec[/MENTION] thanks a lot for youre effort i follow the tkkg tread first and then came here i got twrp 3.2.1-1 from tkkg and then update it with twrp 3.2.1-2 from you and it works BUT!!! What i noticed is i can make a complete backup of rom on internal memory flawless! BUT on extsd and usbotg after backup the system it stops and give error and cleaned backup folder thats 1 backups made on internal if you copy the whole folder on extern sd and go to twrp for restore it only see the system and no data preload ect have i done something wrong or extern and usbotg not yet supported by twrp?? A bit strange cause i can flash a rom from usbotg any idea or tips for me????

My phone s9+ 965F/DS
[Samsung Galaxy S9 & S9+ Cross Device Development] hql:
I installed twrp-3.2.1-1-starlte.img.tar	on my Samsung S9 but when I try wipe from recovery I'm getting this error:

failed to mount '/cpefs' (read only system)

Is this bad?
[Samsung Galaxy S9 & S9+ Cross Device Development] :
Read the thread

And flash latest twrp
[Samsung Galaxy S9 & S9+ Cross Device Development] hql:
I have read the thread and it seems this issue is only fixed for the S9+ and not the S9 which is what I have, unless im wrong please point me in the right direction
[Samsung Galaxy S9 & S9+ Cross Device Development] ratsalad:
Jessec posted a while ago with a link for the s9

https://xdaforums.com/showpost.php?p=76275686&postcount=209
[Samsung Galaxy S9 & S9+ Cross Device Development] hql:
Appreciate it, thanks !
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
I have all this running pretty good after 2 cycles of 7 day jail, so don't want a repeat. Thanks jesec for the software and the instructions.

Question to anyone - will ODINing ONLY CP (modem) trigger any of the locks and/or RMM ?
[Samsung Galaxy S9 & S9+ Cross Device Development] _alexndr:
NO, it doesn't trigger RMM (you are well protected with the newest @jesec's no-verity-opt-encrypt*) :) I personally did it many times to avoid re-build my ROM with different modem files :good:
[Samsung Galaxy S9 & S9+ Cross Device Development] rfburen:
Help not necessary anymore. Option 1 from post #231 from this topic did the trick. I'm now running the latest 5.7 ARD6 DevBase ROM :) :)

After reading this topic for a long long time and having my S9 since the launch i finally took the step last night to flash TWRP. That was the idea at least. :(

I did (almost) all the steps like mentioned here but after step 3, so enable OEM unlock, i got a screen to type in my security code. I'm not sure if we should have done this. Should i have typed in the code or not??

Because after typing in that security code i rebooted to download mode

(by using - Hold [VOLUME DOWN] + [BIXBY] + [POWER] for approx. 15 seconds- press [VOLUME UP] to get into Download mode)

and when i wanted to flash TWRP (with the newest ODIN 3.13.1) by using step 5 until 11 the flash failed with an error that FRP lock is on. :(

OH and i didn;t do step 2. Might that be an issue too?

OH 2 i also just found out that i didn't USB Debugging on :( Is that bad?

Part 1 - HOW-TO FLASH TWRP:

1. In your ROM, go to Settings -> About device. Tap 7 times on Build number to enable Developer options.

2. Go to Settings, remove all Samsung and Google accounts and if your device is registered to an enterprise, de-register it.

3. Go to Settings -> Developer options and enable OEM Unlock option.

Notice: This is "state transition" mentioned eailier.

NOTE: You will be asked to do a factory reset, that's normal.

BUT DO NOT LET IT COMPLETE THE WHOLE RESET PROCESS.

You should take a look at the whole guide and be prepared to use reboots as chances to flash or reboot into TWRP.

4. Download and Install Samsung Mobile Phones Drivers.

- Option 1: Download and Install Smart Switch for PC.

- Option 2: Download and Install standalone driver package.

5. Download and extract Odin (Samsung's Flash Tool) to your computer.

6. Download a .tar image of TWRP.

7. Reboot your device to download mode.

- Hold [VOLUME DOWN] + [BIXBY] + [POWER] for approx. 15 seconds.

- Read the warning carefully.

- If you agree, press [VOLUME UP] to get into Download mode. If you don't agree, STOP.

8. Open Odin and place that TWRP tar file in the [AP] slot.

9. Connect your phone.

10. Hold [VOLUME UP] + [BIXBY] + [POWER] on your phone and then press start on Odin.

11. Wait for the phone to reboot. DO NOT release [VOLUME UP] + [BIXBY] + [POWER] or you may not reboot into TWRP.
[Samsung Galaxy S9 & S9+ Cross Device Development] gaww:
I always had both accounts (2.) active and it not get in the way.
[Samsung Galaxy S9 & S9+ Cross Device Development] jfm91:
I am currently running stock rom. But I have installed TWRP, root and custom kernel.

I want to update to the newest stock rom. but I still want TWRP, root and custom kernel. What is the best way to do this?

Can I just flash the rom (downloaded from sammobile) in odin. And then flash TWRP-file in odin. And last flash kernel and super-su file?

Or do I need to do "Part 2" in guide post in this thread?
[Samsung Galaxy S9 & S9+ Cross Device Development] force70:
Still have to do part 2 of course as now that you flashed official firmware your encrypted again
[Samsung Galaxy S9 & S9+ Cross Device Development] MobFreak2799:
I checked the oem and frp status after unlocking the bootloader and they are off and rmm is not mentioned. So is it safe to flash twrp or should i wait for new magisk update where i can patch boot.img and flash it through odin which is easier. I just want to root my device.