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_magic/bin/x86_64/busybox
Normal file
BIN
userspace/ksud_magic/bin/x86_64/busybox
Normal file
Binary file not shown.
BIN
userspace/ksud_magic/bin/x86_64/resetprop
Normal file
BIN
userspace/ksud_magic/bin/x86_64/resetprop
Normal file
Binary file not shown.
@@ -23,6 +23,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,
|
||||
|
||||
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,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
APP_ABI := arm64-v8a armeabi-v7a
|
||||
APP_ABI := arm64-v8a armeabi-v7a x86_64
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := none
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
APP_ABI := arm64-v8a armeabi-v7a
|
||||
APP_ABI := arm64-v8a armeabi-v7a x86_64
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := none
|
||||
|
||||
Reference in New Issue
Block a user