Skip to content

Commit

Permalink
Compat termux's su (bmax121#264)
Browse files Browse the repository at this point in the history
* compat: termux's su

---------

Co-authored-by: bmax <[email protected]>
  • Loading branch information
bmax121 and bmax authored Mar 8, 2024
1 parent 3fa87b4 commit 2cdf5a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apd/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ pub fn run() -> Result<()> {
#[cfg(not(target_os = "android"))]
env_logger::init();

// the kernel executes su with argv[0] = "/system/bin/kp" or "su" and replace it with us
// the kernel executes su with argv[0] = "/system/bin/kp" or "/system/bin/su" or "su" and replace it with us
let arg0 = std::env::args().next().unwrap_or_default();
if arg0 == "/system/bin/kp" || arg0 == "su" {
if arg0 == "/system/bin/kp" || arg0 == "/system/bin/su" || arg0 == "su" {
return crate::apd::root_shell();
}

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cmaker {
}
}

project.ext.set("kernelPatchVersion", "0.10.2")
project.ext.set("kernelPatchVersion", "0.10.3")


val androidMinSdkVersion = 26
Expand Down

0 comments on commit 2cdf5a3

Please sign in to comment.