source: removed all SuSFS code

This commit is contained in:
Rifat Azad
2025-01-04 17:33:03 +06:00
parent 6ae0737fba
commit ace36326cd
15 changed files with 7 additions and 731 deletions
@@ -69,17 +69,6 @@ class MainActivity : ComponentActivity() {
val isManager = Natives.becomeManager(ksuApp.packageName)
if (isManager) install()
// val prefs = getSharedPreferences("settings", MODE_PRIVATE)
// val isSUS_SU = getSuSFSFeatures()
// if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
// if (prefs.getBoolean("enable_sus_su", false)) {
// if (susfsSUS_SU_Mode() != "2") {
// susfsSUS_SU_2()
// }
// }
// }
setContent {
KernelSUTheme {
val navController = rememberNavController()
@@ -268,14 +268,6 @@ private fun StatusCard(
text = stringResource(R.string.home_module_count, getModuleCount()),
style = MaterialTheme.typography.bodyMedium
)
// Spacer(Modifier.height(4.dp))
// val suSFS = getSuSFS()
// if (suSFS == "Supported") {
// Text(
// text = stringResource(R.string.home_susfs, getSuSFS()),
// style = MaterialTheme.typography.bodyMedium
// )
// }
}
}
@@ -416,19 +408,6 @@ private fun InfoCard() {
content = stringResource(R.string.home_magic_mount),
icon = Icons.Filled.SettingsSuggest,
)
// Spacer(Modifier.height(16.dp))
// val isSUS_SU = getSuSFSFeatures() == "CONFIG_KSU_SUSFS_SUS_SU"
// val suSFS = getSuSFS()
// if (suSFS == "Supported") {
// val susSUMode = if (isSUS_SU) "| SuS SU mode: ${susfsSUS_SU_Mode()}" else ""
// InfoCardItem(
// label = stringResource(R.string.home_susfs_version),
// content = "${getSuSFSVersion()} (${getSuSFSVariant()}) $susSUMode",
// icon = painterResource(R.drawable.ic_sus),
// )
// }
}
}
}
@@ -160,32 +160,6 @@ fun SettingScreen(navigator: DestinationsNavigator) {
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
// val isSUS_SU = getSuSFSFeatures()
// if (isSUS_SU == "CONFIG_KSU_SUSFS_SUS_SU") {
// var isEnabled by rememberSaveable {
// mutableStateOf(susfsSUS_SU_Mode() == "2")
// }
// LaunchedEffect(Unit) {
// isEnabled = susfsSUS_SU_Mode() == "2"
// }
// SwitchItem(
// icon = Icons.Filled.VisibilityOff,
// title = stringResource(id = R.string.settings_susfs_toggle),
// summary = stringResource(id = R.string.settings_susfs_toggle_summary),
// checked = isEnabled
// ) {
// if (it) {
// susfsSUS_SU_2()
// } else {
// susfsSUS_SU_0()
// }
// prefs.edit().putBoolean("enable_sus_su", it).apply()
// isEnabled = it
// }
// }
var checkUpdate by rememberSaveable {
mutableStateOf(
prefs.getBoolean("check_update", true)
@@ -120,51 +120,6 @@ fun getModuleCount(): Int {
}.getOrElse { return 0 }
}
// private fun getSuSFSDaemonPath(): String {
// return ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libsusfsd.so"
// }
// fun getSuSFS(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} support")
// return result
// }
// fun getSuSFSVersion(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} version")
// return result
// }
// fun getSuSFSVariant(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} variant")
// return result
// }
// fun getSuSFSFeatures(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} features")
// return result
// }
// fun susfsSUS_SU_0(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} sus_su 0")
// return result
// }
// fun susfsSUS_SU_2(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} sus_su 2")
// return result
// }
// fun susfsSUS_SU_Mode(): String {
// val shell = getRootShell()
// val result = ShellUtils.fastCmd(shell, "${getSuSFSDaemonPath()} sus_su mode")
// return result
// }
fun getSuperuserCount(): Int {
return Natives.allowList.size
}