@@ -1,6 +1,6 @@
|
||||
use anyhow::{Ok, Result};
|
||||
use clap::Parser;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
use android_logger::Config;
|
||||
@@ -283,7 +283,7 @@ pub fn run() -> Result<()> {
|
||||
|
||||
// the kernel executes su with argv[0] = "su" and replace it with us
|
||||
let arg0 = std::env::args().next().unwrap_or_default();
|
||||
if Path::new(&arg0).file_name().and_then(|f| f.to_str()) == Some("su") {
|
||||
if arg0 == "su" || arg0 == "/system/bin/su" {
|
||||
return crate::su::root_shell();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user