You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Refactor magiskboot cpio
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
#![feature(format_args_nl)]
|
||||
#![feature(btree_drain_filter)]
|
||||
#![feature(iter_collect_into)]
|
||||
|
||||
extern crate core;
|
||||
|
||||
pub use base;
|
||||
pub use cpio::*;
|
||||
pub use payload::*;
|
||||
pub use ramdisk::*;
|
||||
|
||||
mod cpio;
|
||||
mod payload;
|
||||
mod ramdisk;
|
||||
mod update_metadata;
|
||||
|
||||
#[cxx::bridge]
|
||||
pub mod ffi {
|
||||
unsafe extern "C++" {
|
||||
include!("compress.hpp");
|
||||
include!("magiskboot.hpp");
|
||||
fn decompress(buf: &[u8], fd: i32) -> bool;
|
||||
fn patch_encryption(buf: &mut [u8]);
|
||||
fn patch_verity(buf: &mut [u8]);
|
||||
}
|
||||
|
||||
#[namespace = "rust"]
|
||||
@@ -22,5 +31,7 @@ pub mod ffi {
|
||||
in_path: *const c_char,
|
||||
out_path: *const c_char,
|
||||
) -> bool;
|
||||
|
||||
unsafe fn cpio_commands(argc: i32, argv: *const *const c_char) -> bool;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user