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
src: add x86_64 support
This commit is contained in:
Binary file not shown.
BIN
userspace/ksud_overlayfs/bin/x86_64/busybox
Normal file
BIN
userspace/ksud_overlayfs/bin/x86_64/busybox
Normal file
Binary file not shown.
BIN
userspace/ksud_overlayfs/bin/x86_64/resetprop
Normal file
BIN
userspace/ksud_overlayfs/bin/x86_64/resetprop
Normal file
Binary file not shown.
@@ -24,6 +24,11 @@ struct Asset;
|
||||
#[folder = "bin/arm"]
|
||||
struct Asset;
|
||||
|
||||
#[cfg(all(target_arch = "x86_64", target_os = "android"))]
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "bin/x86_64"]
|
||||
struct Asset;
|
||||
|
||||
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {
|
||||
for file in Asset::iter() {
|
||||
if file == "ksuinit" || file.ends_with(".ko") {
|
||||
|
||||
@@ -202,6 +202,10 @@ pub fn root_shell() -> Result<()> {
|
||||
if free_idx < matches.free.len() {
|
||||
let name = &matches.free[free_idx];
|
||||
uid = unsafe {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
let pw = libc::getpwnam(name.as_ptr()).as_ref();
|
||||
match pw {
|
||||
Some(pw) => pw.pw_uid,
|
||||
|
||||
Reference in New Issue
Block a user