Skip to content

Conversation

@ShirkNeko
Copy link
Contributor

@ShirkNeko ShirkNeko commented Sep 11, 2025

Prioritize retrieving the application UID from /data/user_de. If this fails, fall back to retrieving it from packages.list.

Fix unstable application UID acquisition

…[app] directory

Prioritize retrieving the application UID from /data/user_de. If this fails, fall back to retrieving it from packages.list.

Fix unstable application UID acquisition

Signed-off-by: ShirkNeko <[email protected]>
@ShirkNeko ShirkNeko changed the title kernel: Add the real UID by parsing the UID from the /data/user_de/0/… kernel: Add the real UID by parsing the UID from the /data/user_de/0 Sep 11, 2025
@aviraxp aviraxp requested a review from Copilot September 12, 2025 03:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new method to retrieve application UIDs by scanning the /data/user_de/0 directory as the primary approach, with a fallback to the existing packages.list parsing method. This aims to improve stability in UID acquisition.

  • Implements a new directory scanning approach using filesystem metadata to extract UIDs
  • Adds fallback logic to maintain compatibility with the existing packages.list method
  • Includes comprehensive error handling and logging for the new scanning functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
kernel/throne_tracker.c Adds new user data directory scanning functions and modifies track_throne() to prioritize the new method with fallback
kernel/kernel_compat.h Adds list_count_nodes helper function for kernels < 6.6.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor Author

@ShirkNeko ShirkNeko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revisions have been completed

Enhance scan support for active users in /data/user_de

Signed-off-by: ShirkNeko <[email protected]>
@ShirkNeko
Copy link
Contributor Author

ShirkNeko commented Sep 12, 2025

提交 e47775a 后不再回退到packages.list,且支持多用户扫描,并优化 track_throne 扫描触发条件

@Ylarod Ylarod requested a review from Copilot September 13, 2025 10:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

kernel/core_hook.c:45

  • Duplicate include of throne_tracker.h should be removed.
#include "throne_tracker.h"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ShirkNeko ShirkNeko force-pushed the main branch 4 times, most recently from 41ad1a1 to 853ff27 Compare September 13, 2025 12:47
- Remove the deprecated USER_DATA_LEGACY_BASE_PATH path

-Increase the size of USER_DATA_PATH_LEN to 384
backslashxx added a commit to ximi-libra-test/android_kernel_xiaomi_libra that referenced this pull request Sep 13, 2025
for: tiann/KernelSU#2757

handle this since this is commonly backported to los common kernel 4.9

ref: LineageOS/android_kernel_qcom_sdm845@b60ce30
backslashxx added a commit to ximi-libra-test/android_kernel_xiaomi_libra that referenced this pull request Sep 13, 2025
for: tiann/KernelSU#2757

handle this since this is commonly backported to los common kernel 4.9

ref: LineageOS/android_kernel_qcom_sdm845@b60ce30
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 13, 2025
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
This commit restores compatibility code needed that was removed at tiann/KernelSU@898e9d4 .
where upstream dropped all pre-5.10 support

Reverts `kernel:Add Huawei hisi check (tiann#1545)`
	- upstream tiann/KernelSU@4f05fe2
	- superceded by `kernel: expose allowlist workaround as Kconfig option` on next commit

other changes and cleanups
	sucompat: ksu_handle_stat(), remove dead ifdef.
		- just use `ksu_handle_stat(&dfd, &filename->name, &flags);` if you want to hook vfs_statx on 6.1
	LINUX_VERSION_CODE / KERNEL_VERSION, ksu.c
		- reported by Sinclair19
		- fix by including version.h
	fatal_signal_pending, ksud.c
		- add compat by including sched.h or sched/signal.h conditionally
		- ref: torvalds/linux@2a1f062
	selinux_state.ss, core_hook.c
		- remove rcu_dereference use
		- ref: tiann#2695
	seccomp.filter_count, core_hook.c
		- reset this only for 5.9 and up as it only exists there
		- ref: tiann#2708, gregkh/linux@c818c03
	vfs_getattr, throne_tracker.c
		- add compat by using old fn signature on < 4.11
		- ref: tiann#2757

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
Run throne_tracker() in kthread instead of blocking the caller.
Prevents full lockup during installation and removing the manager.

First run remains synchronous for compatibility purposes (FDE, FBEv1, FBEv2)

Features:
- run track_throne() in a kthread after the first synchronous run
- prevent duplicate thread creation with a single-instance check
- spinlock-on-d_lock based polling adressing possible race conditions.

Race conditions adressed
- single instance kthread lock, smp_mb()
- is_manager_apk, apk, spinlock-on-d_lock based polling

This is a squash of:
tiann#2632

Rebased on top of
tiann#2757

Original skeleton based on:
`kernelsu: move throne_tracker() to kthread`
`kernelsu: check locking before accessing files and dirs during searching manager`
`kernelsu: look for manager UID in /data/system/packages.list, not /data/system/packages.list.tmp`
acroreiser/android_kernel_lge_hammerhead@0b05e92...8783bad

Co-Authored-By: backslashxx <[email protected]>
Co-Authored-By: Yaroslav Zviezda <[email protected]>
Signed-off-by: backslashxx <[email protected]>
ShirkNeko pushed a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Sep 14, 2025
Run throne_tracker() in kthread instead of blocking the caller.
Prevents full lockup during installation and removing the manager.

First run remains synchronous for compatibility purposes (FDE, FBEv1, FBEv2)

Features:
- run track_throne() in a kthread after the first synchronous run
- prevent duplicate thread creation with a single-instance check
- spinlock-on-d_lock based polling adressing possible race conditions.

Race conditions adressed
- single instance kthread lock, smp_mb()
- is_manager_apk, apk, spinlock-on-d_lock based polling

This is a squash of:
tiann/KernelSU#2632

Rebased on top of
tiann/KernelSU#2757

Original skeleton based on:
`kernelsu: move throne_tracker() to kthread`
`kernelsu: check locking before accessing files and dirs during searching manager`
`kernelsu: look for manager UID in /data/system/packages.list, not /data/system/packages.list.tmp`
acroreiser/android_kernel_lge_hammerhead@0b05e92...8783bad

Co-Authored-By: backslashxx <[email protected]>
Co-Authored-By: Yaroslav Zviezda <[email protected]>
Signed-off-by: backslashxx <[email protected]>
ShirkNeko added a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Sep 14, 2025
…ub.com/SukiSU-Ultra/SukiSU-Ultra/issues/2632))

Run throne_tracker() in kthread instead of blocking the caller.
Prevents full lockup during installation and removing the manager.

First run remains synchronous for compatibility purposes (FDE, FBEv1, FBEv2)

Features:
- run track_throne() in a kthread after the first synchronous run
- prevent duplicate thread creation with a single-instance check
- spinlock-on-d_lock based polling adressing possible race conditions.

Race conditions adressed
- single instance kthread lock, smp_mb()
- is_manager_apk, apk, spinlock-on-d_lock based polling

This is a squash of:
tiann/KernelSU#2632

Rebased on top of
tiann/KernelSU#2757

Original skeleton based on:
`kernelsu: move throne_tracker() to kthread`
`kernelsu: check locking before accessing files and dirs during searching manager`
`kernelsu: look for manager UID in /data/system/packages.list, not /data/system/packages.list.tmp`
acroreiser/android_kernel_lge_hammerhead@0b05e92...8783bad

Co-Authored-By: backslashxx <[email protected]>
Co-Authored-By: Yaroslav Zviezda <[email protected]>
Signed-off-by: backslashxx <[email protected]>
ShirkNeko added a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Sep 14, 2025
…ub.com/SukiSU-Ultra/SukiSU-Ultra/issues/2632))

Run throne_tracker() in kthread instead of blocking the caller.
Prevents full lockup during installation and removing the manager.

First run remains synchronous for compatibility purposes (FDE, FBEv1, FBEv2)

Features:
- run track_throne() in a kthread after the first synchronous run
- prevent duplicate thread creation with a single-instance check
- spinlock-on-d_lock based polling adressing possible race conditions.

Race conditions adressed
- single instance kthread lock, smp_mb()
- is_manager_apk, apk, spinlock-on-d_lock based polling

This is a squash of:
tiann/KernelSU#2632

Rebased on top of
tiann/KernelSU#2757

Original skeleton based on:
`kernelsu: move throne_tracker() to kthread`
`kernelsu: check locking before accessing files and dirs during searching manager`
`kernelsu: look for manager UID in /data/system/packages.list, not /data/system/packages.list.tmp`
acroreiser/android_kernel_lge_hammerhead@0b05e92...8783bad

