You've already forked KernelSU
mirror of
https://github.com/tiann/KernelSU.git
synced 2025-08-27 23:46:34 +00:00
ksud: some refactor
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use anyhow::Result;
|
||||
use const_format::concatcp;
|
||||
use crate::{utils, defs};
|
||||
|
||||
pub const RESETPROP_PATH: &str = concatcp!(defs::BINARY_DIR, "resetprop");
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
const RESETPROP: &[u8] = include_bytes!("../bin/aarch64/resetprop");
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
const RESETPROP: &[u8] = include_bytes!("../bin/x86_64/resetprop");
|
||||
|
||||
pub const BUSYBOX_PATH: &str = concatcp!(defs::BINARY_DIR, "busybox");
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
const BUSYBOX: &[u8] = include_bytes!("../bin/aarch64/busybox");
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
const BUSYBOX: &[u8] = include_bytes!("../bin/x86_64/busybox");
|
||||
|
||||
pub fn ensure_bin_assets() -> Result<()> {
|
||||
utils::ensure_binary(RESETPROP_PATH, RESETPROP)?;
|
||||
utils::ensure_binary(BUSYBOX_PATH, BUSYBOX)?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user