Skip to content

Commit f95ca02

Browse files
committed
policy: add Android-specific hadling for detection
1 parent 3630490 commit f95ca02

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

apd/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apd/src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn report_kernel(superkey: Option<String>, event: &str, state: &str) -> Resu
3535
state.to_string(),
3636
];
3737
let args_ref: Vec<&str> = args.iter().map(|s| s.as_str()).collect();
38-
let result = utils::run_command("truncate", &args_ref, None)?.wait()?;
38+
let _ = utils::run_command("truncate", &args_ref, None)?.wait()?;
3939
Ok(())
4040
}
4141

apd/src/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ pub fn load_sepolicy_rule() -> Result<()> {
184184
}
185185

186186
info!("load policy: {}", &rule_file.display());
187-
let mut sepol = get_policy_main(&[
187+
let mut _sepol = get_policy_main(&[
188188
"magiskpolicy".to_string(),
189189
"--live".to_string(),
190190
"--apply".to_string(),

apd/src/supercall.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
use std::{
22
ffi::{CStr, CString},
3-
fmt::Write,
43
fs::File,
54
io::{self, Read},
65
process,
76
sync::{Arc, Mutex},
87
};
98

10-
use libc::{EINVAL, c_int, c_long, c_void, execv, fork, pid_t, setenv, syscall, uid_t, wait};
9+
use libc::{EINVAL, c_long, c_void, syscall, uid_t};
1110
use log::{error, info, warn};
1211

1312
use crate::package::{read_ap_package_config, synchronize_package_uid};

0 commit comments

Comments
 (0)