You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager/userspace: added 32bit (armv7a) support
This commit is contained in:
BIN
userspace/ksud_overlayfs/bin/arm/busybox
Executable file
BIN
userspace/ksud_overlayfs/bin/arm/busybox
Executable file
Binary file not shown.
BIN
userspace/ksud_overlayfs/bin/arm/resetprop
Normal file
BIN
userspace/ksud_overlayfs/bin/arm/resetprop
Normal file
Binary file not shown.
@@ -14,10 +14,16 @@ pub const BOOTCTL_PATH: &str = concatcp!(BINARY_DIR, "bootctl");
|
||||
#[allow(dead_code)]
|
||||
pub const SUSFSD_PATH: &str = concatcp!(BINARY_DIR, "susfsd");
|
||||
|
||||
#[cfg(all(target_arch = "aarch64", target_os = "android"))]
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "bin/aarch64"]
|
||||
struct Asset;
|
||||
|
||||
#[cfg(all(target_arch = "arm", target_os = "android"))]
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "bin/arm"]
|
||||
struct Asset;
|
||||
|
||||
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {
|
||||
for file in Asset::iter() {
|
||||
if file == "ksuinit" || file.ends_with(".ko") {
|
||||
|
||||
@@ -202,11 +202,7 @@ pub fn root_shell() -> Result<()> {
|
||||
if free_idx < matches.free.len() {
|
||||
let name = &matches.free[free_idx];
|
||||
uid = unsafe {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
let pw = libc::getpwnam(name.as_ptr()).as_ref();
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();
|
||||
|
||||
match pw {
|
||||
Some(pw) => pw.pw_uid,
|
||||
None => name.parse::<u32>().unwrap_or(0),
|
||||
|
||||
Reference in New Issue
Block a user