FORUMS
Remove All Ads from XDA
H10 GPU

[RECOVERY][OFFICIAL] TWRP for Galaxy S9 and S9+ (Exynos)

792 posts
Thanks Meter: 5,860
 
By jesec, Recognized Developer / Contributor on 15th March 2018, 05:05 AM
Post Reply Email Thread
Team Win Recovery Project
Exynos variants such as International (F), International Dual(Hybrid)-SIM (F/DS), Korean (N) ONLY.
In NO way it is compatible with Snapdragon variants including but not limited to American(U/U1/A/T/P/V), Chinese(0/8/6), Hong Kong(0), Japanese(SC-*), Canadian(W) variants.

#include <std_disclaimer.h>

Screenshot - Home Screenshot - Backup Name

Special Notes:
1. READ THE GUIDE.
2. KNOX will be tripped once you flashed custom binaries to your phone.
(Your warranty may be voided. However, this may not affect you if your country, European Union, for example, forces Samsung to provide hardware warranty regardless of software status.)
More Infos: https://en.m.wikipedia.org/wiki/Root...erating_system
3. Samsung Firmware OTA (aka System Updates) will no longer work once you flashed custom binaries.
(You can flash custom ROMs if you want to keep the OS up-to-date.)
4. It is HIGHLY UNRECOMMENDED to purchase any access to any kind of private forums, ROMs or Kernels.
(DO NOT GET FOOLED.)
5. You HAVE to use newer version of Odin (>3.13) if you want to flash stock ROMs.

Download:
Galaxy S9:
https://twrp.me/samsung/samsunggalaxys9.html

Galaxy S9+:
https://twrp.me/samsung/samsunggalaxys9plus.html

Sources:
https://github.com/TeamWin

Changelog:
Check #2.

Guide:
Check #3.

Official Telegram Group: - Discussion, Testing, Feedback and Support
Invite Link

Show your appreciation:
Click Thanks!, Rate 5-star or/and Donate to me.

To contribute:
TWRP Code Review
Github pull requests will be ignored.


XDA:DevDB Information
TWRP for Galaxy S9 and S9+, Tool/Utility for the Samsung Galaxy S9+

Contributors
jesec
Source Code: https://github.com/TeamWin


Version Information
Status: Stable

Created 2018-03-15
Last Updated 2018-08-15
The Following 68 Users Say Thank You to jesec For This Useful Post: [ View ]
 
 
15th March 2018, 05:05 AM |#2  
jesec's Avatar
OP Recognized Developer / Contributor
Flag SF Bay Area
Thanks Meter: 5,860
 
Donate to Me
More
Changelog:
Note that this page only includes device-specific changes. For global TWRP changes, go to twrp.me.

Apr 18, 2018 (twrp-3.2.1-2):
Refactor USB configurations (fixes ADB)
Remove /cpefs from filesystem table (fixes /cpefs warning/error)
Rebase Kernel to ARCC. (fixes I/O performance issues)
Use correct OTG mount path
Enable software encryption support (general AOSP only, Samsung method remain unsupported)

Mar 16, 2018 (twrp-3.2.1-1):
Add system_image, vendor_image
Rename display name of /odm to "Carrier Configs"

Mar 15, 2018:
USB connection fixes

Mar 14, 2018:
Initial version
The Following 19 Users Say Thank You to jesec For This Useful Post: [ View ]
15th March 2018, 05:05 AM |#3  
jesec's Avatar
OP Recognized Developer / Contributor
Flag SF Bay Area
Thanks Meter: 5,860
 
