[T-Mobile Note 7  ROMs, Kernels, Recoveries, & Othe] jovy23:
Checking through some of the posts, it seems like there are users who ran into an issue with secure folder breaking because of having root on their device which is some form of knox security checking for su binary. When i decompiled KnoxSwitcher.apk I found that it seems to be the apk that may be causing this problem. When going into res/values/strings.xml there are three strings that points to some of the alert dialogs that you get while trying to open the Secure Folder application which you can see below:

<string name="sf_locked_by_root_device">Unauthorised software was set up on your device. Hence, Secure Folder has been locked to prevent unauthorised access. You can no longer access Secure Folder.</string>
<string name="alert_msg_header">Alert</string>
<string name="alert_msg_body">Secure Folder cannot be set up because unauthorised software was installed on the device.</string>

Now while heading to /smali/com/sec/knox/switcher/ContainerKLMSLockedActivity.smali and searching for const v39, 0x7f070025 you will see the code below which is the public id for

<string name="sf_locked_by_root_device">

:

invoke-static/range {v38 .. v38}, Landroid/os/PersonaManager;->isSecureFolderId(I)Z

move-result v38

if-eqz v38, :cond_15

.line 263
move-object/from16 v0, p0

iget-object v0, v0, Lcom/sec/knox/switcher/ContainerKLMSLockedActivity;->mContext:Landroid/content/Context;

move-object/from16 v38, v0

const v39, 0x7f070025

invoke-virtual/range {v38 .. v39}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v38

const/16 v39, 0x1

move/from16 v0, v39

new-array v0, v0, [Ljava/lang/Object;

Now while navigating to /smali/com/sec/knox/switcher/SwitchAliasActivity.smali and searching for .method private static showRootDeviceAlertDialog(Landroid/content/Context;)V you will see the code below which got both of the public ids from strings

<string name="alert_msg_header">

and

<string name="alert_msg_body">

which is the same alert popup message that you get while trying to open Secure Folder:

.method private static showRootDeviceAlertDialog(Landroid/content/Context;)V
.locals 4
.param p0, "ctx" # Landroid/content/Context;

.prologue
.line 600
new-instance v1, Landroid/app/AlertDialog$Builder;

new-instance v2, Landroid/view/ContextThemeWrapper;

const v3, 0x103012b

invoke-direct {v2, p0, v3}, Landroid/view/ContextThemeWrapper;-><init>(Landroid/content/Context;I)V

invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

move-result-object v0

.line 602
.local v0, "mDialog":Landroid/app/AlertDialog;
const v1, 0x7f070026

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setTitle(I)V

.line 603
const v1, 0x7f070027

invoke-virtual {p0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

.line 605
const/4 v1, -0x1

const v2, 0x104000a

invoke-virtual {p0, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v2

new-instance v3, Lcom/sec/knox/switcher/SwitchAliasActivity$3;

invoke-direct {v3, v0}, Lcom/sec/knox/switcher/SwitchAliasActivity$3;-><init>(Landroid/app/AlertDialog;)V

invoke-virtual {v0, v1, v2, v3}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

.line 611
new-instance v1, Lcom/sec/knox/switcher/SwitchAliasActivity$4;

invoke-direct {v1, v0}, Lcom/sec/knox/switcher/SwitchAliasActivity$4;-><init>(Landroid/app/AlertDialog;)V

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

.line 620
sget-object v1, Lcom/sec/knox/switcher/SwitchAliasActivity;->TAG:Ljava/lang/String;

new-instance v2, Ljava/lang/StringBuilder;

invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

const-string v3, "mIsAlertDialogShown = "

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

sget-boolean v3, Lcom/sec/knox/switcher/SwitchAliasActivity;->mIsAlertDialogShown:Z

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

.line 621
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

.line 622
const/4 v1, 0x1

sput-boolean v1, Lcom/sec/knox/switcher/SwitchAliasActivity;->mIsAlertDialogShown:Z

.line 623
return-void
.end method

I don't know what changes need to be made in order to get Secure Folder to work while being rooted, but i would go looking into the KnoxSwitcher.apk and go by the strings and code that i have found just to get an idea to get this thing fixed. Also i will be leaving more of my findings below that has to do with root that i found in other smali files.

Smali Files

/smali/android/support/v4/sec/knox/app/BackStackRecord.smali = Search For: sceneRoot or root multiple times.

/smali/android/support/v4/sec/knox/app/FragmentHostCallback.smali = Search For: const-string v0, "(root)".

There are other smalis just search for sceneRoot, root, and val$sceneRoot throughout the decompiled smali folder using notepad++.