You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: Detect SuSFS support
This commit is contained in:
@@ -267,6 +267,11 @@ private fun StatusCard(
|
||||
text = stringResource(R.string.home_module_count, getModuleCount()),
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
)
|
||||
Spacer(Modifier.height(4.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.home_susfs, getSuSFS()),
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,6 +398,16 @@ private fun InfoCard() {
|
||||
content = getSELinuxStatus(),
|
||||
icon = Icons.Filled.Security,
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(16.dp))
|
||||
val suSfsStatus = getSuSFS()
|
||||
if (suSfsStatus != "Unsupported") {
|
||||
InfoCardItem(
|
||||
label = stringResource(R.string.home_susfs_version),
|
||||
content = getSuSFSVersion(),
|
||||
icon = Icons.Filled.SettingsSuggest,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +120,28 @@ fun getModuleCount(): Int {
|
||||
}.getOrElse { return 0 }
|
||||
}
|
||||
|
||||
fun getSuSFS(): String {
|
||||
val shell = getRootShell()
|
||||
val result = ShellUtils.fastCmd(shell, "dmesg | grep -i susfs")
|
||||
|
||||
return if (result.isNotBlank()) {
|
||||
"Supported"
|
||||
} else {
|
||||
"Unsupported"
|
||||
}
|
||||
}
|
||||
|
||||
fun getSuSFSVersion(): String {
|
||||
val shell = getRootShell()
|
||||
val result = ShellUtils.fastCmd(shell, "su -c ksu_susfs show version")
|
||||
|
||||
return if (result.startsWith("v")) {
|
||||
result
|
||||
} else {
|
||||
"Unavailable"
|
||||
}
|
||||
}
|
||||
|
||||
fun getSuperuserCount(): Int {
|
||||
return Natives.allowList.size
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
<string name="home_failure">KernelSU Next v2 signature not found in kernel! [ !KSU_NEXT || != size/hash ]</string>
|
||||
<string name="home_failure_tip">Ask your kernel developer to integrate KernelSU Next!</string>
|
||||
<string name="home_kernel">Kernel</string>
|
||||
<string name="home_susfs">SuSFS: %s</string>
|
||||
<string name="home_susfs_version">SuSFS</string>
|
||||
<string name="home_android">Android</string>
|
||||
<string name="home_manager_version">Manager</string>
|
||||
<string name="home_selinux_status">SELinux</string>
|
||||
|
||||
Reference in New Issue
Block a user