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:
38
.github/workflows/build-kernel-wsa.yml
vendored
Normal file
38
.github/workflows/build-kernel-wsa.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Build Kernel - WSA
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["next"]
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/build-kernel-wsa.yml"
|
||||||
|
- ".github/workflows/wsa-kernel.yml"
|
||||||
|
- "kernel/**"
|
||||||
|
pull_request:
|
||||||
|
branches: ["next"]
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/build-kernel-wsa.yml"
|
||||||
|
- ".github/workflows/wsa-kernel.yml"
|
||||||
|
- "kernel/**"
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x86_64, arm64]
|
||||||
|
version: ["5.15.94.2", "5.15.104.1", "5.15.104.2", "5.15.104.3", "5.15.104.4"]
|
||||||
|
uses: ./.github/workflows/wsa-kernel.yml
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
|
||||||
|
check_build:
|
||||||
|
if: (github.event_name == 'pull_request' && !github.event.pull_request.draft) || github.ref == 'refs/heads/checkci'
|
||||||
|
uses: ./.github/workflows/wsa-kernel.yml
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x86_64, arm64]
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
version: "5.15.104.4"
|
||||||
42
.github/workflows/build-manager-ci.yml
vendored
42
.github/workflows/build-manager-ci.yml
vendored
@@ -19,12 +19,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build-lkm:
|
build-lkm:
|
||||||
# uses: ./.github/workflows/build-lkm.yml
|
uses: ./.github/workflows/build-lkm.yml
|
||||||
# secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-susfsd:
|
build-susfsd:
|
||||||
# needs: build-lkm
|
needs: build-lkm
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -42,6 +42,8 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: armv7-linux-androideabi
|
- target: armv7-linux-androideabi
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
- target: x86_64-linux-android
|
||||||
|
os: ubuntu-latest
|
||||||
uses: ./.github/workflows/ksud.yml
|
uses: ./.github/workflows/ksud.yml
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
@@ -104,6 +106,10 @@ jobs:
|
|||||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/x86_64
|
||||||
|
cp -f ../x86_64/susfsd ../manager/app/src/main/jniLibs/x86_64/libsusfsd.so
|
||||||
|
|
||||||
|
|
||||||
- name: Download arm64 ksud_overlayfs
|
- name: Download arm64 ksud_overlayfs
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -116,12 +122,26 @@ jobs:
|
|||||||
name: ksud_overlayfs-armv7-linux-androideabi
|
name: ksud_overlayfs-armv7-linux-androideabi
|
||||||
path: ksud_overlayfs
|
path: ksud_overlayfs
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_overlayfs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud_overlayfs-x86_64-linux-android
|
||||||
|
path: ksud_overlayfs
|
||||||
|
|
||||||
- name: Copy ksud_overlayfs to app jniLibs
|
- name: Copy ksud_overlayfs to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/x86_64
|
||||||
|
|
||||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
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-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
cp -f ../ksud_overlayfs/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||||
|
|
||||||
|
cp -f ../ksud_overlayfs/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_overlayfs.so
|
||||||
|
|
||||||
- name: Download arm64 ksud_magic
|
- name: Download arm64 ksud_magic
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -133,13 +153,27 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ksud_magic-armv7-linux-androideabi
|
name: ksud_magic-armv7-linux-androideabi
|
||||||
path: ksud_magic
|
path: ksud_magic
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_magic
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud_magic-x86_64-linux-android
|
||||||
|
path: ksud_magic
|
||||||
|
|
||||||
- name: Copy ksud_magic to app jniLibs
|
- name: Copy ksud_magic to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/x86_64
|
||||||
|
|
||||||
cp -f ../ksud_magic/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
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
|
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||||
|
|
||||||
|
cp -f ../ksud_magic/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_magic.so
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
{
|
{
|
||||||
|
|||||||
30
.github/workflows/build-manager-spoofed.yml
vendored
30
.github/workflows/build-manager-spoofed.yml
vendored
@@ -21,12 +21,12 @@ on:
|
|||||||
- cron: "0 12 * * *" # 6 PM UTC+6 | 12 PM UTC
|
- cron: "0 12 * * *" # 6 PM UTC+6 | 12 PM UTC
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build-lkm:
|
build-lkm:
|
||||||
# uses: ./.github/workflows/build-lkm.yml
|
uses: ./.github/workflows/build-lkm.yml
|
||||||
# secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-susfsd:
|
build-susfsd:
|
||||||
# needs: build-lkm
|
needs: build-lkm
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -44,6 +44,8 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: armv7-linux-androideabi
|
- target: armv7-linux-androideabi
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
- target: x86_64-linux-android
|
||||||
|
os: ubuntu-latest
|
||||||
uses: ./.github/workflows/ksud.yml
|
uses: ./.github/workflows/ksud.yml
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
@@ -111,6 +113,10 @@ jobs:
|
|||||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/x86_64
|
||||||
|
cp -f ../x86_64/susfsd ../manager/app/src/main/jniLibs/x86_64/libsusfsd.so
|
||||||
|
|
||||||
|
|
||||||
- name: Download arm64 ksud_overlayfs
|
- name: Download arm64 ksud_overlayfs
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -123,12 +129,20 @@ jobs:
|
|||||||
name: ksud_overlayfs-armv7-linux-androideabi
|
name: ksud_overlayfs-armv7-linux-androideabi
|
||||||
path: ksud_overlayfs
|
path: ksud_overlayfs
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_overlayfs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud-x86_64-linux-android
|
||||||
|
path: ksud_overlayfs
|
||||||
|
|
||||||
- name: Copy ksud_overlayfs to app jniLibs
|
- name: Copy ksud_overlayfs to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
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-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
cp -f ../ksud_overlayfs/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||||
|
|
||||||
|
cp -f ../ksud_overlayfs/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_overlayfs.so
|
||||||
|
|
||||||
- name: Download arm64 ksud_magic
|
- name: Download arm64 ksud_magic
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -140,6 +154,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ksud_magic-armv7-linux-androideabi
|
name: ksud_magic-armv7-linux-androideabi
|
||||||
path: ksud_magic
|
path: ksud_magic
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_magic
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud-x86_64-linux-android
|
||||||
|
path: ksud_magic
|
||||||
|
|
||||||
- name: Copy ksud_magic to app jniLibs
|
- name: Copy ksud_magic to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
@@ -147,6 +167,8 @@ jobs:
|
|||||||
|
|
||||||
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||||
|
|
||||||
|
cp -f ../ksud_magic/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_magic.so
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
{
|
{
|
||||||
|
|||||||
30
.github/workflows/build-manager.yml
vendored
30
.github/workflows/build-manager.yml
vendored
@@ -19,12 +19,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build-lkm:
|
build-lkm:
|
||||||
# uses: ./.github/workflows/build-lkm.yml
|
uses: ./.github/workflows/build-lkm.yml
|
||||||
# secrets: inherit // DISBAND LKM MODE
|
secrets: inherit
|
||||||
|
|
||||||
build-susfsd:
|
build-susfsd:
|
||||||
# needs: build-lkm
|
needs: build-lkm
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -42,6 +42,8 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: armv7-linux-androideabi
|
- target: armv7-linux-androideabi
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
- target: x86_64-linux-android
|
||||||
|
os: ubuntu-latest
|
||||||
uses: ./.github/workflows/ksud.yml
|
uses: ./.github/workflows/ksud.yml
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
@@ -104,6 +106,10 @@ jobs:
|
|||||||
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
mkdir -p app/src/main/jniLibs/armeabi-v7a
|
||||||
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
cp -f ../armeabi-v7a/susfsd ../manager/app/src/main/jniLibs/armeabi-v7a/libsusfsd.so
|
||||||
|
|
||||||
|
mkdir -p app/src/main/jniLibs/x86_64
|
||||||
|
cp -f ../x86_64/susfsd ../manager/app/src/main/jniLibs/x86_64/libsusfsd.so
|
||||||
|
|
||||||
|
|
||||||
- name: Download arm64 ksud_overlayfs
|
- name: Download arm64 ksud_overlayfs
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -116,12 +122,20 @@ jobs:
|
|||||||
name: ksud_overlayfs-armv7-linux-androideabi
|
name: ksud_overlayfs-armv7-linux-androideabi
|
||||||
path: ksud_overlayfs
|
path: ksud_overlayfs
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_overlayfs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud-x86_64-linux-android
|
||||||
|
path: ksud_overlayfs
|
||||||
|
|
||||||
- name: Copy ksud_overlayfs to app jniLibs
|
- name: Copy ksud_overlayfs to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
cp -f ../ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
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-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
cp -f ../ksud_overlayfs/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_overlayfs.so
|
||||||
|
|
||||||
|
cp -f ../ksud_overlayfs/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_overlayfs.so
|
||||||
|
|
||||||
- name: Download arm64 ksud_magic
|
- name: Download arm64 ksud_magic
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -133,6 +147,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ksud_magic-armv7-linux-androideabi
|
name: ksud_magic-armv7-linux-androideabi
|
||||||
path: ksud_magic
|
path: ksud_magic
|
||||||
|
|
||||||
|
- name: Download x86_64 ksud_magic
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ksud-x86_64-linux-android
|
||||||
|
path: ksud_magic
|
||||||
|
|
||||||
- name: Copy ksud_magic to app jniLibs
|
- name: Copy ksud_magic to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
@@ -140,6 +160,8 @@ jobs:
|
|||||||
|
|
||||||
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
cp -f ../ksud_magic/armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud_magic.so
|
||||||
|
|
||||||
|
cp -f ../ksud_magic/x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud_magic.so
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
{
|
{
|
||||||
|
|||||||
12
.github/workflows/clippy.yml
vendored
12
.github/workflows/clippy.yml
vendored
@@ -3,14 +3,14 @@ name: Clippy check
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- next
|
- x86
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/clippy.yml'
|
- '.github/workflows/clippy.yml'
|
||||||
- 'userspace/ksud_magic/**'
|
- 'userspace/ksud_magic/**'
|
||||||
- 'userspace/ksud_overlayfs/**'
|
- 'userspace/ksud_overlayfs/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- next
|
- x86
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/clippy.yml'
|
- '.github/workflows/clippy.yml'
|
||||||
- 'userspace/ksud_magic/**'
|
- 'userspace/ksud_magic/**'
|
||||||
@@ -45,4 +45,10 @@ jobs:
|
|||||||
- name: Run Clippy
|
- name: Run Clippy
|
||||||
run: |
|
run: |
|
||||||
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target aarch64-linux-android --release
|
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target aarch64-linux-android --release
|
||||||
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target aarch64-linux-android --release
|
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target aarch64-linux-android --release
|
||||||
|
|
||||||
|
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target armv7-linux-androideabi --release
|
||||||
|
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target armv7-linux-androideabi --release
|
||||||
|
|
||||||
|
cross clippy --manifest-path userspace/ksud_magic/Cargo.toml --target x86_64-linux-android --release
|
||||||
|
cross clippy --manifest-path userspace/ksud_overlayfs/Cargo.toml --target x86_64-linux-android --release
|
||||||
3
.github/workflows/ksud.yml
vendored
3
.github/workflows/ksud.yml
vendored
@@ -41,10 +41,13 @@ jobs:
|
|||||||
cp susfsd-linux-android/arm64-v8a/susfsd ./userspace/ksud_magic/bin/aarch64/
|
cp susfsd-linux-android/arm64-v8a/susfsd ./userspace/ksud_magic/bin/aarch64/
|
||||||
cp susfsd-linux-android/armeabi-v7a/susfsd ./userspace/ksud_overlayfs/bin/arm/
|
cp susfsd-linux-android/armeabi-v7a/susfsd ./userspace/ksud_overlayfs/bin/arm/
|
||||||
cp susfsd-linux-android/armeabi-v7a/susfsd ./userspace/ksud_magic/bin/arm/
|
cp susfsd-linux-android/armeabi-v7a/susfsd ./userspace/ksud_magic/bin/arm/
|
||||||
|
cp susfsd-linux-android/x86_64/susfsd ./userspace/ksud_overlayfs/bin/x86_64/
|
||||||
|
cp susfsd-linux-android/x86_64/susfsd ./userspace/ksud_magic/bin/x86_64/
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
run: |
|
run: |
|
||||||
rustup update stable
|
rustup update stable
|
||||||
|
rustup target add x86_64-apple-darwin
|
||||||
rustup target add aarch64-apple-darwin
|
rustup target add aarch64-apple-darwin
|
||||||
|
|
||||||
- name: Cache ksud_overlayfs
|
- name: Cache ksud_overlayfs
|
||||||
|
|||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -28,6 +28,7 @@ jobs:
|
|||||||
- build-a13-kernel
|
- build-a13-kernel
|
||||||
- build-a14-kernel
|
- build-a14-kernel
|
||||||
- build-a15-kernel
|
- build-a15-kernel
|
||||||
|
- build-wsa-kernel
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
@@ -52,6 +53,7 @@ jobs:
|
|||||||
android*-lkm/*_kernelsu.ko
|
android*-lkm/*_kernelsu.ko
|
||||||
AnyKernel3-*.zip
|
AnyKernel3-*.zip
|
||||||
boot-images-*/Image-*/*.img.gz
|
boot-images-*/Image-*/*.img.gz
|
||||||
ksud_magic-*/ksud_magic-*
|
kernel-WSA*.zip
|
||||||
ksud_overlayfs-*/ksud_overlayfs-*
|
ksud_magic*.zip
|
||||||
susfsd-*/susfsd-*
|
ksud_overlayfs*.zip
|
||||||
|
susfsd*.zip
|
||||||
|
|||||||
106
.github/workflows/wsa-kernel.yml
vendored
Normal file
106
.github/workflows/wsa-kernel.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
name: Build Kernel - WSA
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
Build arch: x86_64 / arm64
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
Build version
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
|
||||||
|
CCACHE_NOHASHDIR: "true"
|
||||||
|
CCACHE_HARDLINK: "true"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Build Tools
|
||||||
|
uses: awalsh128/cache-apt-pkgs-action@v1
|
||||||
|
with:
|
||||||
|
packages: bc bison build-essential flex libelf-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu gzip ccache
|
||||||
|
version: 1.0
|
||||||
|
|
||||||
|
- name: Cache LLVM
|
||||||
|
id: cache-llvm
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ./llvm
|
||||||
|
key: llvm-12.0.1
|
||||||
|
|
||||||
|
- name: Setup LLVM
|
||||||
|
uses: KyleMayes/install-llvm-action@v1
|
||||||
|
with:
|
||||||
|
version: "12.0.1"
|
||||||
|
force-version: true
|
||||||
|
ubuntu-version: "16.04"
|
||||||
|
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
|
||||||
|
|
||||||
|
- name: Checkout KernelSU
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: KernelSU
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup kernel source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: microsoft/WSA-Linux-Kernel
|
||||||
|
ref: android-lts/latte-2/${{ inputs.version }}
|
||||||
|
path: WSA-Linux-Kernel
|
||||||
|
|
||||||
|
- name: Setup Ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
|
||||||
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
|
max-size: 2G
|
||||||
|
|
||||||
|
- name: Setup KernelSU
|
||||||
|
working-directory: WSA-Linux-Kernel
|
||||||
|
run: |
|
||||||
|
echo "[+] KernelSU setup"
|
||||||
|
KERNEL_ROOT=$GITHUB_WORKSPACE/WSA-Linux-Kernel
|
||||||
|
echo "[+] KERNEL_ROOT: $KERNEL_ROOT"
|
||||||
|
echo "[+] Copy KernelSU driver to $KERNEL_ROOT/drivers"
|
||||||
|
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $KERNEL_ROOT/drivers/kernelsu
|
||||||
|
echo "[+] Add KernelSU driver to Makefile"
|
||||||
|
DRIVER_MAKEFILE=$KERNEL_ROOT/drivers/Makefile
|
||||||
|
DRIVER_KCONFIG=$KERNEL_ROOT/drivers/Kconfig
|
||||||
|
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
||||||
|
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
||||||
|
echo "[+] Apply KernelSU patches"
|
||||||
|
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.15/*.patch || echo "[-] No patch found"
|
||||||
|
echo "[+] KernelSU setup done."
|
||||||
|
cd $GITHUB_WORKSPACE/KernelSU
|
||||||
|
VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
|
echo "VERSION: $VERSION"
|
||||||
|
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build Kernel
|
||||||
|
working-directory: WSA-Linux-Kernel
|
||||||
|
run: |
|
||||||
|
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
|
||||||
|
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
|
||||||
|
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
|
||||||
|
fi
|
||||||
|
declare -A ARCH_MAP=(["x86_64"]="x64" ["arm64"]="arm64")
|
||||||
|
cp configs/wsa/config-wsa-${ARCH_MAP[${{ inputs.arch }}]} .config
|
||||||
|
make olddefconfig
|
||||||
|
declare -A FILE_NAME=(["x86_64"]="bzImage" ["arm64"]="Image")
|
||||||
|
make -j`nproc` LLVM=1 ARCH=${{ inputs.arch }} $(if [ "${{ inputs.arch }}" == "arm64" ]; then echo CROSS_COMPILE=aarch64-linux-gnu; fi) ${FILE_NAME[${{ inputs.arch }}]} CCACHE="/usr/bin/ccache"
|
||||||
|
declare -A ARCH_MAP_FILE=(["x86_64"]="x86" ["arm64"]="arm64")
|
||||||
|
echo "file_path=WSA-Linux-Kernel/arch/${ARCH_MAP_FILE[${{ inputs.arch }}]}/boot/${FILE_NAME[${{ inputs.arch }}]}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Upload kernel-${{ inputs.arch }}-${{ inputs.version }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kernel-WSA-${{ inputs.arch }}-${{ inputs.version }}
|
||||||
|
path: "${{ env.file_path }}"
|
||||||
Binary file not shown.
@@ -18,7 +18,7 @@ cmaker {
|
|||||||
"-DANDROID_STL=none",
|
"-DANDROID_STL=none",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
abiFilters("arm64-v8a", "armeabi-v7a")
|
abiFilters("arm64-v8a", "armeabi-v7a", "x86_64")
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
if (it.name == "release") {
|
if (it.name == "release") {
|
||||||
@@ -78,7 +78,7 @@ subprojects {
|
|||||||
versionName = managerVersionName
|
versionName = managerVersionName
|
||||||
}
|
}
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
|
abiFilters += listOf("arm64-v8a", "armeabi-v7a, x86_64")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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"]
|
#[folder = "bin/arm"]
|
||||||
struct Asset;
|
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<()> {
|
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {
|
||||||
for file in Asset::iter() {
|
for file in Asset::iter() {
|
||||||
if file == "ksuinit" || file.ends_with(".ko") {
|
if file == "ksuinit" || file.ends_with(".ko") {
|
||||||
|
|||||||
@@ -202,6 +202,10 @@ pub fn root_shell() -> Result<()> {
|
|||||||
if free_idx < matches.free.len() {
|
if free_idx < matches.free.len() {
|
||||||
let name = &matches.free[free_idx];
|
let name = &matches.free[free_idx];
|
||||||
uid = unsafe {
|
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();
|
let pw = libc::getpwnam(name.as_ptr()).as_ref();
|
||||||
match pw {
|
match pw {
|
||||||
Some(pw) => pw.pw_uid,
|
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"]
|
#[folder = "bin/arm"]
|
||||||
struct Asset;
|
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<()> {
|
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {
|
||||||
for file in Asset::iter() {
|
for file in Asset::iter() {
|
||||||
if file == "ksuinit" || file.ends_with(".ko") {
|
if file == "ksuinit" || file.ends_with(".ko") {
|
||||||
|
|||||||
@@ -202,6 +202,10 @@ pub fn root_shell() -> Result<()> {
|
|||||||
if free_idx < matches.free.len() {
|
if free_idx < matches.free.len() {
|
||||||
let name = &matches.free[free_idx];
|
let name = &matches.free[free_idx];
|
||||||
uid = unsafe {
|
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();
|
let pw = libc::getpwnam(name.as_ptr()).as_ref();
|
||||||
match pw {
|
match pw {
|
||||||
Some(pw) => pw.pw_uid,
|
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_PLATFORM := android-24
|
||||||
APP_STL := none
|
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_PLATFORM := android-24
|
||||||
APP_STL := none
|
APP_STL := none
|
||||||
|
|||||||
Reference in New Issue
Block a user