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

This commit is contained in:
Michael Wain 2024-10-05 02:57:12 +03:00
parent bb07f66f5b
commit d26fadb5d7

View File

@ -25,7 +25,7 @@ pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_run(
tun_fd: jint, tun_fd: jint,
close_fd_on_drop: jboolean, close_fd_on_drop: jboolean,
) -> jint { ) -> jint {
let config = get_java_string(&mut env, &config_b32).unwrap(); let config = env.get_string(&config_b32).unwrap().into();
let close_fd_on_drop = close_fd_on_drop != 0; let close_fd_on_drop = close_fd_on_drop != 0;
mobile::mobile_run(config, close_fd_on_drop, tun_fd) mobile::mobile_run(config, close_fd_on_drop, tun_fd)
} }
@ -35,10 +35,6 @@ pub unsafe extern "C" fn Java_com_alterdekim_frida_FridaLib_stop(_env: JNIEnv, _
mobile::mobile_stop() mobile::mobile_stop()
} }
fn get_java_string(env: &mut JNIEnv, string: &JString) -> Result<String, Error> {
Ok(env.get_string(string)?.into())
}
/* /*
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {