Magisk/native/src/boot/lib.rs

27 lines
496 B
Rust
Raw Normal View History

#![feature(format_args_nl)]
extern crate core;
2022-07-01 11:53:41 +00:00
pub use base;
2023-05-05 01:49:33 +00:00
pub use payload::*;
mod payload;
mod update_metadata;
#[cxx::bridge]
2023-05-05 01:49:33 +00:00
pub mod ffi {
unsafe extern "C++" {
2023-05-19 22:16:54 +00:00
include!("compress.hpp");
fn decompress(buf: &[u8], fd: i32) -> bool;
}
#[namespace = "rust"]
extern "Rust" {
unsafe fn extract_boot_from_payload(
partition: *const c_char,
in_path: *const c_char,
out_path: *const c_char,
) -> bool;
}
}