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:
31
.github/workflows/build-manager-ci.yml
vendored
31
.github/workflows/build-manager-ci.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build Manager
|
||||
name: Build Manager CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -30,6 +30,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/susfsd.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -42,6 +44,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/ksud.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -95,31 +99,56 @@ jobs:
|
||||
with:
|
||||
name: susfsd-aarch64-linux-android
|
||||
path: .
|
||||
|
||||
- name: Download arm susfsd
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: susfsd-armv7-linux-androideabi
|
||||
path: .
|
||||
|
||||
- name: Copy susfsd to app jniLibs
|
||||
run: |
|
||||
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||
cp -f ../arm64-v8a/susfsd ../manager/app/src/main/jniLibs/arm64-v8a/libsusfsd.so
|
||||
|
||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||
|
||||
- name: Download arm64 ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-aarch64-linux-android
|
||||
path: ksud_overlayfs
|
||||
|
||||
name: Download arm ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-armv7-linux-androideabi
|
||||
path: ksud_overlayfs
|
||||
|
||||
- name: Copy ksud_overlayfs to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
||||
|
||||
cp -f ../ksud_overlayfs/armv7-linux-android/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||
|
||||
- name: Download arm64 ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-aarch64-linux-android
|
||||
path: ksud_magic
|
||||
|
||||
name: Download arm ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-armv7-linux-androideabi
|
||||
path: ksud_magic
|
||||
|
||||
- name: Copy ksud_magic to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_magic/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
||||
|
||||
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
|
||||
32
.github/workflows/build-manager-spoofed.yml
vendored
32
.github/workflows/build-manager-spoofed.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build Manager
|
||||
name: Build Manager Spoofed
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -32,6 +32,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/susfsd.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -44,6 +46,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/ksud.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -96,37 +100,61 @@ jobs:
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Download arm64 susfsd
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: susfsd-aarch64-linux-android
|
||||
path: .
|
||||
|
||||
- name: Download arm susfsd
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: susfsd-armv7-linux-androideabi
|
||||
path: .
|
||||
|
||||
- name: Copy susfsd to app jniLibs
|
||||
run: |
|
||||
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||
cp -f ../arm64-v8a/susfsd ../manager/app/src/main/jniLibs/arm64-v8a/libsusfsd.so
|
||||
|
||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||
|
||||
- name: Download arm64 ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-aarch64-linux-android
|
||||
path: ksud_overlayfs
|
||||
|
||||
name: Download arm ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-armv7-linux-androideabi
|
||||
path: ksud_overlayfs
|
||||
|
||||
- name: Copy ksud_overlayfs to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
||||
|
||||
cp -f ../ksud_overlayfs/armv7-linux-android/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||
|
||||
- name: Download arm64 ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-aarch64-linux-android
|
||||
path: ksud_magic
|
||||
|
||||
name: Download arm ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-armv7-linux-androideabi
|
||||
path: ksud_magic
|
||||
|
||||
- name: Copy ksud_magic to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_magic/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
||||
|
||||
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
|
||||
29
.github/workflows/build-manager.yml
vendored
29
.github/workflows/build-manager.yml
vendored
@@ -30,6 +30,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/susfsd.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -42,6 +44,8 @@ jobs:
|
||||
include:
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
- target: armv7-linux-androideabi
|
||||
os: ubuntu-latest
|
||||
uses: ./.github/workflows/ksud.yml
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
@@ -95,31 +99,56 @@ jobs:
|
||||
with:
|
||||
name: susfsd-aarch64-linux-android
|
||||
path: .
|
||||
|
||||
- name: Download arm susfsd
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: susfsd-armv7-linux-androideabi
|
||||
path: .
|
||||
|
||||
- name: Copy susfsd to app jniLibs
|
||||
run: |
|
||||
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||
cp -f ../arm64-v8a/susfsd ../manager/app/src/main/jniLibs/arm64-v8a/libsusfsd.so
|
||||
|
||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||
|
||||
- name: Download arm64 ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-aarch64-linux-android
|
||||
path: ksud_overlayfs
|
||||
|
||||
name: Download arm ksud_overlayfs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-armv7-linux-androideabi
|
||||
path: ksud_overlayfs
|
||||
|
||||
- name: Copy ksud_overlayfs to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
||||
|
||||
cp -f ../ksud_overlayfs/armv7-linux-android/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||
|
||||
- name: Download arm64 ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-aarch64-linux-android
|
||||
path: ksud_magic
|
||||
|
||||
name: Download arm ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-armv7-linux-androideabi
|
||||
path: ksud_magic
|
||||
|
||||
- name: Copy ksud_magic to app jniLibs
|
||||
run: |
|
||||
cp -f ../ksud_magic/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
||||
|
||||
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
|
||||
BIN
userspace/ksud_magic/bin/arm/busybox
Executable file
BIN
userspace/ksud_magic/bin/arm/busybox
Executable file
Binary file not shown.
BIN
userspace/ksud_magic/bin/arm/resetprop
Normal file
BIN
userspace/ksud_magic/bin/arm/resetprop
Normal file
Binary file not shown.
@@ -13,10 +13,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),
|
||||
|
||||
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),
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
APP_ABI := arm64-v8a x86_64
|
||||
APP_ABI := arm64-v8a armeabi-v7a
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := none
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
APP_ABI := arm64-v8a
|
||||
APP_ABI := arm64-v8a armeabi-v7a
|
||||
APP_PLATFORM := android-24
|
||||
APP_STL := none
|
||||
|
||||
Reference in New Issue
Block a user