Donate to Me
More
Guides:
Be aware that Android Verified Boot requires data (including those in internal storage) to be cleared after you unlocked bootloader and flash custom binaries. ("to protect user data, all state transitions wipe the data partitions and ask the user for confirmation before data is deleted." - https://source.android.com/security/.../verified-boot)
It is normal to get prompts like "Integrity verification failed. You have to reset the device to factory settings."
However, this will only happen when there is "state transition" so only when you switch from locked to unlocked or vice versa.

Since Android O, Samsung introduced a new security feature, Remote Mobile Manager (RMM) aka Remote Lock Control (RLC). This feature allows stronger theft protection but unfortunately it also imposes a burden on users like you.
Samsung added a 7-day buffer period for enterprises or device owners to spot a missing/rogue device so they can use this feature to lock the device remotely.
In this 7-day (Prenormal) period, you can NOT flash any custom binaries including but not limited to this TWRP. OEM Unlock option won't appear, either.
(You will meet "custom binary blocked due to remaining installment balance" or "custom binary not allowed" error when you try)
The 7-day timer will start/reset once you completed the setup wizard. After 7 days (168 hours), RLC service will send an inquiry to Samsung's server. If your device is "clean", the RMM state will become "Normal".
Then you can enable "OEM Unlock" option and flash TWRP. Be careful, [B][COLOR="Red"]DO NOT reboot to a stock ROM before you flash patch in part 2 of this guide or you will have to go through another

Whether you have RMM problem or not depends on your model, region and/or carrier.
If you don't have any wait period to enable OEM Unlock option, congratulations but please do NOT mislead other 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 note that this problem applies to MAJORITY of people.

Note that the special patch will freeze RMM, FRP and OEM lock state.
This is an anti-stupid measure to prevent careless users from enabling security measures which are not compatible with custom binaries.

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.

Part 2 - HOW-TO INITIALIZE TWRP:
1. If you completed Part 1 successfully, you should be in TWRP now. At this point, you will reach the screen asking you if you want to allow system modifications.
2. Select "Keep /system RO".
3. Go to "Wipe" menu of TWRP and you will find "Format Data". Press "Format Data" and type "yes" to continue.
4. Go to "Reboot" menu and Press "Recovery" to reboot TWRP.
5. Download the special dm-verity and force encryption disabler zip on your computer.
6. Transfer the zip to your phone.
- Option 1: MTP: Connect your phone with computer and just copy the zip to internal storage. (similar to how you transfer files when in system.)
- Option 2: ADB: Connect your phone with computer and run command "adb push /path/to/zip /sdcard/".
- Option 3: External SD: Copy the zip to an external SD and then insert the card to your phone.
7. Go to "Install" menu of TWRP and flash the zip.

TWRP is initialized and fully functional at this stage.

Now you may want to flash a root solution (Magisk, SuperSU, etc) or custom ROM but keep in mind that:
1. This thread does NOT provide technical support to any root solution or ROM unless the problem is DIRECTLY related to TWRP and there is no other solution without modifying TWRP itself.
Please contact developer of respective ROM or root solution for technical support.
2. Samsung implemented security measures such as "Real-time Kernel Protection (RKP)" and "RKP Control Flow Protection". https://www.samsungknox.com/en/blog/...protection-rkp
Those security measures are intended to block control flows such as privilege escalation, memory kernel code modification, etc which are not authorized by Samsung.
If those are not disabled, processes (such as daemon of root solutions) that violated those security rules will fall into deadlock.
Deadlocked processes will then consume large amount of resources (leads to performance issues, battery drains) and eventually crash the system.
Technically it is possible to disable those security measures by hex editing stock kernel but just simply flash a custom kernel is better in my opinion.
TL;DR: Flash custom kernel before root or be screwed.
Attached Files
File Type: zip Magisk-v16.3.zip - [Click for QR Code] (9.39 MB, 1928 views)
The Following 25 Users Say Thank You to jesec For This Useful Post: [ View ]
15th March 2018, 05:31 AM |#4  
iamnotkurtcobain's Avatar
Senior Member
Flag Vienna
Thanks Meter: 4,182
 
More
Awesome work Jesse. Thank you!
15th March 2018, 06:05 AM |#5  
spackeddie01's Avatar
Member
Thanks Meter: 12
 
More
Has anybody flash it on a galaxy s9+?

Gesendet von meinem SM-G950F mit Tapatalk
15th March 2018, 08:30 AM |#6  
Pho3nX's Avatar
Senior Member
Thanks Meter: 1,248
 
More
@jesec hey mate, happy to see you again (S7 ROM)

Sorry i don't have this device but my friend will try soon
15th March 2018, 08:45 AM |#7  
Junior Member
Flag Amsterdam
Thanks Meter: 4
 
Donate to Me
More
Quote:
Originally Posted by spackeddie01

Has anybody flash it on a galaxy s9+?

Gesendet von meinem SM-G950F mit Tapatalk

I did try it on my Exynos S9+ but it didnt work. Maybe im doing something wrong. Odin says PASS! Then the S9+ reboots but hangs on: Verification error. Cant reboot device. The integrity verification didnt succeed. U have to reset the device to factory settings. Bla bla bla. And the option to reset. By the way, my device os is in dutch so i did try to translate the notification on the screen of the phone.
15th March 2018, 08:53 AM |#8  
jesec's Avatar
OP Recognized Developer / Contributor
Flag SF Bay Area
Thanks Meter: 5,860
 
Donate to Me
More
Quote:
Originally Posted by BokkieAndijk

I did try it on my Exynos S9+ but it didnt work. Maybe im doing something wrong. Odin says PASS! Then the S9+ reboots but hangs on: Verification error. Cant reboot device. The integrity verification didnt succeed. U have to reset the device to factory settings. Bla bla bla. And the option to reset.

Please boot to recovery instead of system.

Be aware that Android Verified Boot requires data to be cleared after you unlocked bootloader and flash custom binaries. ("to protect user data,*all*state transitions wipe the data partitions and ask the user for confirmation before data is deleted." - https://source.android.com/security/.../verified-boot) It is normal to get such prompt.
15th March 2018, 09:01 AM |#9  
Duncan1982's Avatar
Senior Member
Thanks Meter: 1,502
 
More
Got twrp installed formatted data, rebooted twrp, do we need Dm-Verity? If so how to get it on as MTP is not working, or OTG, and system bootloop so can't get back in to do it that way.
15th March 2018, 09:27 AM |#10  
iamnotkurtcobain's Avatar
Senior Member
Flag Vienna
Thanks Meter: 4,182
 
More
Quote:
Originally Posted by BokkieAndijk

I did try it on my Exynos S9+ but it didnt work. Maybe im doing something wrong. Odin says PASS! Then the S9+ reboots but hangs on: Verification error. Cant reboot device. The integrity verification didnt succeed. U have to reset the device to factory settings. Bla bla bla. And the option to reset. By the way, my device os is in dutch so i did try to translate the notification on the screen of the phone.

You have to flash dm-verity/magisk.
The Following User Says Thank You to iamnotkurtcobain For This Useful Post: [ View ] Gift iamnotkurtcobain Ad-Free
15th March 2018, 09:54 AM |#11  
Junior Member
Flag Amsterdam
Thanks Meter: 4
 
Donate to Me
More
****! I think i did something very wrong. When i want to reboot system in TWRP it says: are you sure u like reboot the system? N OS installed.
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