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
source: removed all SuSFS code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
1
manager/app/src/main/jniLibs/.gitignore
vendored
1
manager/app/src/main/jniLibs/.gitignore
vendored
@@ -1,2 +1 @@
|
||||
libksud.so
|
||||
libsusfs.so
|
||||
@@ -19,8 +19,6 @@
|
||||
<string name="home_failure">Tandatangan KernelSU Next v2 tidak ditemukan pada kernel! [ !KSU_NEXT || != size/hash ]</string>
|
||||
<string name="home_failure_tip">Mohon agar para pengembang kernel anda mengintegrasikan 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">Versi Android</string>
|
||||
<string name="home_manager_version">Versi Manager</string>
|
||||
<string name="home_selinux_status">Status SELinux</string>
|
||||
@@ -92,8 +90,6 @@
|
||||
<string name="require_kernel_version">Versi KernelSU-Next %d terlalu rendah agar manajer berfungsi normal. Harap membarui ke versi %d atau di atasnya!</string>
|
||||
<string name="settings_umount_modules_default">Melepas Modul secara bawaan</string>
|
||||
<string name="settings_umount_modules_default_summary">Menggunakan \"Umount Modul\" secara universal pada Profil Aplikasi. Jika diaktifkan, akan menghapus semua modifikasi sistem untuk aplikasi yang tidak memiliki set profil.</string>
|
||||
<string name="settings_susfs_toggle">Sembunyikan kait su yang mencurigakan</string>
|
||||
<string name="settings_susfs_toggle_summary">Ini menonaktifkan hook kprobe yang dibuat oleh ksu, dan sebagai gantinya hook inline non-kprobe akan diaktifkan, sama seperti implementasi yang sama untuk kernel non-gki tanpa dukungan kprobe.</string>
|
||||
<string name="profile_umount_modules_summary">Aktifkan opsi ini agar KernelSU dapat memulihkan kembali berkas termodifikasi oleh modul pada aplikasi ini.</string>
|
||||
<string name="profile_selinux_domain">Domain</string>
|
||||
<string name="profile_selinux_rules">Aturan</string>
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
<string name="home_failure">内核中未找到 KernelSU Next v2 签名! [ !KSU_NEXT || != size/hash ]</string>
|
||||
<string name="home_failure_tip">请让你的内核开发人员集成 KernelSU Next!</string>
|
||||
<string name="home_kernel">内核版本</string>
|
||||
<string name="home_susfs">SuSFS: %s</string>
|
||||
<string name="home_susfs_version">SuSFS</string>
|
||||
<string name="home_android">安卓版本</string>
|
||||
<string name="home_manager_version">管理器版本</string>
|
||||
<string name="home_selinux_status">SELinux 状态</string>
|
||||
@@ -94,8 +92,6 @@
|
||||
<string name="require_kernel_version">当前 KernelSU-Next 版本 %d 过低,管理器无法正常工作,请升级内核 KernelSU-Next 版本至 %d 或以上!</string>
|
||||
<string name="settings_umount_modules_default">默认卸载模块</string>
|
||||
<string name="settings_umount_modules_default_summary">App Profile 中\"卸载模块\"的全局默认值,如果启用,将会为没有设置 Profile 的应用移除所有模块针对系统的修改。</string>
|
||||
<string name="settings_susfs_toggle">使用 SuSFS 隐藏可疑的 su</string>
|
||||
<string name="settings_susfs_toggle_summary">它会禁用由 ksu 创建的 kprobe 钩子,并启用非 kprobe 的内联钩子,与不支持 kprobe 的非 gki 内核具有相同的实现。</string>
|
||||
<string name="profile_umount_modules_summary">启用后将允许 KernelSU-Next 为本应用还原被模块修改过的文件。</string>
|
||||
<string name="profile_selinux_domain">域</string>
|
||||
<string name="profile_selinux_rules">规则</string>
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
<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 Version</string>
|
||||
<string name="home_susfs">SuSFS: %s</string>
|
||||
<string name="home_susfs_version">SuSFS</string>
|
||||
<string name="home_susfs_sus_su">SuS SU</string>
|
||||
<string name="home_android">Android Version</string>
|
||||
<string name="home_manager_version">Manager Version</string>
|
||||
<string name="home_selinux_status">SELinux Mode</string>
|
||||
@@ -95,8 +92,6 @@
|
||||
<string name="require_kernel_version">The current KernelSU-Next version %d is too low for the manager to work properly. Please upgrade to version %d or higher!</string>
|
||||
<string name="settings_umount_modules_default">Umount modules by default</string>
|
||||
<string name="settings_umount_modules_default_summary">The global default value for \"Umount modules\" in App Profile. If enabled, it will remove all module modifications to the system for apps that don\'t have a profile set.</string>
|
||||
<string name="settings_susfs_toggle">Hide suspecious su hooks</string>
|
||||
<string name="settings_susfs_toggle_summary">It disables kprobe hooks made by ksu, and instead the non-kprobe inline hooks will be enabled, just the same implementation for non-gki kernel without kprobe supported.</string>
|
||||
<string name="profile_umount_modules_summary">Enabling this option will allow KernelSU-Next to restore any modified files by the modules for this app.</string>
|
||||
<string name="profile_selinux_domain">Domain</string>
|
||||
<string name="profile_selinux_rules">Rules</string>
|
||||
|
||||
Reference in New Issue
Block a user