Skip to content
This repository was archived by the owner on Nov 1, 2025. It is now read-only.

Commit 70f5e9e

Browse files
rsuntkbackslashxx
authored andcommitted
ksud: add armeabi-v7a support
reference: rsuntk/KernelSUonArm32@a204e79 userspace/ksud: drop loopdev dependency loopdev is KernelSU's losetup replacement. Not required since we use magic mount. Suggested-by: rsuntk <[email protected]> userspace/ksud: import prebuilts for arm / armeabi-v7a - busybox imported from https://github.com/topjohnwu/magisk-files/releases busybox-1.36.1.0.zip resetprop I just kanged from rsuntk
1 parent 3b9c8c1 commit 70f5e9e

File tree

9 files changed

+17
-19
lines changed

9 files changed

+17
-19
lines changed

.github/workflows/build-manager.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
include:
2222
- target: aarch64-linux-android
2323
os: ubuntu-latest
24+
- target: armv7-linux-androideabi
25+
os: ubuntu-latest
2426
uses: ./.github/workflows/ksud.yml
2527
with:
2628
target: ${{ matrix.target }}
@@ -80,10 +82,18 @@ jobs:
8082
name: ksud-aarch64-linux-android
8183
path: .
8284

85+
- name: Download arm ksud
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: ksud-armv7-linux-androideabi
89+
path: .
90+
8391
- name: Copy ksud to app jniLibs
8492
run: |
8593
mkdir -p app/src/main/jniLibs/arm64-v8a
8694
cp -f ../aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud.so
95+
mkdir -p app/src/main/jniLibs/armeabi-v7a
96+
cp -f ../armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud.so
8797
8898
- name: Build with Gradle
8999
run: ./gradlew clean assembleRelease

manager/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cmaker {
1717
"-DANDROID_STL=none",
1818
)
1919
)
20-
abiFilters("arm64-v8a")
20+
abiFilters("arm64-v8a", "armeabi-v7a")
2121
}
2222
buildTypes {
2323
if (it.name == "release") {
@@ -69,7 +69,7 @@ subprojects {
6969
versionName = managerVersionName
7070
}
7171
ndk {
72-
abiFilters += listOf("arm64-v8a")
72+
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
7373
}
7474
}
7575

userspace/ksud/Cargo.lock

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

userspace/ksud/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ rustix = { git = "https://github.com/Kernel-SU/rustix.git", branch = "main", fea
5353
# some android specific dependencies which compiles under unix are also listed here for convenience of coding
5454
android-properties = { version = "0.2", features = ["bionic-deprecated"] }
5555
procfs = "0.17"
56-
loopdev = { git = "https://github.com/Kernel-SU/loopdev" }
5756

5857
[target.'cfg(target_os = "android")'.dependencies]
5958
android_logger = { version = "0.15", default-features = false }

userspace/ksud/bin/arm/busybox

1.22 MB
Binary file not shown.

userspace/ksud/bin/arm/resetprop

1.34 MB
Binary file not shown.

userspace/ksud/src/assets.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ pub const RESETPROP_PATH: &str = concatcp!(BINARY_DIR, "resetprop");
99
pub const BUSYBOX_PATH: &str = concatcp!(BINARY_DIR, "busybox");
1010
pub const BOOTCTL_PATH: &str = concatcp!(BINARY_DIR, "bootctl");
1111

12-
#[cfg(all(target_arch = "x86_64", target_os = "android"))]
12+
#[cfg(all(target_arch = "aarch64", target_os = "android"))]
1313
#[derive(RustEmbed)]
14-
#[folder = "bin/x86_64"]
14+
#[folder = "bin/aarch64"]
1515
struct Asset;
1616

17-
// IF NOT x86_64 ANDROID, ie. macos, linux, windows, always use aarch64
18-
#[cfg(not(all(target_arch = "x86_64", target_os = "android")))]
17+
#[cfg(all(target_arch = "arm", target_os = "android"))]
1918
#[derive(RustEmbed)]
20-
#[folder = "bin/aarch64"]
19+
#[folder = "bin/arm"]
2120
struct Asset;
2221

2322
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {

userspace/ksud/src/su.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ pub fn root_shell() -> Result<()> {
202202
if free_idx < matches.free.len() {
203203
let name = &matches.free[free_idx];
204204
uid = unsafe {
205-
#[cfg(target_arch = "aarch64")]
206205
let pw = libc::getpwnam(name.as_ptr()).as_ref();
207206
#[cfg(target_arch = "x86_64")]
208207
let pw = libc::getpwnam(name.as_ptr() as *const i8).as_ref();

userspace/su/jni/Application.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
APP_ABI := arm64-v8a x86_64
1+
APP_ABI := arm64-v8a armeabi-v7a
22
APP_PLATFORM := android-24
33
APP_STL := none

0 commit comments

Comments
 (0)