Every new Android version carries few implications that would affect the normal rooting procedure. In the same manner, manufacturers too might add different layers of security. As a live proof, Samsung injected a new security feature known as ‘DEFEX‘ that would prevent you from rooting your Samsung Galaxy device running Android Oreo. If you’d like to properly root your Samsung Galaxy device on Oreo, then this tutorial will help you easily disable DEFEX security.
Recently, many Galaxy smartphones including the Note 9, A8/A8+, J7 Pro, and J5 Pro received the Android Oreo update. However, not much later users realized that rooting their phones on Oreo didn’t succeed. Although, flashing Magisk/SuperSU would work, but the apps that required root permissions would fail rigorously.
Back in September, a guest user on XDA posted a thread explaining the cause to this problem and put Samsung’s new security feature ‘DEFEX’ at fault. According to him, this new security feature in the latest Samsung firmware prevents any process to run as root, until it is has been whitelisted in the provided kernel source code. A good example of this would be apps like Titanium Backup and ES File Explorer, which when trying to run an executable in /data/local/tmp, gets killed.
To sum up, even if you manage to successfully flash Magisk/SuperSU to root your Samsung Galaxy device on Oreo, many root-enabled apps/mods/Magisk modules would fail to run.
Recommended: How to Bypass Pre-normal RMM State on Samsung
How to Disable DEFEX Security Feature on Samsung Galaxy Devices?
Even more recently, another XDA forum member – AndroidDef came up with a solution that would help you easily disable DEFEX security to root your Galaxy device on Oreo. Upon thorough research, the forum member found a HEX patch that when injected into the Magisk/SuperSU boot patching process disables the new security feature. Finally, he compiled the new modified root packages for the users. Simply follow the instructions below.
- Download DEFEX patched Magisk/SuperSU zip package:
- Make sure to transfer the downloaded package to the phone’s storage, if you have downloaded it on your PC.
- Boot your Samsung Galaxy device into TWRP recovery mode.
- Tap on the ‘Install’ button.
- Navigate to the location where the zip file was downloaded/transferred.
- Select the zip file and swipe the button on the screen to disable DEFEX security feature on your Samsung Galaxy device.
- Once the flashing process finishes, tap on ‘Reboot System’.
When your phone boots back into the OS, you should be able to run root-enabled apps/Magisk modules on it.
At the time of writing this, the following Samsung smartphones contain this new DEFEX security feature:
- Galaxy A8 / A8+ 2018 – 8.x.x – (SM-A530F / SM-A730F) – Tested
- Galaxy J7 Core – 8.x.x – (SM-J701F) – Not Tested
- Galaxy J7 Pro – 8.x.x – (SM-J730*) – Tested
- Galaxy J5 Pro – 8.x.x – (SM-J530*) – Not Tested
- Galaxy Note 9 – 8.x.x – (SM-N960F – Base: RH & RI) – Tested
As you can see, users have already confirmed that this new patch works flawlessly on Galaxy A8/A8+, J7 Pro, and Note 9 running the latest Android Oreo firmware. If the regular rooting process is not working for your Samsung Galaxy device and you’re looking for a solution, then do give a try to the DEFEX patched Magisk/SuperSU package provided here. Credits for all this go to XDA member AndroidDef!
So, this was our tutorial to help you disable DEFEX security to root Samsung Galaxy devices on Oreo. If you have any questions, please leave a comment below.