Co-Authored-By: backslashxx <[email protected]>
Co-Authored-By: Yaroslav Zviezda <[email protected]>
Signed-off-by: backslashxx <[email protected]>
@aviraxp aviraxp requested a review from tiann September 14, 2025 04:19
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
adapt tiann#2757 to old compilers
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
adapt tiann#2757 to old compilers
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
adapt tiann#2757 to old compilers
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
https://elixir.bootlin.com/linux/v3.8/source/fs/stat.c#L40

for tiann#2757
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
https://elixir.bootlin.com/linux/v3.8/source/fs/stat.c#L40

for tiann#2757

i9300:/ # dmesg | grep KernelSU
[    1.213058] c0      1 KernelSU: KEY_VOLUMEDOWN val: 0
[    1.994295] c0      1 KernelSU: Initialized on: 3.0.101-perf-gd886fe010c27-dirty (arm) with ksuver: 12123 +path_umount
[    1.994350] c0      1 KernelSU: ksu_core_init: LSM hooks not in use.
[    3.227469] c2      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1:  envp_len: 176
[    3.774595] c3      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: selinux_setup envp_len: 147
[    3.869057] c3      1 KernelSU: kernel_compat: got init_session_keyring
[    4.045887] c1   1532 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.046032] c1   1532 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.046149] c1   1532 KernelSU: SELinux permissive or disabled, apply rules!
[    4.049667] c2   1533 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.049811] c2   1533 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.049931] c2   1533 KernelSU: SELinux permissive or disabled, apply rules!
[    4.095263] c3      1 KernelSU: vfs_read: /system/etc/init/atrace.rc, comm: init, count: 1024, rc_count: 351
[    4.096334] c3      1 KernelSU: read_proxy append 673 + 351
[    4.096435] c3      1 KernelSU: stop vfs_read_hook
[    4.107671] c1   1532 KernelSU: android context saved disabled
[    4.107952] c2   1533 KernelSU: Type ksu_file already exists
[    9.507451] c2   2231 KernelSU: post-fs-data triggered
[    9.507512] c2   2231 KernelSU: on_post_fs_data!
[    9.507568] c2   2231 KernelSU: stop input_hook
[    9.507619] c1     21 KernelSU: installing init session keyring for older kernel
[    9.507841] c2   2231 KernelSU: devpts sid: 363
[    9.509393] c1     21 KernelSU: allowlist version: 3
[    9.509458] c1     21 KernelSU: load_allow_uid, name: com.android.shell, uid: 2000, allow: 1
[    9.509562] c1     21 KernelSU: set root profile, key: com.android.shell, uid: 2000, gid: 0, context: u:r:su:s0
[    9.509686] c1     21 KernelSU: load_allow_uid, name: $, uid: 9999, allow: 0
[    9.509768] c1     21 KernelSU: set app profile, key: $, uid: 9999, umount modules: 0
[    9.509870] c1     21 KernelSU: load_allow_uid, name: com.reveny.nativecheck, uid: 10186, allow: 0
[    9.509964] c1     21 KernelSU: set app profile, key: com.reveny.nativecheck, uid: 10186, umount modules: 1
[    9.510126] c1     21 KernelSU: load_allow_uid, name: bin.mt.plus.canary, uid: 10004, allow: 1
[    9.510230] c1     21 KernelSU: set root profile, key: bin.mt.plus.canary, uid: 10004, gid: 0, context: u:r:su:s0
[    9.510352] c1     21 KernelSU: load_allow_uid, name: org.frknkrc44.hma_oss, uid: 10005, allow: 1
[    9.510458] c1     21 KernelSU: set root profile, key: org.frknkrc44.hma_oss, uid: 10005, gid: 0, context: u:r:su:s0
[    9.510596] c1     21 KernelSU: load_allow_uid, name: com.termux, uid: 10009, allow: 1
[    9.510685] c1     21 KernelSU: set root profile, key: com.termux, uid: 10009, gid: 0, context: u:r:su:s0
[    9.510802] c1     21 KernelSU: load_allow_list read err: 0
[    9.510865] c1     21 KernelSU: ksu_show_allow_list
[    9.510925] c1     21 KernelSU: uid :2000, allow: 1
[    9.510974] c1     21 KernelSU: uid :9999, allow: 0
[    9.511027] c1     21 KernelSU: uid :10186, allow: 0
[    9.511081] c1     21 KernelSU: uid :10004, allow: 1
[    9.511134] c1     21 KernelSU: uid :10005, allow: 1
[    9.511187] c1     21 KernelSU: uid :10009, allow: 1
[    9.741104] c0   2231 KernelSU: volumedown_pressed_count: 0
[   10.090829] c3   2231 KernelSU: module mounted!
[   10.184060] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.320570] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.455742] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.590694] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.725663] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   11.037447] c2   2243 KernelSU: newfstatat su->sh!
[   11.038034] c2   2243 KernelSU: do_execve_common su found
[   11.038174] c2   2243 KernelSU: Already root, don't escape!
[   11.562290] c3   2253 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/app_process argv1: ./lspd envp_len: 256
[   11.562372] c3   2253 KernelSU: ksu_handle_bprm_ksud: exec app_process, /data prepared, second_stage: 1
[   11.562432] c3   2253 KernelSU: on_post_fs_data already done
[   11.562471] c3   2253 KernelSU: stop execve_hook
[   11.575982] c3   2231 KernelSU: volumedown_pressed_count: 0
[   14.240828] c3   2378 KernelSU: volumedown_pressed_count: 0
[   23.903548] c2   2580 KernelSU: newfstatat su->sh!
[   23.903597] c2   2580 KernelSU: faccessat su->sh!
[   23.904667] c3   2600 KernelSU: do_execve_common su found
[   26.744297] c3   2556 KernelSU: renameat: packages.list.tmp -> packages.list, new path: /system/packages.list
[   26.744395] c3   2556 KernelSU: UserDE UID: Found 1 active users
[   26.744882] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.telephony, uid: 1001 (user 0)
[   26.744955] c3   2556 KernelSU: UserDE UID: Found package: com.android.mms.service, uid: 1001 (user 0)
[   26.745109] c3   2556 KernelSU: UserDE UID: Found package: android, uid: 1000 (user 0)
[   26.745176] c3   2556 KernelSU: UserDE UID: Found package: com.android.ons, uid: 1001 (user 0)
[   26.746886] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.settings, uid: 1000 (user 0)
[   26.746955] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputdevices, uid: 1000 (user 0)
[   26.747121] c3   2556 KernelSU: UserDE UID: Found package: android.ext.shared, uid: 10139 (user 0)
[   26.747190] c3   2556 KernelSU: UserDE UID: Found package: com.android.server.telecom, uid: 1000 (user 0)
[   26.747292] c3   2556 KernelSU: UserDE UID: Found package: com.android.dialer, uid: 10162 (user 0)
[   26.747362] c3   2556 KernelSU: UserDE UID: Found package: android.ext.services, uid: 10132 (user 0)
[   26.747425] c3   2556 KernelSU: UserDE UID: Found package: com.android.proxyhandler, uid: 10129 (user 0)
[   26.747524] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputmethod.latin, uid: 10182 (user 0)
[   26.747592] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings, uid: 1000 (user 0)
[   26.747657] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.lineagesettings, uid: 1000 (user 0)
[   26.747721] c3   2556 KernelSU: UserDE UID: Found package: lineageos.platform, uid: 1000 (user 0)
[   26.747782] c3   2556 KernelSU: UserDE UID: Found package: com.android.phone, uid: 1001 (user 0)
[   26.747884] c3   2556 KernelSU: UserDE UID: Found package: com.android.shell, uid: 2000 (user 0)
[   26.747944] c3   2556 KernelSU: UserDE UID: Found package: com.android.location.fused, uid: 1000 (user 0)
[   26.748004] c3   2556 KernelSU: UserDE UID: Found package: com.android.systemui, uid: 10167 (user 0)
[   26.748063] c3   2556 KernelSU: UserDE UID: Found package: com.android.permissioncontroller, uid: 10122 (user 0)
[   26.748126] c3   2556 KernelSU: UserDE UID: Found package: com.android.cts.priv.ctsshim, uid: 10125 (user 0)
[   26.748221] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.corner, uid: 10003 (user 0)
[   26.748294] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.black, uid: 10193 (user 0)
[   26.748382] c3   2556 KernelSU: UserDE UID: Found package: com.android.terminal, uid: 10199 (user 0)
[   26.748464] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.double, uid: 10000 (user 0)
[   26.748535] c3   2556 KernelSU: UserDE UID: Found package: com.android.dynsystem, uid: 1000 (user 0)
[   26.748594] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.calendar, uid: 10131 (user 0)
[   26.748656] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.media, uid: 10116 (user 0)
[   26.748716] c3   2556 KernelSU: UserDE UID: Found package: com.android.provision, uid: 10185 (user 0)
[   26.748799] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_wide_back, uid: 10054 (user 0)
[   26.748895] c3   2556 KernelSU: UserDE UID: Found package: com.android.traceur, uid: 10198 (user 0)
[   26.748956] c3   2556 KernelSU: UserDE UID: Found package: com.android.wallpapercropper, uid: 10168 (user 0)
[   26.749069] c3   2556 KernelSU: UserDE UID: Found package: tw.nekomimi.nekogram, uid: 10001 (user 0)
[   26.749170] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.cinnamon, uid: 10076 (user 0)
[   26.749262] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.customization, uid: 10200 (user 0)
[   26.749351] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.systemui, uid: 10007 (user 0)
[   26.749424] c3   2556 KernelSU: UserDE UID: Found package: com.android.documentsui, uid: 10123 (user 0)
[   26.749492] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.brown, uid: 10184 (user 0)
[   26.749586] c3   2556 KernelSU: UserDE UID: Found package: com.mycompany.myapp, uid: 10002 (user 0)
[   26.749649] c3   2556 KernelSU: UserDE UID: Found package: com.android.externalstorage, uid: 10133 (user 0)
[   26.749736] c3   2556 KernelSU: UserDE UID: Found package: com.android.htmlviewer, uid: 10144 (user 0)
[   26.749822] c3   2556 KernelSU: UserDE UID: Found package: com.android.companiondevicemanager, uid: 10148 (user 0)
[   26.749892] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.green, uid: 10192 (user 0)
[   26.749979] c3   2556 KernelSU: UserDE UID: Found package: com.termux, uid: 10009 (user 0)
[   26.750083] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads, uid: 10116 (user 0)
[   26.750182] c3   2556 KernelSU: UserDE UID: Found package: com.android.messaging, uid: 10174 (user 0)
[   26.750245] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.rubik, uid: 10191 (user 0)
[   26.750336] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.android, uid: 10057 (user 0)
[   26.750409] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.customization.blacktheme, uid: 10187 (user 0)
[   26.750483] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.orange, uid: 10190 (user 0)
[   26.750548] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.purple, uid: 10195 (user 0)
[   26.750616] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.yellow, uid: 10188 (user 0)
[   26.750684] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.blue, uid: 10197 (user 0)
[   26.750757] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.cyan, uid: 10128 (user 0)
[   26.750824] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.circular.themepicker, uid: 10113 (user 0)
[   26.750897] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads.ui, uid: 10116 (user 0)
[   26.750963] c3   2556 KernelSU: UserDE UID: Found package: com.android.pacprocessor, uid: 10138 (user 0)
[   26.751025] c3   2556 KernelSU: UserDE UID: Found package: com.android.simappdialog, uid: 10157 (user 0)
[   26.751127] c3   2556 KernelSU: UserDE UID: Found package: com.android.networkstack, uid: 1073 (user 0)
[   26.751191] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.pink, uid: 10189 (user 0)
[   26.751257] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.red, uid: 10196 (user 0)
[   26.751324] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.profiles, uid: 10145 (user 0)
[   26.751412] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.tall, uid: 10091 (user 0)
[   26.751509] c3   2556 KernelSU: UserDE UID: Found package: com.android.modulemetadata, uid: 10179 (user 0)
[   26.751574] c3   2556 KernelSU: UserDE UID: Found package: com.android.certinstaller, uid: 10137 (user 0)
[   26.751661] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.black, uid: 10069 (user 0)
[   26.751750] c3   2556 KernelSU: UserDE UID: Found package: bin.mt.plus.canary, uid: 10004 (user 0)
[   26.751811] c3   2556 KernelSU: UserDE UID: Found package: com.android.carrierconfig, uid: 10165 (user 0)
[   26.751897] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.green, uid: 10088 (user 0)
[   26.751995] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.ocean, uid: 10011 (user 0)
[   26.752084] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.space, uid: 10073 (user 0)
[   26.752172] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.threebutton, uid: 10089 (user 0)
[   26.752269] c3   2556 KernelSU: UserDE UID: Found package: org.frknkrc44.hma_oss, uid: 10005 (user 0)
[   26.752331] c3   2556 KernelSU: UserDE UID: Found package: com.android.contacts, uid: 10160 (user 0)
[   26.752413] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.recorder, uid: 10173 (user 0)
[   26.752498] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.launcher, uid: 10087 (user 0)
[   26.752571] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.lato, uid: 10194 (user 0)
[   26.752659] c3   2556 KernelSU: UserDE UID: Found package: io.github.vvb2060.keyattestation, uid: 10008 (user 0)
[   26.752726] c3   2556 KernelSU: UserDE UID: Found package: com.android.egg, uid: 10136 (user 0)
[   26.752785] c3   2556 KernelSU: UserDE UID: Found package: com.android.mtp, uid: 10116 (user 0)
[   26.752875] c3   2556 KernelSU: UserDE UID: Found package: com.android.nfc, uid: 1027 (user 0)
[   26.752930] c3   2556 KernelSU: UserDE UID: Found package: com.android.stk, uid: 1001 (user 0)
[   26.752985] c3   2556 KernelSU: UserDE UID: Found package: com.android.launcher3, uid: 10169 (user 0)
[   26.753042] c3   2556 KernelSU: UserDE UID: Found package: com.android.backupconfirm, uid: 10134 (user 0)
[   26.753098] c3   2556 KernelSU: UserDE UID: Found package: com.eamobile.deadspace_full_azn, uid: 10010 (user 0)
[   26.753189] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.twobutton, uid: 10063 (user 0)
[   26.753254] c3   2556 KernelSU: UserDE UID: Found package: com.android.statementservice, uid: 10115 (user 0)
[   26.753310] c3   2556 KernelSU: UserDE UID: Found package: com.android.hotspot2, uid: 10140 (user 0)
[   26.753365] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings.intelligence, uid: 10158 (user 0)
[   26.753746] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_extra_wide_back, uid: 10094 (user 0)
[   26.753889] c3   2556 KernelSU: UserDE UID: Found package: com.reveny.nativecheck, uid: 10186 (user 0)
[   26.753949] c3   2556 KernelSU: UserDE UID: Found package: com.android.sharedstoragebackup, uid: 10130 (user 0)
[   26.754033] c3   2556 KernelSU: UserDE UID: Found package: com.android.printspooler, uid: 10156 (user 0)
[   26.754115] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.filled.settings, uid: 10107 (user 0)
[   26.754200] c3   2556 KernelSU: UserDE UID: Found package: com.android.dreams.basic, uid: 10146 (user 0)
[   26.754279] c3   2556 KernelSU: UserDE UID: Found package: com.android.webview, uid: 10180 (user 0)
[   26.754355] c3   2556 KernelSU: UserDE UID: Found package: mark.via.gp, uid: 10127 (user 0)
[   26.754415] c3   2556 KernelSU: UserDE UID: Scan completed - 1 users, 97 packages found
[   26.754473] c3   2556 KernelSU: Searching manager...
[   26.754526] c3   2556 KernelSU: search_manager: dir: /data/app got magic! 0xef53
[   26.755934] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.maxmpz.audioplayer-6aM0EWdyr4tGN2YnpPpZkA==/base.apk, is_manager: 0
[   26.757592] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.termux-cA-dkFSM6XO2aHFNqXp2wg==/base.apk, is_manager: 0
[   26.758777] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.eamobile.deadspace_full_azn-B7F9AXuEsqluJzUQNGsKXw==/base.apk, is_manager: 0
[   26.760512] c3   2556 KernelSU: Found new base.apk at path: /data/app/mark.via.gp-dpE7yGJ88V_3bREtdHgMvQ==/base.apk, is_manager: 0
[   26.772636] c3   2556 KernelSU: Found new base.apk at path: /data/app/tw.nekomimi.nekogram-ZxbqqdpKv19zv2jlnqYlEg==/base.apk, is_manager: 0
[   26.774537] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.mycompany.myapp-M_Br3Cy-f_zZEaqSV6kw1A==/base.apk, is_manager: 0
[   26.786376] c3   2556 KernelSU: sha256: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549, expected: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549
[   26.823523] c3   2556 KernelSU: Found new base.apk at path: /data/app/me.weishu.kernelsu-P3lcP6equu9fXP2CSpb1pg==/base.apk, is_manager: 1
[   26.823592] c3   2556 KernelSU: manager pkg: me.weishu.kernelsu
[   26.823655] c3   2556 KernelSU: Search manager finished
[   50.465125] c3   3256 KernelSU: boot_complete triggered
[   50.466209] c3   3256 KernelSU: volumedown_pressed_count: 0
[  819.010293] c0   4328 KernelSU: newfstatat su->sh!
[  819.010502] c0   4328 KernelSU: faccessat su->sh!
[  819.018291] c0   4330 KernelSU: do_execve_common su found
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
This commit restores older throne tracker that uses packages.list scanning
to track app UIDs. It's intended for ultra-legacy Linux 3.X kernels that
experience deadlocks or crashes with the newer implementation due to issues
in user_data_actor().

