manager: some ui changes

* Steeing: add enhanced security dropdown
* Settings: allow change module update check
* Settings: allow always enable/disable feat
* misc: update all deps

---------

Co-authored-by: weishu <twsxtd@gmail.com>
Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
ShirkNeko
2025-11-06 22:54:43 +08:00
parent 132e9ef8ed
commit 3dde6d9a25
15 changed files with 337 additions and 82 deletions

View File

@@ -16,6 +16,7 @@ const FEATURE_VERSION: u32 = 1;
pub enum FeatureId {
SuCompat = 0,
KernelUmount = 1,
EnhancedSecurity = 2,
}
impl FeatureId {
@@ -23,6 +24,7 @@ impl FeatureId {
match id {
0 => Some(FeatureId::SuCompat),
1 => Some(FeatureId::KernelUmount),
2 => Some(FeatureId::EnhancedSecurity),
_ => None,
}
}
@@ -31,6 +33,7 @@ impl FeatureId {
match self {
FeatureId::SuCompat => "su_compat",
FeatureId::KernelUmount => "kernel_umount",
FeatureId::EnhancedSecurity => "enhanced_security",
}
}
@@ -42,6 +45,9 @@ impl FeatureId {
FeatureId::KernelUmount => {
"Kernel Umount - controls whether kernel automatically unmounts modules when not needed"
}
FeatureId::EnhancedSecurity => {
"Enhanced Security - disable nonKSU root elevation and unauthorized UID downgrades"
}
}
}
}
@@ -50,6 +56,7 @@ fn parse_feature_id(name: &str) -> Result<FeatureId> {
match name {
"su_compat" | "0" => Ok(FeatureId::SuCompat),
"kernel_umount" | "1" => Ok(FeatureId::KernelUmount),
"enhanced_security" | "2" => Ok(FeatureId::EnhancedSecurity),
_ => bail!("Unknown feature: {}", name),
}
}
@@ -223,7 +230,11 @@ pub fn list_features() -> Result<()> {
}
}
let all_features = [FeatureId::SuCompat, FeatureId::KernelUmount];
let all_features = [
FeatureId::SuCompat,
FeatureId::KernelUmount,
FeatureId::EnhancedSecurity,
];
for feature_id in all_features.iter() {
let id = *feature_id as u32;
@@ -282,7 +293,11 @@ pub fn load_config_and_apply() -> Result<()> {
pub fn save_config() -> Result<()> {
let mut features = HashMap::new();
let all_features = [FeatureId::SuCompat, FeatureId::KernelUmount];
let all_features = [
FeatureId::SuCompat,
FeatureId::KernelUmount,
FeatureId::EnhancedSecurity,
];
for feature_id in all_features.iter() {
let id = *feature_id as u32;