Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5fe9840
refactor(kernel, ksud, manager): Switch webview zygote umount to allo…
aviraxp Aug 30, 2026
f5992bf
fix(kernel): Preserve a ebitmap's size for each policy type (https://…
aviraxp Sep 4, 2026
fdd1880
feat(ksud): Implement SIGSYS handler (https://github.com/tiann/Kernel…
aviraxp Sep 6, 2026
f1ae2ce
kernel, uapi, ksud: make fd wrapper work with app profile (https://gi…
Dr-TSNG Sep 6, 2026
ff765f8
feat: new version matching detection mechanism (https://github.com/ti…
5ec1cff Sep 7, 2026
4e82e32
feat(resetprop): support update long value for ro props (https://gith…
5ec1cff Sep 8, 2026
830a5ae
kernel: Reject all signature block id except v2 (https://github.com/t…
aviraxp Sep 9, 2026
23a40c0
manager: update translations from Weblate (#395)
weblate Sep 9, 2026
1e25a4c
manager: update translations from Weblate (#400)
weblate Sep 10, 2026
246d3e5
manager: replace SettingsJumpPageWidget with SettingsChooseWidget (#401)
luyanci Sep 10, 2026
7ad75c5
kernel: get session_keyring from key_permission LSM call
AlexLiuDev233 Sep 11, 2026
07a28eb
build(deps): bump the crates group in /userspace/ksuinit with 2 updat…
dependabot[bot] Sep 11, 2026
4f27ee1
build(deps): bump the crates group across 1 directory with 4 updates …
dependabot[bot] Sep 11, 2026
6930e97
kernel: add setup submodule command(#183)
luyanci Sep 11, 2026
052ca27
kernel: compat for old version of susfs and include task_stack.h for …
omajili-manbu Sep 11, 2026
19b6f42
manager: bump the maven group across 1 directory with 18 updates and …
dependabot[bot] Sep 12, 2026
fa1da13
manager: update translations from Weblate (#402)
weblate Sep 12, 2026
3380d41
ksud: sync upstream commit
Tools-cx-app Sep 12, 2026
b195422
manager: workaround for ListItem crash
AlexLiuDev233 Sep 13, 2026
601f6d2
manager: refine home page state get
AlexLiuDev233 Sep 13, 2026
c04159f
manager: improve superuser sort (#405)
luyanci Sep 13, 2026
7741f87
kernel: retain capabilities across execve for non-root profiles (http…
u9521 Sep 13, 2026
7e92d45
ksud, ksuinit: use our forks for dependencies (#412)
AlexLiuDev233 Sep 14, 2026
3341f9c
manager: Add floating navigation bar with a customization toggle (#334)
Bouteillepleine Sep 14, 2026
3576e6a
manager: update translations from Weblate (#404)
weblate Sep 14, 2026
a5bb612
ksubot: fix release
luyanci Sep 14, 2026
833edb0
manager: Restrict floating bottom bar to Android 12+
luyanci Sep 14, 2026
e3fcb18
manager: fix cannot following showNavigationBarBadge when floatingbot…
luyanci Sep 15, 2026
b22a46e
ci: Fix setup Android SDK
luyanci Sep 15, 2026
0b5cffd
fix(actions): Remove all setup-android
YuKongA Sep 15, 2026
6ace721
manager: update translations from Weblate (#415)
weblate Sep 15, 2026
6207000
ksud: bump the crates group across 1 directory with 3 updates (#414)
dependabot[bot] Sep 15, 2026
60954ce
ksuinit: bump bitflags from 2.13.1 to 2.13.2 in /userspace/ksuinit in…
dependabot[bot] Sep 15, 2026
6d674e5
build(deps): bump the maven group in /manager with 13 updates (#410)
dependabot[bot] Sep 15, 2026
6ec8d9a
kernel: drop ifdef for session_keyring
AlexLiuDev233 Sep 17, 2026
e4f7f29
build: allow customize package name and app name when building (https…
5ec1cff Jul 6, 2026
487b32d
ksud, manager: support backup stock image when patching from file (ht…
5ec1cff Jul 6, 2026
3d1185d
kernel: Do not copy_to_user during rcu_read_lock (#423)
AlexLiuDev233 Sep 19, 2026
6d18926
manager: Fix launcher icon component names
luyanci Sep 19, 2026
90b4a4c
manager: Rename Route.Flash.type to flashType (#428)
luyanci Sep 21, 2026
5cfdd72
build(deps): bump the crates group in /userspace/ksuinit with 2 updates
dependabot[bot] Sep 22, 2026
a855ec6
kernel: open file without touching fsnotify and atime while scanning …
5ec1cff Sep 18, 2026
f98b7a6
Reapply "kernel: drop bitmap, always search manager when packages.lis…
AlexLiuDev233 Jun 4, 2026
8af210f
fix(kernel): Miscellaneous build errors in syscall_hook_manager and a…
0ctobot Sep 20, 2026
e88c7ee
kernel: util: wire up ksyscall (https://github.com/tiann/KernelSU/pul…
backslashxx Sep 21, 2026
a93bc59
kernel: fix avtab iteration macro (https://github.com/tiann/KernelSU/…
XiaoTong6666 Sep 21, 2026
b66d007
fix(ksud): wait for service death before post-fs-data when soft reboo…
5ec1cff Sep 22, 2026
769f8d7
kernel: fix RCU-protected SELinux policy access (https://github.com/t…
XiaoTong6666 Sep 22, 2026
e974089
manager: update translations from Weblate (#418)
weblate Sep 22, 2026
379c761
kernel: warn users about susfs maintain in this project
luyanci Sep 22, 2026
9be0f34
kernel: wire ksyscall compat
backslashxx Sep 22, 2026
239e1e8
manager: refine install page and other minimal changes(#417)
luyanci Sep 22, 2026
6803643
fix(manager): Unexport magica receiver (https://github.com/tiann/Kern…
aviraxp Sep 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 43 additions & 31 deletions .github/workflows/build-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ on:
workflow_call:

jobs:
generate-key:
prepare:
runs-on: ubuntu-latest
outputs:
expected_size: ${{ steps.extract.outputs.expected_size }}
expected_hash: ${{ steps.extract.outputs.expected_hash }}
keystore: ${{ steps.gen.outputs.keystore }}
keystore_password: ${{ steps.gen.outputs.keystore_password }}
key_password: ${{ steps.gen.outputs.key_password }}
spoofed_package_name: ${{ steps.pkg.outputs.spoofed_package_name }}
steps:
- name: Generate temporary keystore
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -71,12 +72,21 @@ jobs:
echo "Certificate size: $SIZE_HEX ($SIZE_DEC bytes)"
echo "Certificate hash: $HASH"

- name: Generate package name for spoofed manager
id: pkg
run: |
word1=$(tr -dc 'a-z' </dev/urandom | head -c6)
word2=$(tr -dc 'a-z' </dev/urandom | head -c6)
word3=$(tr -dc 'a-z' </dev/urandom | head -c6)
SPOOFED_PACKAGE_NAME="${word1}.${word2}.${word3}"
echo "spoofed_package_name=$SPOOFED_PACKAGE_NAME" >> $GITHUB_OUTPUT

build-lkm:
needs: generate-key
needs: prepare
uses: ./.github/workflows/build-lkm.yml
with:
expected_pr_build_size: ${{ needs.generate-key.outputs.expected_size || '' }}
expected_pr_build_hash: ${{ needs.generate-key.outputs.expected_hash || '' }}
expected_pr_build_size: ${{ needs.prepare.outputs.expected_size || '' }}
expected_pr_build_hash: ${{ needs.prepare.outputs.expected_hash || '' }}
secrets: inherit

build-ksuinit:
Expand All @@ -86,22 +96,20 @@ jobs:
needs: [build-lkm, build-ksuinit]
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
- target: x86_64-linux-android
os: ubuntu-latest
- target: armv7-linux-androideabi
os: ubuntu-latest
target:
- aarch64-linux-android
- x86_64-linux-android
- armv7-linux-androideabi
os: [ubuntu-latest]
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}

build-manager:
needs: [generate-key]
needs: [prepare]
runs-on: ubuntu-latest
if: always() && needs.generate-key.result == 'success'
if: always() && needs.prepare.result == 'success'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -141,12 +149,6 @@ jobs:
echo "title=Manager" >> $GITHUB_OUTPUT
fi

- name: Run randomizer
if: ${{ matrix.manager_type == 'spoofed' }}
run: |
chmod +x randomizer
./randomizer

- name: Write key
if: ${{ github.event_name == 'workflow_dispatch' || ( github.event_name != 'pull_request') || github.ref_type == 'tag' }}
run: |
Expand All @@ -163,9 +165,9 @@ jobs:
- name: Write PR key
if: github.event_name == 'pull_request'
env:
PR_KEYSTORE: ${{ needs.generate-key.outputs.keystore }}
PR_KEYSTORE_PASSWORD: ${{ needs.generate-key.outputs.keystore_password }}
PR_KEY_PASSWORD: ${{ needs.generate-key.outputs.key_password }}
PR_KEYSTORE: ${{ needs.prepare.outputs.keystore }}
PR_KEYSTORE_PASSWORD: ${{ needs.prepare.outputs.keystore_password }}
PR_KEY_PASSWORD: ${{ needs.prepare.outputs.key_password }}
run: |
echo "$PR_KEYSTORE" | base64 -d > pr-key.jks
{
Expand All @@ -184,15 +186,25 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Setup Android SDK
uses: android-actions/setup-android@v4

- name: Build APK
run: |
export BUILD_EXTRA_ARGS=""
if [ "${{ matrix.manager_type }}" == "spoofed" ]; then
export KSU_PACKAGE_NAME="${{ needs.prepare.outputs.spoofed_package_name }}"
export BUILD_EXTRA_ARGS="-PKSU_PACKAGE_NAME=$KSU_PACKAGE_NAME -PIS_SPOOFED_BUILD=true"
elif [ "${{ github.event_name }}" == "pull_request" ]; then
export KSU_PACKAGE_NAME="com.resukisu.resukisu.pr${{github.event.pull_request.number}}"
export BUILD_EXTRA_ARGS="-PKSU_PACKAGE_NAME=$KSU_PACKAGE_NAME"
elif [ "${{ github.ref_type }}" != "tag" ] && [ "${{ github.ref_name }}" != "main" ]; then
export KSU_PACKAGE_NAME="com.resukisu.resukisu.dev"
export KSU_NAME="ReSukiSU-DEV"
export BUILD_EXTRA_ARGS="-PKSU_PACKAGE_NAME=$KSU_PACKAGE_NAME -PKSU_NAME=$KSU_NAME"
fi

if [ "${{ github.event_name }}" == "pull_request" ]; then
./gradlew assemble${{ matrix.build_type }} -Pcommit=${{ steps.commit.outputs.COMMIT_SHA }} -PIS_PR_BUILD=true
./gradlew assemble${{ matrix.build_type }} -Pcommit=${{ steps.commit.outputs.COMMIT_SHA }} -PIS_PR_BUILD=true $BUILD_EXTRA_ARGS
else
./gradlew assemble${{ matrix.build_type }} -Pcommit=${{ steps.commit.outputs.COMMIT_SHA }}
./gradlew assemble${{ matrix.build_type }} -Pcommit=${{ steps.commit.outputs.COMMIT_SHA }} $BUILD_EXTRA_ARGS
fi

- name: Upload artifact
Expand All @@ -212,7 +224,7 @@ jobs:

repack-manager:
if: always() && needs.build-manager.result == 'success' && needs.build-ksud.result == 'success'
needs: [build-manager, build-ksud, generate-key]
needs: [build-manager, build-ksud, prepare]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -286,9 +298,9 @@ jobs:

- name: Prepare signing inputs
env:
PR_KEYSTORE: ${{ needs.generate-key.outputs.keystore }}
PR_KEYSTORE_PASSWORD: ${{ needs.generate-key.outputs.keystore_password }}
PR_KEY_PASSWORD: ${{ needs.generate-key.outputs.key_password }}
PR_KEYSTORE: ${{ needs.prepare.outputs.keystore }}
PR_KEYSTORE_PASSWORD: ${{ needs.prepare.outputs.keystore_password }}
PR_KEY_PASSWORD: ${{ needs.prepare.outputs.key_password }}
PROD_KEYSTORE: ${{ secrets.KEYSTORE }}
PROD_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
PROD_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ jobs:
build-scan-publish: false
cache-read-only: true

- name: Setup Android SDK
uses: android-actions/setup-android@v4

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ksud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ jobs:

- name: Build ksud
run: |
if [ "${{github.event_name}}" == "pull_request" ]; then
export KSU_PACKAGE_NAME="com.resukisu.resukisu.pr${{github.event.pull_request.number}}"
elif [ "${{github.ref_type}}" != "tag" ] && [ "${{github.ref_name}}" != "main" ]; then
export KSU_PACKAGE_NAME="com.resukisu.resukisu.dev"
fi

cd userspace/ksud/
cargo ndk b -P 26 -t ${{ inputs.target }} -r -Z build-std-features="optimize_for_size" -Z trim-paths

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/lints-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

- name: Setup Android SDK
uses: android-actions/setup-android@v4

- name: Check Manager Lint
run: |
Expand Down
4 changes: 4 additions & 0 deletions kernel/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ endif
else
KERNEL_TYPE := GKI 2.0
endif

ifneq ($(shell test $(VERSION) -ge 4; echo $$?),0)
KERNEL_TYPE := Non-GKI (Legacy)
endif
$(info -- KERNEL_VERSION: $(KERNEL_VERSION))
$(info -- KERNEL_TYPE: $(KERNEL_TYPE))

Expand Down
49 changes: 26 additions & 23 deletions kernel/compat/kernel_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/errno.h>

#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "ksu.h"

ssize_t ksu_kernel_read_compat(struct file *p, void *buf, size_t count, loff_t *pos)
{
Expand Down Expand Up @@ -195,42 +197,43 @@ void ksu_run_in_init_if_possible(void (*callback)(void *), void *data)
#endif
}

#ifdef KSU_COMPAT_REQUIRE_SESSION_KEYRING
#include <linux/key.h>
#include <linux/errno.h>
#include <linux/cred.h>
#include "ksu.h"

static inline struct key *ksu_get_session_keyring(const struct cred *cred)
{
// https://github.com/torvalds/linux/commit/3a50597de8635cd05133bd12c95681c82fe7b878
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
return rcu_dereference(cred->session_keyring);
#else
return rcu_dereference(current->cred->tgcred->session_keyring);
#endif
}

struct key *init_session_keyring = NULL;
extern int install_session_keyring_to_cred(struct cred *, struct key *);

// WARNING! Make sure caller in init!!!
// https://github.com/torvalds/linux/commit/5c7e372caa35d303e414caeb64ee2243fd3cac3d
// in our target kernel version, it are protected by rcu, so let's rcu_dereference here
void setup_ksu_cred_session_keyring(void)
{
if (ksu_get_session_keyring(ksu_cred)) {
// if we have session_keyring, skip
return;
}

if (strcmp(current->comm, "init")) {
// we are only interested in `init` process
if (init_session_keyring == NULL) {
// if init_session_keyring is null, skip
return;
}

install_session_keyring_to_cred(ksu_cred, ksu_get_session_keyring(current_cred()));
install_session_keyring_to_cred(ksu_cred, init_session_keyring);

pr_info("kernel_compat: %s: install init_session_keyring to ksu_cred\n", __func__);
}

#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
__weak int path_umount(struct path *path, int flags)
{
char buf[256];
int ret = -ENOENT;

char *usermnt = d_path(path, buf, sizeof(buf) - 1);
if (IS_ERR(usermnt) || usermnt == buf)
goto out;

mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
ret = ksu_sys_umount((char __user *)usermnt, flags);
set_fs(old_fs);

out: // release ref here! user_path_at increases it then only cleans for itself
path_put(path);
return ret;
}
#endif // < 5.9
Loading