We have to remember that the whole iterate_dir, and filldir subsystem is way
different on 3.X.

Changes:
- CONFIG_KSU_THRONE_TRACKER_LEGACY in Kconfig
- conditional compilation in Makefile
- throne_tracker_legacy.c which keeps the old implementation

Enable this option if newer throne tracker (tiann#2757) crashes on you.

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
This commit restores compatibility code needed that was removed at tiann/KernelSU@898e9d4 .
where upstream dropped all pre-5.10 support

Reverts `kernel:Add Huawei hisi check (tiann#1545)`
	- upstream tiann/KernelSU@4f05fe2
	- superceded by `kernel: expose allowlist workaround as Kconfig option` on next commit

other changes and cleanups
	sucompat: ksu_handle_stat(), remove dead ifdef.
		- just use `ksu_handle_stat(&dfd, &filename->name, &flags);` if you want to hook vfs_statx on 6.1
	LINUX_VERSION_CODE / KERNEL_VERSION, ksu.c
		- reported by Sinclair19
		- fix by including version.h
	fatal_signal_pending, ksud.c
		- add compat by including sched.h or sched/signal.h conditionally
		- ref: torvalds/linux@2a1f062
	selinux_state.ss, core_hook.c
		- remove rcu_dereference use
		- ref: tiann#2695
	seccomp.filter_count, core_hook.c
		- reset this only for 5.9 and up as it only exists there
		- ref: tiann#2708, gregkh/linux@c818c03
	vfs_getattr, throne_tracker.c
		- add compat by using old fn signature on < 4.11
		- ref: tiann#2757

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 14, 2025
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
https://elixir.bootlin.com/linux/v3.8/source/fs/stat.c#L40

for tiann#2757

i9300:/ # dmesg | grep KernelSU
[    1.213058] c0      1 KernelSU: KEY_VOLUMEDOWN val: 0
[    1.994295] c0      1 KernelSU: Initialized on: 3.0.101-perf-gd886fe010c27-dirty (arm) with ksuver: 12123 +path_umount
[    1.994350] c0      1 KernelSU: ksu_core_init: LSM hooks not in use.
[    3.227469] c2      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1:  envp_len: 176
[    3.774595] c3      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: selinux_setup envp_len: 147
[    3.869057] c3      1 KernelSU: kernel_compat: got init_session_keyring
[    4.045887] c1   1532 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.046032] c1   1532 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.046149] c1   1532 KernelSU: SELinux permissive or disabled, apply rules!
[    4.049667] c2   1533 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.049811] c2   1533 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.049931] c2   1533 KernelSU: SELinux permissive or disabled, apply rules!
[    4.095263] c3      1 KernelSU: vfs_read: /system/etc/init/atrace.rc, comm: init, count: 1024, rc_count: 351
[    4.096334] c3      1 KernelSU: read_proxy append 673 + 351
[    4.096435] c3      1 KernelSU: stop vfs_read_hook
[    4.107671] c1   1532 KernelSU: android context saved disabled
[    4.107952] c2   1533 KernelSU: Type ksu_file already exists
[    9.507451] c2   2231 KernelSU: post-fs-data triggered
[    9.507512] c2   2231 KernelSU: on_post_fs_data!
[    9.507568] c2   2231 KernelSU: stop input_hook
[    9.507619] c1     21 KernelSU: installing init session keyring for older kernel
[    9.507841] c2   2231 KernelSU: devpts sid: 363
[    9.509393] c1     21 KernelSU: allowlist version: 3
[    9.509458] c1     21 KernelSU: load_allow_uid, name: com.android.shell, uid: 2000, allow: 1
[    9.509562] c1     21 KernelSU: set root profile, key: com.android.shell, uid: 2000, gid: 0, context: u:r:su:s0
[    9.509686] c1     21 KernelSU: load_allow_uid, name: $, uid: 9999, allow: 0
[    9.509768] c1     21 KernelSU: set app profile, key: $, uid: 9999, umount modules: 0
[    9.509870] c1     21 KernelSU: load_allow_uid, name: com.reveny.nativecheck, uid: 10186, allow: 0
[    9.509964] c1     21 KernelSU: set app profile, key: com.reveny.nativecheck, uid: 10186, umount modules: 1
[    9.510126] c1     21 KernelSU: load_allow_uid, name: bin.mt.plus.canary, uid: 10004, allow: 1
[    9.510230] c1     21 KernelSU: set root profile, key: bin.mt.plus.canary, uid: 10004, gid: 0, context: u:r:su:s0
[    9.510352] c1     21 KernelSU: load_allow_uid, name: org.frknkrc44.hma_oss, uid: 10005, allow: 1
[    9.510458] c1     21 KernelSU: set root profile, key: org.frknkrc44.hma_oss, uid: 10005, gid: 0, context: u:r:su:s0
[    9.510596] c1     21 KernelSU: load_allow_uid, name: com.termux, uid: 10009, allow: 1
[    9.510685] c1     21 KernelSU: set root profile, key: com.termux, uid: 10009, gid: 0, context: u:r:su:s0
[    9.510802] c1     21 KernelSU: load_allow_list read err: 0
[    9.510865] c1     21 KernelSU: ksu_show_allow_list
[    9.510925] c1     21 KernelSU: uid :2000, allow: 1
[    9.510974] c1     21 KernelSU: uid :9999, allow: 0
[    9.511027] c1     21 KernelSU: uid :10186, allow: 0
[    9.511081] c1     21 KernelSU: uid :10004, allow: 1
[    9.511134] c1     21 KernelSU: uid :10005, allow: 1
[    9.511187] c1     21 KernelSU: uid :10009, allow: 1
[    9.741104] c0   2231 KernelSU: volumedown_pressed_count: 0
[   10.090829] c3   2231 KernelSU: module mounted!
[   10.184060] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.320570] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.455742] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.590694] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.725663] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   11.037447] c2   2243 KernelSU: newfstatat su->sh!
[   11.038034] c2   2243 KernelSU: do_execve_common su found
[   11.038174] c2   2243 KernelSU: Already root, don't escape!
[   11.562290] c3   2253 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/app_process argv1: ./lspd envp_len: 256
[   11.562372] c3   2253 KernelSU: ksu_handle_bprm_ksud: exec app_process, /data prepared, second_stage: 1
[   11.562432] c3   2253 KernelSU: on_post_fs_data already done
[   11.562471] c3   2253 KernelSU: stop execve_hook
[   11.575982] c3   2231 KernelSU: volumedown_pressed_count: 0
[   14.240828] c3   2378 KernelSU: volumedown_pressed_count: 0
[   23.903548] c2   2580 KernelSU: newfstatat su->sh!
[   23.903597] c2   2580 KernelSU: faccessat su->sh!
[   23.904667] c3   2600 KernelSU: do_execve_common su found
[   26.744297] c3   2556 KernelSU: renameat: packages.list.tmp -> packages.list, new path: /system/packages.list
[   26.744395] c3   2556 KernelSU: UserDE UID: Found 1 active users
[   26.744882] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.telephony, uid: 1001 (user 0)
[   26.744955] c3   2556 KernelSU: UserDE UID: Found package: com.android.mms.service, uid: 1001 (user 0)
[   26.745109] c3   2556 KernelSU: UserDE UID: Found package: android, uid: 1000 (user 0)
[   26.745176] c3   2556 KernelSU: UserDE UID: Found package: com.android.ons, uid: 1001 (user 0)
[   26.746886] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.settings, uid: 1000 (user 0)
[   26.746955] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputdevices, uid: 1000 (user 0)
[   26.747121] c3   2556 KernelSU: UserDE UID: Found package: android.ext.shared, uid: 10139 (user 0)
[   26.747190] c3   2556 KernelSU: UserDE UID: Found package: com.android.server.telecom, uid: 1000 (user 0)
[   26.747292] c3   2556 KernelSU: UserDE UID: Found package: com.android.dialer, uid: 10162 (user 0)
[   26.747362] c3   2556 KernelSU: UserDE UID: Found package: android.ext.services, uid: 10132 (user 0)
[   26.747425] c3   2556 KernelSU: UserDE UID: Found package: com.android.proxyhandler, uid: 10129 (user 0)
[   26.747524] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputmethod.latin, uid: 10182 (user 0)
[   26.747592] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings, uid: 1000 (user 0)
[   26.747657] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.lineagesettings, uid: 1000 (user 0)
[   26.747721] c3   2556 KernelSU: UserDE UID: Found package: lineageos.platform, uid: 1000 (user 0)
[   26.747782] c3   2556 KernelSU: UserDE UID: Found package: com.android.phone, uid: 1001 (user 0)
[   26.747884] c3   2556 KernelSU: UserDE UID: Found package: com.android.shell, uid: 2000 (user 0)
[   26.747944] c3   2556 KernelSU: UserDE UID: Found package: com.android.location.fused, uid: 1000 (user 0)
[   26.748004] c3   2556 KernelSU: UserDE UID: Found package: com.android.systemui, uid: 10167 (user 0)
[   26.748063] c3   2556 KernelSU: UserDE UID: Found package: com.android.permissioncontroller, uid: 10122 (user 0)
[   26.748126] c3   2556 KernelSU: UserDE UID: Found package: com.android.cts.priv.ctsshim, uid: 10125 (user 0)
[   26.748221] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.corner, uid: 10003 (user 0)
[   26.748294] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.black, uid: 10193 (user 0)
[   26.748382] c3   2556 KernelSU: UserDE UID: Found package: com.android.terminal, uid: 10199 (user 0)
[   26.748464] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.double, uid: 10000 (user 0)
[   26.748535] c3   2556 KernelSU: UserDE UID: Found package: com.android.dynsystem, uid: 1000 (user 0)
[   26.748594] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.calendar, uid: 10131 (user 0)
[   26.748656] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.media, uid: 10116 (user 0)
[   26.748716] c3   2556 KernelSU: UserDE UID: Found package: com.android.provision, uid: 10185 (user 0)
[   26.748799] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_wide_back, uid: 10054 (user 0)
[   26.748895] c3   2556 KernelSU: UserDE UID: Found package: com.android.traceur, uid: 10198 (user 0)
[   26.748956] c3   2556 KernelSU: UserDE UID: Found package: com.android.wallpapercropper, uid: 10168 (user 0)
[   26.749069] c3   2556 KernelSU: UserDE UID: Found package: tw.nekomimi.nekogram, uid: 10001 (user 0)
[   26.749170] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.cinnamon, uid: 10076 (user 0)
[   26.749262] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.customization, uid: 10200 (user 0)
[   26.749351] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.systemui, uid: 10007 (user 0)
[   26.749424] c3   2556 KernelSU: UserDE UID: Found package: com.android.documentsui, uid: 10123 (user 0)
[   26.749492] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.brown, uid: 10184 (user 0)
[   26.749586] c3   2556 KernelSU: UserDE UID: Found package: com.mycompany.myapp, uid: 10002 (user 0)
[   26.749649] c3   2556 KernelSU: UserDE UID: Found package: com.android.externalstorage, uid: 10133 (user 0)
[   26.749736] c3   2556 KernelSU: UserDE UID: Found package: com.android.htmlviewer, uid: 10144 (user 0)
[   26.749822] c3   2556 KernelSU: UserDE UID: Found package: com.android.companiondevicemanager, uid: 10148 (user 0)
[   26.749892] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.green, uid: 10192 (user 0)
[   26.749979] c3   2556 KernelSU: UserDE UID: Found package: com.termux, uid: 10009 (user 0)
[   26.750083] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads, uid: 10116 (user 0)
[   26.750182] c3   2556 KernelSU: UserDE UID: Found package: com.android.messaging, uid: 10174 (user 0)
[   26.750245] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.rubik, uid: 10191 (user 0)
[   26.750336] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.android, uid: 10057 (user 0)
[   26.750409] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.customization.blacktheme, uid: 10187 (user 0)
[   26.750483] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.orange, uid: 10190 (user 0)
[   26.750548] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.purple, uid: 10195 (user 0)
[   26.750616] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.yellow, uid: 10188 (user 0)
[   26.750684] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.blue, uid: 10197 (user 0)
[   26.750757] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.cyan, uid: 10128 (user 0)
[   26.750824] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.circular.themepicker, uid: 10113 (user 0)
[   26.750897] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads.ui, uid: 10116 (user 0)
[   26.750963] c3   2556 KernelSU: UserDE UID: Found package: com.android.pacprocessor, uid: 10138 (user 0)
[   26.751025] c3   2556 KernelSU: UserDE UID: Found package: com.android.simappdialog, uid: 10157 (user 0)
[   26.751127] c3   2556 KernelSU: UserDE UID: Found package: com.android.networkstack, uid: 1073 (user 0)
[   26.751191] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.pink, uid: 10189 (user 0)
[   26.751257] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.red, uid: 10196 (user 0)
[   26.751324] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.profiles, uid: 10145 (user 0)
[   26.751412] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.tall, uid: 10091 (user 0)
[   26.751509] c3   2556 KernelSU: UserDE UID: Found package: com.android.modulemetadata, uid: 10179 (user 0)
[   26.751574] c3   2556 KernelSU: UserDE UID: Found package: com.android.certinstaller, uid: 10137 (user 0)
[   26.751661] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.black, uid: 10069 (user 0)
[   26.751750] c3   2556 KernelSU: UserDE UID: Found package: bin.mt.plus.canary, uid: 10004 (user 0)
[   26.751811] c3   2556 KernelSU: UserDE UID: Found package: com.android.carrierconfig, uid: 10165 (user 0)
[   26.751897] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.green, uid: 10088 (user 0)
[   26.751995] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.ocean, uid: 10011 (user 0)
[   26.752084] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.space, uid: 10073 (user 0)
[   26.752172] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.threebutton, uid: 10089 (user 0)
[   26.752269] c3   2556 KernelSU: UserDE UID: Found package: org.frknkrc44.hma_oss, uid: 10005 (user 0)
[   26.752331] c3   2556 KernelSU: UserDE UID: Found package: com.android.contacts, uid: 10160 (user 0)
[   26.752413] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.recorder, uid: 10173 (user 0)
[   26.752498] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.launcher, uid: 10087 (user 0)
[   26.752571] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.lato, uid: 10194 (user 0)
[   26.752659] c3   2556 KernelSU: UserDE UID: Found package: io.github.vvb2060.keyattestation, uid: 10008 (user 0)
[   26.752726] c3   2556 KernelSU: UserDE UID: Found package: com.android.egg, uid: 10136 (user 0)
[   26.752785] c3   2556 KernelSU: UserDE UID: Found package: com.android.mtp, uid: 10116 (user 0)
[   26.752875] c3   2556 KernelSU: UserDE UID: Found package: com.android.nfc, uid: 1027 (user 0)
[   26.752930] c3   2556 KernelSU: UserDE UID: Found package: com.android.stk, uid: 1001 (user 0)
[   26.752985] c3   2556 KernelSU: UserDE UID: Found package: com.android.launcher3, uid: 10169 (user 0)
[   26.753042] c3   2556 KernelSU: UserDE UID: Found package: com.android.backupconfirm, uid: 10134 (user 0)
[   26.753098] c3   2556 KernelSU: UserDE UID: Found package: com.eamobile.deadspace_full_azn, uid: 10010 (user 0)
[   26.753189] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.twobutton, uid: 10063 (user 0)
[   26.753254] c3   2556 KernelSU: UserDE UID: Found package: com.android.statementservice, uid: 10115 (user 0)
[   26.753310] c3   2556 KernelSU: UserDE UID: Found package: com.android.hotspot2, uid: 10140 (user 0)
[   26.753365] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings.intelligence, uid: 10158 (user 0)
[   26.753746] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_extra_wide_back, uid: 10094 (user 0)
[   26.753889] c3   2556 KernelSU: UserDE UID: Found package: com.reveny.nativecheck, uid: 10186 (user 0)
[   26.753949] c3   2556 KernelSU: UserDE UID: Found package: com.android.sharedstoragebackup, uid: 10130 (user 0)
[   26.754033] c3   2556 KernelSU: UserDE UID: Found package: com.android.printspooler, uid: 10156 (user 0)
[   26.754115] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.filled.settings, uid: 10107 (user 0)
[   26.754200] c3   2556 KernelSU: UserDE UID: Found package: com.android.dreams.basic, uid: 10146 (user 0)
[   26.754279] c3   2556 KernelSU: UserDE UID: Found package: com.android.webview, uid: 10180 (user 0)
[   26.754355] c3   2556 KernelSU: UserDE UID: Found package: mark.via.gp, uid: 10127 (user 0)
[   26.754415] c3   2556 KernelSU: UserDE UID: Scan completed - 1 users, 97 packages found
[   26.754473] c3   2556 KernelSU: Searching manager...
[   26.754526] c3   2556 KernelSU: search_manager: dir: /data/app got magic! 0xef53
[   26.755934] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.maxmpz.audioplayer-6aM0EWdyr4tGN2YnpPpZkA==/base.apk, is_manager: 0
[   26.757592] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.termux-cA-dkFSM6XO2aHFNqXp2wg==/base.apk, is_manager: 0
[   26.758777] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.eamobile.deadspace_full_azn-B7F9AXuEsqluJzUQNGsKXw==/base.apk, is_manager: 0
[   26.760512] c3   2556 KernelSU: Found new base.apk at path: /data/app/mark.via.gp-dpE7yGJ88V_3bREtdHgMvQ==/base.apk, is_manager: 0
[   26.772636] c3   2556 KernelSU: Found new base.apk at path: /data/app/tw.nekomimi.nekogram-ZxbqqdpKv19zv2jlnqYlEg==/base.apk, is_manager: 0
[   26.774537] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.mycompany.myapp-M_Br3Cy-f_zZEaqSV6kw1A==/base.apk, is_manager: 0
[   26.786376] c3   2556 KernelSU: sha256: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549, expected: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549
[   26.823523] c3   2556 KernelSU: Found new base.apk at path: /data/app/me.weishu.kernelsu-P3lcP6equu9fXP2CSpb1pg==/base.apk, is_manager: 1
[   26.823592] c3   2556 KernelSU: manager pkg: me.weishu.kernelsu
[   26.823655] c3   2556 KernelSU: Search manager finished
[   50.465125] c3   3256 KernelSU: boot_complete triggered
[   50.466209] c3   3256 KernelSU: volumedown_pressed_count: 0
[  819.010293] c0   4328 KernelSU: newfstatat su->sh!
[  819.010502] c0   4328 KernelSU: faccessat su->sh!
[  819.018291] c0   4330 KernelSU: do_execve_common su found
@aviraxp
Copy link
Collaborator

