You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
Add version info to logs
This commit is contained in:
@@ -6,6 +6,9 @@ plugins {
|
||||
val minKsuVersion: Int by rootProject.extra
|
||||
val maxKsuVersion: Int by rootProject.extra
|
||||
val minMagiskVersion: Int by rootProject.extra
|
||||
val verCode: Int by rootProject.extra
|
||||
val verName: String by rootProject.extra
|
||||
val commitHash: String by rootProject.extra
|
||||
|
||||
android.buildFeatures {
|
||||
androidResources = false
|
||||
@@ -25,6 +28,7 @@ cargo {
|
||||
spec.environment("MIN_KSU_VERSION", minKsuVersion)
|
||||
spec.environment("MAX_KSU_VERSION", maxKsuVersion)
|
||||
spec.environment("MIN_MAGISK_VERSION", minMagiskVersion)
|
||||
spec.environment("ZKSU_VERSION", "$verName-$verCode-$commitHash-$profile")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ use crate::lp_select;
|
||||
pub const MIN_KSU_VERSION: i32 = unwrap_ctx!(parse_i32(env!("MIN_KSU_VERSION")));
|
||||
pub const MAX_KSU_VERSION: i32 = unwrap_ctx!(parse_i32(env!("MAX_KSU_VERSION")));
|
||||
pub const MIN_MAGISK_VERSION: i32 = unwrap_ctx!(parse_i32(env!("MIN_MAGISK_VERSION")));
|
||||
pub const ZKSU_VERSION: &'static str = env!("ZKSU_VERSION");
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
pub const MAX_LOG_LEVEL: LevelFilter = LevelFilter::Trace;
|
||||
|
||||
@@ -6,7 +6,7 @@ mod zygiskd;
|
||||
mod companion;
|
||||
|
||||
use std::future::Future;
|
||||
use anyhow::Result;
|
||||
use crate::constants::ZKSU_VERSION;
|
||||
|
||||
fn init_android_logger(tag: &str) {
|
||||
android_logger::init_once(
|
||||
@@ -22,6 +22,9 @@ fn start() {
|
||||
let fd: i32 = args[2].parse().unwrap();
|
||||
companion::entry(fd);
|
||||
return;
|
||||
} else if args.len() == 2 && args[1] == "version" {
|
||||
println!("Zygisk Next daemon {}", ZKSU_VERSION);
|
||||
return;
|
||||
}
|
||||
|
||||
utils::switch_mount_namespace(1).expect("switch mnt ns");
|
||||
|
||||
@@ -31,7 +31,7 @@ struct Context {
|
||||
}
|
||||
|
||||
pub fn main() -> Result<()> {
|
||||
log::info!("Start zygisk companion");
|
||||
log::info!("Welcome to Zygisk Next ({}) !", constants::ZKSU_VERSION);
|
||||
|
||||
let arch = get_arch()?;
|
||||
log::debug!("Daemon architecture: {arch}");
|
||||
|
||||
Reference in New Issue
Block a user