Build KernelSU as LKM (#1254)

Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
Ylarod
2024-03-15 18:53:24 +08:00
committed by GitHub
parent e3998c0744
commit 7568d55be1
27 changed files with 1091 additions and 202 deletions

View File

@@ -7,7 +7,7 @@ use android_logger::Config;
#[cfg(target_os = "android")]
use log::LevelFilter;
use crate::{apk_sign, debug, defs, init_event, ksucalls, module, utils};
use crate::{apk_sign, assets, debug, defs, init_event, ksucalls, module, utils};
/// KernelSU userspace cli
#[derive(Parser, Debug)]
@@ -60,10 +60,10 @@ enum Commands {
kernel: Option<PathBuf>,
/// LKM module path to replace
#[arg(short, long, requires("init"))]
#[arg(short, long)]
module: Option<PathBuf>,
/// init to be replaced, if use LKM, this must be specified
/// init to be replaced
#[arg(short, long, requires("module"))]
init: Option<PathBuf>,
@@ -304,7 +304,7 @@ pub fn run() -> Result<()> {
utils::copy_sparse_file(src, dst, punch_hole)?;
Ok(())
}
Debug::Test => todo!(),
Debug::Test => assets::ensure_binaries(false),
},
Commands::BootPatch {