aviraxp commented Sep 15, 2025

Do we need additional selinux rules?

@tiann
Copy link
Owner

tiann commented Sep 15, 2025

Do we need to scan all packages under all userIds?
If userId = 999, the app's uid in the directory is 100000 * 999 + (userId=0's uid).

If we only need to scan the files in the /data/user_de/0 directory, we can directly use iterate_dir without recursion, This is much simpler.

@ShirkNeko
Copy link
Contributor Author

Do we need to scan all packages under all userIds? If userId = 999, the app's uid in the directory is 100000 * 999 + (userId=0's uid).

If we only need to scan the files in the /data/user_de/0 directory, we can directly use iterate_dir without recursion, This is much simpler.

Great idea!

@ShirkNeko
Copy link
Contributor Author

This eliminates the overhead caused by unnecessary recursion.

@aviraxp
Copy link
Collaborator

aviraxp commented Sep 15, 2025

adb install --user 10 MyApp.apk will directly install app to user 10, not 0. So i think it is a must to scan all dir.

@ShirkNeko
Copy link
Contributor Author

However, in most cases, user 0 is always used as the primary user, and support for multiple users is more of a design reserve.

@ShirkNeko
Copy link
Contributor Author

Filtering and identification using active users

@ShirkNeko ShirkNeko deleted the branch tiann:main September 15, 2025 09:22
@ShirkNeko ShirkNeko closed this Sep 15, 2025
@ShirkNeko ShirkNeko deleted the main branch September 15, 2025 09:22
@ShirkNeko ShirkNeko restored the main branch September 15, 2025 09:23
@ShirkNeko ShirkNeko deleted the main branch September 15, 2025 09:24
@tiann
Copy link
Owner

