modified: src/main.rs
Some checks failed
gitea/Frida-android-native/pipeline/head There was a failure building this commit

modified:   src/simple_log.rs
This commit is contained in:
Michael Wain 2024-10-06 02:37:24 +03:00
parent d23578373d
commit be7193a2f2
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_fetchLogs(
mut env: JNIEnv,
_clazz: JClass
) -> jstring {
String::from_utf8_lossy(simple_log::fetch_logs())
String::from_utf8_lossy(simple_log::fetch_logs()[..])
}
#[no_mangle]

View File

@ -6,7 +6,7 @@ struct ll {
pub rx: Receiver<Vec<u8>>
}
static l2: ll;
static mut l2: ll;
pub fn init_logger() {
let (tx, rx) = unbounded::<Vec<u8>>();
@ -15,7 +15,7 @@ pub fn init_logger() {
pub fn fetch_logs() -> Vec<u8> {
if let Ok(bytes) = l2.rx.recv() {
bytes
return bytes;
}
Vec::new()
}
@ -54,6 +54,6 @@ impl SimpleLogger {
record.module_path().unwrap_or(""),
record.args()
);
crate::push_log(msg.to_vec());
push_log(msg.to_vec());
}
}