modified: src/main.rs
Some checks failed
gitea/Frida-android-native/pipeline/head There was a failure building this commit
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:
parent
d23578373d
commit
be7193a2f2
@ -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]
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user