tiann commented Sep 15, 2025

If supporting multiple users is indeed necessary, it can be done as follows:

  1. Scan /data/user_de/0 to get all app UIDs.
  2. (Optional) Scan /data/user_de to get all users.
  3. (Optional) Use the same step 1 to get apps installed separately by other users.

Given that current multi-user environments cannot be completely isolated, I personally believe that installing apps separately in multiple users to evade detection is unnecessary.

@ShirkNeko
Copy link
Contributor Author

If supporting multiple users is indeed necessary, it can be done as follows:

  1. Scan /data/user_de/0 to get all app UIDs.
  2. (Optional) Scan /data/user_de to get all users.
  3. (Optional) Use the same step 1 to get apps installed separately by other users.

Given that current multi-user environments cannot be completely isolated, I personally believe that installing apps separately in multiple users to evade detection is unnecessary.

好的,也许我还能改进下

backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 16, 2025
This commit restores older throne tracker that uses packages.list scanning
to track app UIDs. It's intended for ultra-legacy Linux 3.X kernels that
experience deadlocks or crashes with the newer implementation due to issues
in user_data_actor().

We have to remember that the whole iterate_dir, and filldir subsystem is way
different on 3.X.

Changes:
- CONFIG_KSU_THRONE_TRACKER_LEGACY in Kconfig
- conditional compilation in Makefile
- throne_tracker_legacy.c which keeps the old implementation

Enable this option if newer throne tracker (tiann#2757) crashes on you.

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 16, 2025
This commit restores compatibility code needed that was removed at tiann/KernelSU@898e9d4 .
where upstream dropped all pre-5.10 support

Reverts `kernel:Add Huawei hisi check (tiann#1545)`
	- upstream tiann/KernelSU@4f05fe2
	- superceded by `kernel: expose allowlist workaround as Kconfig option` on next commit

other changes and cleanups
	sucompat: ksu_handle_stat(), remove dead ifdef.
		- just use `ksu_handle_stat(&dfd, &filename->name, &flags);` if you want to hook vfs_statx on 6.1
	LINUX_VERSION_CODE / KERNEL_VERSION, ksu.c
		- reported by Sinclair19
		- fix by including version.h
	fatal_signal_pending, ksud.c
		- add compat by including sched.h or sched/signal.h conditionally
		- ref: torvalds/linux@2a1f062
	selinux_state.ss, core_hook.c
		- remove rcu_dereference use
		- ref: tiann#2695
	seccomp.filter_count, core_hook.c
		- reset this only for 5.9 and up as it only exists there
		- ref: tiann#2708, gregkh/linux@c818c03
	vfs_getattr, throne_tracker.c
		- add compat by using old fn signature on < 4.11
		- ref: tiann#2757

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to ximi-mojito-test/mojito_krenol that referenced this pull request Sep 16, 2025
move to always kthreaded and mitigate sporadic deadlocks on

ref
tiann/KernelSU#2757
tiann/KernelSU#2759
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 18, 2025
This commit restores older throne tracker that uses packages.list scanning
to track app UIDs. It's intended for ultra-legacy Linux 3.X kernels that
experience deadlocks or crashes with the newer implementation due to issues
in user_data_actor().

We have to remember that the whole iterate_dir, and filldir subsystem is way
different on 3.X.

Changes:
- CONFIG_KSU_THRONE_TRACKER_LEGACY in Kconfig
- conditional compilation in Makefile
- throne_tracker_legacy.c which keeps the old implementation

Enable this option if newer throne tracker (tiann#2757) crashes on you.

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 18, 2025
This commit restores compatibility code needed that was removed at tiann/KernelSU@898e9d4 .
where upstream dropped all pre-5.10 support

Reverts `kernel:Add Huawei hisi check (tiann#1545)`
	- upstream tiann/KernelSU@4f05fe2
	- superceded by `kernel: expose allowlist workaround as Kconfig option` on next commit

other changes and cleanups
	sucompat: ksu_handle_stat(), remove dead ifdef.
		- just use `ksu_handle_stat(&dfd, &filename->name, &flags);` if you want to hook vfs_statx on 6.1
	LINUX_VERSION_CODE / KERNEL_VERSION, ksu.c
		- reported by Sinclair19
		- fix by including version.h
	fatal_signal_pending, ksud.c
		- add compat by including sched.h or sched/signal.h conditionally
		- ref: torvalds/linux@2a1f062
	selinux_state.ss, core_hook.c
		- remove rcu_dereference use
		- ref: tiann#2695
	seccomp.filter_count, core_hook.c
		- reset this only for 5.9 and up as it only exists there
		- ref: tiann#2708, gregkh/linux@c818c03
	vfs_getattr, throne_tracker.c
		- add compat by using old fn signature on < 4.11
		- ref: tiann#2757

Signed-off-by: backslashxx <[email protected]>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Sep 18, 2025
int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
https://elixir.bootlin.com/linux/v3.8/source/fs/stat.c#L40

for tiann#2757

i9300:/ # dmesg | grep KernelSU
[    1.213058] c0      1 KernelSU: KEY_VOLUMEDOWN val: 0
[    1.994295] c0      1 KernelSU: Initialized on: 3.0.101-perf-gd886fe010c27-dirty (arm) with ksuver: 12123 +path_umount
[    1.994350] c0      1 KernelSU: ksu_core_init: LSM hooks not in use.
[    3.227469] c2      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1:  envp_len: 176
[    3.774595] c3      1 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: selinux_setup envp_len: 147
[    3.869057] c3      1 KernelSU: kernel_compat: got init_session_keyring
[    4.045887] c1   1532 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.046032] c1   1532 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.046149] c1   1532 KernelSU: SELinux permissive or disabled, apply rules!
[    4.049667] c2   1533 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/init argv1: second_stage envp_len: 169
[    4.049811] c2   1533 KernelSU: ksu_handle_bprm_ksud: /system/bin/init second_stage executed
[    4.049931] c2   1533 KernelSU: SELinux permissive or disabled, apply rules!
[    4.095263] c3      1 KernelSU: vfs_read: /system/etc/init/atrace.rc, comm: init, count: 1024, rc_count: 351
[    4.096334] c3      1 KernelSU: read_proxy append 673 + 351
[    4.096435] c3      1 KernelSU: stop vfs_read_hook
[    4.107671] c1   1532 KernelSU: android context saved disabled
[    4.107952] c2   1533 KernelSU: Type ksu_file already exists
[    9.507451] c2   2231 KernelSU: post-fs-data triggered
[    9.507512] c2   2231 KernelSU: on_post_fs_data!
[    9.507568] c2   2231 KernelSU: stop input_hook
[    9.507619] c1     21 KernelSU: installing init session keyring for older kernel
[    9.507841] c2   2231 KernelSU: devpts sid: 363
[    9.509393] c1     21 KernelSU: allowlist version: 3
[    9.509458] c1     21 KernelSU: load_allow_uid, name: com.android.shell, uid: 2000, allow: 1
[    9.509562] c1     21 KernelSU: set root profile, key: com.android.shell, uid: 2000, gid: 0, context: u:r:su:s0
[    9.509686] c1     21 KernelSU: load_allow_uid, name: $, uid: 9999, allow: 0
[    9.509768] c1     21 KernelSU: set app profile, key: $, uid: 9999, umount modules: 0
[    9.509870] c1     21 KernelSU: load_allow_uid, name: com.reveny.nativecheck, uid: 10186, allow: 0
[    9.509964] c1     21 KernelSU: set app profile, key: com.reveny.nativecheck, uid: 10186, umount modules: 1
[    9.510126] c1     21 KernelSU: load_allow_uid, name: bin.mt.plus.canary, uid: 10004, allow: 1
[    9.510230] c1     21 KernelSU: set root profile, key: bin.mt.plus.canary, uid: 10004, gid: 0, context: u:r:su:s0
[    9.510352] c1     21 KernelSU: load_allow_uid, name: org.frknkrc44.hma_oss, uid: 10005, allow: 1
[    9.510458] c1     21 KernelSU: set root profile, key: org.frknkrc44.hma_oss, uid: 10005, gid: 0, context: u:r:su:s0
[    9.510596] c1     21 KernelSU: load_allow_uid, name: com.termux, uid: 10009, allow: 1
[    9.510685] c1     21 KernelSU: set root profile, key: com.termux, uid: 10009, gid: 0, context: u:r:su:s0
[    9.510802] c1     21 KernelSU: load_allow_list read err: 0
[    9.510865] c1     21 KernelSU: ksu_show_allow_list
[    9.510925] c1     21 KernelSU: uid :2000, allow: 1
[    9.510974] c1     21 KernelSU: uid :9999, allow: 0
[    9.511027] c1     21 KernelSU: uid :10186, allow: 0
[    9.511081] c1     21 KernelSU: uid :10004, allow: 1
[    9.511134] c1     21 KernelSU: uid :10005, allow: 1
[    9.511187] c1     21 KernelSU: uid :10009, allow: 1
[    9.741104] c0   2231 KernelSU: volumedown_pressed_count: 0
[   10.090829] c3   2231 KernelSU: module mounted!
[   10.184060] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.320570] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.455742] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.590694] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   10.725663] c3   2231 KernelSU: SELinux permissive or disabled when handle policy!
[   11.037447] c2   2243 KernelSU: newfstatat su->sh!
[   11.038034] c2   2243 KernelSU: do_execve_common su found
[   11.038174] c2   2243 KernelSU: Already root, don't escape!
[   11.562290] c3   2253 KernelSU: ksu_handle_bprm_ksud: filename: /system/bin/app_process argv1: ./lspd envp_len: 256
[   11.562372] c3   2253 KernelSU: ksu_handle_bprm_ksud: exec app_process, /data prepared, second_stage: 1
[   11.562432] c3   2253 KernelSU: on_post_fs_data already done
[   11.562471] c3   2253 KernelSU: stop execve_hook
[   11.575982] c3   2231 KernelSU: volumedown_pressed_count: 0
[   14.240828] c3   2378 KernelSU: volumedown_pressed_count: 0
[   23.903548] c2   2580 KernelSU: newfstatat su->sh!
[   23.903597] c2   2580 KernelSU: faccessat su->sh!
[   23.904667] c3   2600 KernelSU: do_execve_common su found
[   26.744297] c3   2556 KernelSU: renameat: packages.list.tmp -> packages.list, new path: /system/packages.list
[   26.744395] c3   2556 KernelSU: UserDE UID: Found 1 active users
[   26.744882] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.telephony, uid: 1001 (user 0)
[   26.744955] c3   2556 KernelSU: UserDE UID: Found package: com.android.mms.service, uid: 1001 (user 0)
[   26.745109] c3   2556 KernelSU: UserDE UID: Found package: android, uid: 1000 (user 0)
[   26.745176] c3   2556 KernelSU: UserDE UID: Found package: com.android.ons, uid: 1001 (user 0)
[   26.746886] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.settings, uid: 1000 (user 0)
[   26.746955] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputdevices, uid: 1000 (user 0)
[   26.747121] c3   2556 KernelSU: UserDE UID: Found package: android.ext.shared, uid: 10139 (user 0)
[   26.747190] c3   2556 KernelSU: UserDE UID: Found package: com.android.server.telecom, uid: 1000 (user 0)
[   26.747292] c3   2556 KernelSU: UserDE UID: Found package: com.android.dialer, uid: 10162 (user 0)
[   26.747362] c3   2556 KernelSU: UserDE UID: Found package: android.ext.services, uid: 10132 (user 0)
[   26.747425] c3   2556 KernelSU: UserDE UID: Found package: com.android.proxyhandler, uid: 10129 (user 0)
[   26.747524] c3   2556 KernelSU: UserDE UID: Found package: com.android.inputmethod.latin, uid: 10182 (user 0)
[   26.747592] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings, uid: 1000 (user 0)
[   26.747657] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.lineagesettings, uid: 1000 (user 0)
[   26.747721] c3   2556 KernelSU: UserDE UID: Found package: lineageos.platform, uid: 1000 (user 0)
[   26.747782] c3   2556 KernelSU: UserDE UID: Found package: com.android.phone, uid: 1001 (user 0)
[   26.747884] c3   2556 KernelSU: UserDE UID: Found package: com.android.shell, uid: 2000 (user 0)
[   26.747944] c3   2556 KernelSU: UserDE UID: Found package: com.android.location.fused, uid: 1000 (user 0)
[   26.748004] c3   2556 KernelSU: UserDE UID: Found package: com.android.systemui, uid: 10167 (user 0)
[   26.748063] c3   2556 KernelSU: UserDE UID: Found package: com.android.permissioncontroller, uid: 10122 (user 0)
[   26.748126] c3   2556 KernelSU: UserDE UID: Found package: com.android.cts.priv.ctsshim, uid: 10125 (user 0)
[   26.748221] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.corner, uid: 10003 (user 0)
[   26.748294] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.black, uid: 10193 (user 0)
[   26.748382] c3   2556 KernelSU: UserDE UID: Found package: com.android.terminal, uid: 10199 (user 0)
[   26.748464] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.double, uid: 10000 (user 0)
[   26.748535] c3   2556 KernelSU: UserDE UID: Found package: com.android.dynsystem, uid: 1000 (user 0)
[   26.748594] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.calendar, uid: 10131 (user 0)
[   26.748656] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.media, uid: 10116 (user 0)
[   26.748716] c3   2556 KernelSU: UserDE UID: Found package: com.android.provision, uid: 10185 (user 0)
[   26.748799] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_wide_back, uid: 10054 (user 0)
[   26.748895] c3   2556 KernelSU: UserDE UID: Found package: com.android.traceur, uid: 10198 (user 0)
[   26.748956] c3   2556 KernelSU: UserDE UID: Found package: com.android.wallpapercropper, uid: 10168 (user 0)
[   26.749069] c3   2556 KernelSU: UserDE UID: Found package: tw.nekomimi.nekogram, uid: 10001 (user 0)
[   26.749170] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.cinnamon, uid: 10076 (user 0)
[   26.749262] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.customization, uid: 10200 (user 0)
[   26.749351] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.systemui, uid: 10007 (user 0)
[   26.749424] c3   2556 KernelSU: UserDE UID: Found package: com.android.documentsui, uid: 10123 (user 0)
[   26.749492] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.brown, uid: 10184 (user 0)
[   26.749586] c3   2556 KernelSU: UserDE UID: Found package: com.mycompany.myapp, uid: 10002 (user 0)
[   26.749649] c3   2556 KernelSU: UserDE UID: Found package: com.android.externalstorage, uid: 10133 (user 0)
[   26.749736] c3   2556 KernelSU: UserDE UID: Found package: com.android.htmlviewer, uid: 10144 (user 0)
[   26.749822] c3   2556 KernelSU: UserDE UID: Found package: com.android.companiondevicemanager, uid: 10148 (user 0)
[   26.749892] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.green, uid: 10192 (user 0)
[   26.749979] c3   2556 KernelSU: UserDE UID: Found package: com.termux, uid: 10009 (user 0)
[   26.750083] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads, uid: 10116 (user 0)
[   26.750182] c3   2556 KernelSU: UserDE UID: Found package: com.android.messaging, uid: 10174 (user 0)
[   26.750245] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.rubik, uid: 10191 (user 0)
[   26.750336] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.android, uid: 10057 (user 0)
[   26.750409] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.customization.blacktheme, uid: 10187 (user 0)
[   26.750483] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.orange, uid: 10190 (user 0)
[   26.750548] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.purple, uid: 10195 (user 0)
[   26.750616] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.yellow, uid: 10188 (user 0)
[   26.750684] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.blue, uid: 10197 (user 0)
[   26.750757] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.cyan, uid: 10128 (user 0)
[   26.750824] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.circular.themepicker, uid: 10113 (user 0)
[   26.750897] c3   2556 KernelSU: UserDE UID: Found package: com.android.providers.downloads.ui, uid: 10116 (user 0)
[   26.750963] c3   2556 KernelSU: UserDE UID: Found package: com.android.pacprocessor, uid: 10138 (user 0)
[   26.751025] c3   2556 KernelSU: UserDE UID: Found package: com.android.simappdialog, uid: 10157 (user 0)
[   26.751127] c3   2556 KernelSU: UserDE UID: Found package: com.android.networkstack, uid: 1073 (user 0)
[   26.751191] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.pink, uid: 10189 (user 0)
[   26.751257] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.accent.red, uid: 10196 (user 0)
[   26.751324] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.profiles, uid: 10145 (user 0)
[   26.751412] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.display.cutout.emulation.tall, uid: 10091 (user 0)
[   26.751509] c3   2556 KernelSU: UserDE UID: Found package: com.android.modulemetadata, uid: 10179 (user 0)
[   26.751574] c3   2556 KernelSU: UserDE UID: Found package: com.android.certinstaller, uid: 10137 (user 0)
[   26.751661] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.black, uid: 10069 (user 0)
[   26.751750] c3   2556 KernelSU: UserDE UID: Found package: bin.mt.plus.canary, uid: 10004 (user 0)
[   26.751811] c3   2556 KernelSU: UserDE UID: Found package: com.android.carrierconfig, uid: 10165 (user 0)
[   26.751897] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.green, uid: 10088 (user 0)
[   26.751995] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.ocean, uid: 10011 (user 0)
[   26.752084] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.color.space, uid: 10073 (user 0)
[   26.752172] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.threebutton, uid: 10089 (user 0)
[   26.752269] c3   2556 KernelSU: UserDE UID: Found package: org.frknkrc44.hma_oss, uid: 10005 (user 0)
[   26.752331] c3   2556 KernelSU: UserDE UID: Found package: com.android.contacts, uid: 10160 (user 0)
[   26.752413] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.recorder, uid: 10173 (user 0)
[   26.752498] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.rounded.launcher, uid: 10087 (user 0)
[   26.752571] c3   2556 KernelSU: UserDE UID: Found package: org.lineageos.overlay.font.lato, uid: 10194 (user 0)
[   26.752659] c3   2556 KernelSU: UserDE UID: Found package: io.github.vvb2060.keyattestation, uid: 10008 (user 0)
[   26.752726] c3   2556 KernelSU: UserDE UID: Found package: com.android.egg, uid: 10136 (user 0)
[   26.752785] c3   2556 KernelSU: UserDE UID: Found package: com.android.mtp, uid: 10116 (user 0)
[   26.752875] c3   2556 KernelSU: UserDE UID: Found package: com.android.nfc, uid: 1027 (user 0)
[   26.752930] c3   2556 KernelSU: UserDE UID: Found package: com.android.stk, uid: 1001 (user 0)
[   26.752985] c3   2556 KernelSU: UserDE UID: Found package: com.android.launcher3, uid: 10169 (user 0)
[   26.753042] c3   2556 KernelSU: UserDE UID: Found package: com.android.backupconfirm, uid: 10134 (user 0)
[   26.753098] c3   2556 KernelSU: UserDE UID: Found package: com.eamobile.deadspace_full_azn, uid: 10010 (user 0)
[   26.753189] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.twobutton, uid: 10063 (user 0)
[   26.753254] c3   2556 KernelSU: UserDE UID: Found package: com.android.statementservice, uid: 10115 (user 0)
[   26.753310] c3   2556 KernelSU: UserDE UID: Found package: com.android.hotspot2, uid: 10140 (user 0)
[   26.753365] c3   2556 KernelSU: UserDE UID: Found package: com.android.settings.intelligence, uid: 10158 (user 0)
[   26.753746] c3   2556 KernelSU: UserDE UID: Found package: com.android.internal.systemui.navbar.gestural_extra_wide_back, uid: 10094 (user 0)
[   26.753889] c3   2556 KernelSU: UserDE UID: Found package: com.reveny.nativecheck, uid: 10186 (user 0)
[   26.753949] c3   2556 KernelSU: UserDE UID: Found package: com.android.sharedstoragebackup, uid: 10130 (user 0)
[   26.754033] c3   2556 KernelSU: UserDE UID: Found package: com.android.printspooler, uid: 10156 (user 0)
[   26.754115] c3   2556 KernelSU: UserDE UID: Found package: com.android.theme.icon_pack.filled.settings, uid: 10107 (user 0)
[   26.754200] c3   2556 KernelSU: UserDE UID: Found package: com.android.dreams.basic, uid: 10146 (user 0)
[   26.754279] c3   2556 KernelSU: UserDE UID: Found package: com.android.webview, uid: 10180 (user 0)
[   26.754355] c3   2556 KernelSU: UserDE UID: Found package: mark.via.gp, uid: 10127 (user 0)
[   26.754415] c3   2556 KernelSU: UserDE UID: Scan completed - 1 users, 97 packages found
[   26.754473] c3   2556 KernelSU: Searching manager...
[   26.754526] c3   2556 KernelSU: search_manager: dir: /data/app got magic! 0xef53
[   26.755934] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.maxmpz.audioplayer-6aM0EWdyr4tGN2YnpPpZkA==/base.apk, is_manager: 0
[   26.757592] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.termux-cA-dkFSM6XO2aHFNqXp2wg==/base.apk, is_manager: 0
[   26.758777] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.eamobile.deadspace_full_azn-B7F9AXuEsqluJzUQNGsKXw==/base.apk, is_manager: 0
[   26.760512] c3   2556 KernelSU: Found new base.apk at path: /data/app/mark.via.gp-dpE7yGJ88V_3bREtdHgMvQ==/base.apk, is_manager: 0
[   26.772636] c3   2556 KernelSU: Found new base.apk at path: /data/app/tw.nekomimi.nekogram-ZxbqqdpKv19zv2jlnqYlEg==/base.apk, is_manager: 0
[   26.774537] c3   2556 KernelSU: Found new base.apk at path: /data/app/com.mycompany.myapp-M_Br3Cy-f_zZEaqSV6kw1A==/base.apk, is_manager: 0
[   26.786376] c3   2556 KernelSU: sha256: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549, expected: 4359c171f32543394cbc23ef908c4bb94cad7c8087002ba164c8230948c21549
[   26.823523] c3   2556 KernelSU: Found new base.apk at path: /data/app/me.weishu.kernelsu-P3lcP6equu9fXP2CSpb1pg==/base.apk, is_manager: 1
[   26.823592] c3   2556 KernelSU: manager pkg: me.weishu.kernelsu
[   26.823655] c3   2556 KernelSU: Search manager finished
[   50.465125] c3   3256 KernelSU: boot_complete triggered
[   50.466209] c3   3256 KernelSU: volumedown_pressed_count: 0
[  819.010293] c0   4328 KernelSU: newfstatat su->sh!
[  819.010502] c0   4328 KernelSU: faccessat su->sh!
[  819.018291] c0   4330 KernelSU: do_execve_common su found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants