Commit Graph

2589 Commits

Author SHA1 Message Date
Rifat Azad
14b7861f44 template: add feature request template 2025-07-14 19:59:38 +06:00
Rifat Azad
3c421b1362 manager: added more module list sort options ( enabled, action and webui) 2025-07-13 20:59:33 +06:00
Edrick Sinsuan
c6b60a24e8 ksud: Add second_stage init variant (#653)
There are some ROMs based on AOSP that calls on second stage init
with argc: 2 but with first_arg: "". This causes KSU to not work
properly on those systems.

Signed-off-by: Edrick Sinsuan <evcsinsuan@gmail.com>
2025-07-13 05:26:10 +06:00
Rifat Azad
1baedd89b7 manager: add eruda console (v3.4.3) to webui-next 2025-07-12 23:18:26 +06:00
Rifat Azad
b567e9b275 kernel: add better error message if CMD_GET_MANAGWR_UID fails to fetch manager_uid 2025-07-11 04:11:17 +06:00
Rifat Azad
3ba5b028d4 manager: fix hook mode status showing blank when Natives.getHookMode() is null 2025-07-10 18:10:14 +06:00
Tashfin Shakeer Rhythm
4d633a1e0e kernel: selinux: rules: Fix illegal RCU lock usage in apply_kernelsu_rules() (#2646)
When kernel is compiled with CONFIG_DEBUG_ATOMIC_SLEEP enabled, it
prints the following splat in dmesg during post boot:

[ 6.739169] init: Opening SELinux policy
[ 6.751520] init: Loading SELinux policy
[ 6.894684] SELinux: policy capability network_peer_controls=1 [
6.894688] SELinux: policy capability open_perms=1 [ 6.894690] SELinux:
policy capability extended_socket_class=1 [ 6.894691] SELinux: policy
capability always_check_network=0 [ 6.894693] SELinux: policy capability
cgroup_seclabel=0 [ 6.894695] SELinux: policy capability
nnp_nosuid_transition=1 [ 7.214323] selinux: SELinux: Loaded file
context from: [ 7.214332] selinux:
/system/etc/selinux/plat_file_contexts [ 7.214339] selinux:
/system_ext/etc/selinux/system_ext_file_contexts [ 7.214345] selinux:
/product/etc/selinux/product_file_contexts [ 7.214350] selinux:
/vendor/etc/selinux/vendor_file_contexts [ 7.214356] selinux:
/odm/etc/selinux/odm_file_contexts [ 7.216398] KernelSU:
/system/bin/init argc: 2
[ 7.216401] KernelSU: /system/bin/init first arg: second_stage [
7.216403] KernelSU: /system/bin/init second_stage executed [ 7.216506]
BUG: sleeping function called from invalid context at
security/selinux/ss/hashtab.c:47 [ 7.216512] in_atomic(): 0,
irqs_disabled(): 0, non_block: 0, pid: 1, name: init [ 7.216516]
preempt_count: 0, expected: 0
[ 7.216518] RCU nest depth: 1, expected: 0
[ 7.216524] CPU: 6 PID: 1 Comm: init Not tainted
5.4.289-Scarlet-v2.0-beta3 #1 [ 7.216526] Hardware name: redwood based
Qualcomm Technologies, Inc. SM7325 (DT) [ 7.216528] Call trace:
[ 7.216536] dump_backtrace+0x0/0x210
[ 7.216539] show_stack+0x14/0x20
[ 7.216544] dump_stack+0x9c/0xec
[ 7.216548] __might_resched+0x1f0/0x210
[ 7.216552] hashtab_insert+0x38/0x230
[ 7.216557] add_type+0xd4/0x2e0
[ 7.216559] ksu_type+0x24/0x60
[ 7.216562] apply_kernelsu_rules+0xa8/0x650
[ 7.216565] ksu_handle_execveat_ksud+0x2a8/0x460
[ 7.216568] ksu_handle_execveat+0x2c/0x60
[ 7.216571] __arm64_sys_execve+0xe8/0xf0
[ 7.216574] el0_svc_common+0xf4/0x1a0
[ 7.216577] do_el0_svc+0x2c/0x40
[ 7.216579] el0_sync_handler+0x18c/0x200
[ 7.216582] el0_sync+0x140/0x180

This is because apply_kernelsu_rules() uses rcu_read_lock() to protect
SELinux policy modifications. However, cond_resched() from
hashtab_insert() at security/selinux/ss/hashtab.c is internally called
and it sleeps which is illegal under an RCU read-side critical section.

While replacing it with a spinlock would suppress the warning, this is
fundamentally incorrect because sleeping is illegal while holding a
spinlock and spinlock would turn off preemption which isn't an ideal
solution since it intentionally turns off rescheduling, and can lead to
deadlocks.

Instead, replace the RCU lock with a mutex lock. Mutex lock allows
sleeping when necessary, which is appropriate here because
apply_kernelsu_rules() runs in process context, not in atomic or
interrupt context. As apply_kernelsu_rules() is invoked only once during
post boot (SYSTEM_RUNNING), the mutex lock does not introduce any major
runtime performance regression and provides correct synchronization.

Fixes: https://github.com/tiann/KernelSU/issues/2637

Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
2025-07-10 17:50:14 +06:00
Rifat Azad
f08fcec777 kernel: changed constant value for CMD_HOOK_MODE to 0xC0DEAD1A and CMD_GET_MANAGER_UID to 16, to avoid future conflitcs with upstream 2025-07-10 00:50:45 +06:00
Rifat Azad
afe6ad7261 docs: add crowdin localization progress 2025-07-10 00:04:22 +06:00
Rifat Azad
54b26fd32c New Crowdin updates (#644)
* New translations manager/app/src/main/res/values-zh-rCN/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh-rTW/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de-rDE/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hi-rIN/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru-rRU/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi-rVN/strings.xml (bundle: 8)
2025-07-08 22:00:14 +06:00
Berserkr2k
4b56b14a4f docs: Add Spanish README (#628)
Add the README_ES.md file to provide documentation for Spanish-speaking users.
2025-07-08 00:39:25 +06:00
Rifat Azad
9b4c6057a0 New Crowdin updates (#634)
* New translations manager/app/src/main/res/values-ar-rSA/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn-rBD/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bg-rBG/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh-rCN/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh-rTW/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fr-rFR/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de-rDE/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hi-rIN/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hu-rHU/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-in-rID/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-it-rIT/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ja-rJP/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ko-rKR/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fa-rIR/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl-rPL/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pt-rBR/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru-rRU/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es-rEM/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-sv-rSE/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-th-rTH/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-tr-rTR/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-uk-rUA/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi-rVN/strings.xml (bundle: 8)
2025-07-07 17:27:03 +06:00
Rifat Azad
873740ef1c docs: added Crowdin Translators credits to README 2025-07-07 17:25:53 +06:00
Rifat Azad
ad80c1ea77 manager: remove current locale format to fix locale format to android_code 2025-07-07 17:12:03 +06:00
Rifat Azad
d5c6f0affb New Crowdin updates (#629)
* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)
2025-07-07 13:10:09 +06:00
Rifat Azad
162056f9ff New Crowdin updates (#627)
* New translations manager/app/src/main/res/values-ar/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bg/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hu/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-it/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ja/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ko/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fa/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pt/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-sv/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-th/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-tr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-uk/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ar/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-it/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ja/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fa/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi/strings.xml (bundle: 8)
2025-07-07 04:20:04 +06:00
Eren
3af1d0354d docs: Update README_TR.md (#598) 2025-07-06 13:52:41 +06:00
kam821
6adb2eaf51 Update Polish README (#624)
- Moved to the new README format
- Added missing languages in the header
- Updated README_UA.md link title.
2025-07-06 13:46:43 +06:00
Rifat Azad
ce91e4fedb New Crowdin updates (#623)
* New translations manager/app/src/main/res/values-ar/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bg/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hu/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-it/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ja/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ko/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fa/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pt/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-sv/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-th/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-tr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-uk/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ar/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bg/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ja/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-tr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-uk/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ar/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-hi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pt/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-ru/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-fr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-id/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-it/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pl/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-es/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-tr/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-uk/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-zh/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-de/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-pt/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-vi/strings.xml (bundle: 8)

* New translations manager/app/src/main/res/values-bn/strings.xml (bundle: 8)
2025-07-06 13:45:36 +06:00
Rifat Azad
a36390ea03 Update Crowdin configuration file 2025-07-05 21:47:41 +06:00
Rifat Azad
e31e0271cb manager: clean translations 2025-07-05 21:37:48 +06:00
Rifat Azad
b97fc2bec2 Revert "kernel/Makefile: check kernelsu driver version from online git repo first, if fails then check local .git and if that also fails then use hardcoded fallback"
This reverts commit a37f398cc7.

- this is a very flawed logic for when we try to build with release tags or specific commit hashes instead of latest commit, the online logic will always append latest version instead of the actual version of code (i.e release tags or commit hashes)
2025-07-05 17:35:25 +06:00
Rifat Azad
10875ee190 manager: refactor home module/superuser plural/singular strings 2025-07-04 23:52:20 +06:00
Rifat Azad
fdb01c918a docs: add webui-next api documentation 2025-07-04 21:38:41 +06:00
Rifat Azad
6afa86d2ae manager/webui: let getPackagesIcons generate icon and store in cache as well when called 2025-07-04 01:22:53 +06:00
Rifat Azad
25fa6b7b9b manager: webui-next is now amoled mode compliant 2025-07-03 22:27:18 +06:00
Rifat Azad
a361fa3272 manager: implement getPackagesIcons and cacheAllPackageIcons api to webui-next 2025-07-03 22:03:13 +06:00
Rifat Azad
4a9733c078 manager: sort a-z order for webui-next list packages api 2025-07-03 20:12:21 +06:00
Rifat Azad
31aa571bc2 susfsd: refactored show features & support to match ksu_susfs standards (ref https://gitlab.com/simonpunk/susfs4ksu/-/commit/ad56926) 2025-07-03 19:30:06 +06:00
Rifat Azad
58167a4289 manager: introduce app package info API for webui-next 2025-07-03 15:54:31 +06:00
Rifat Azad
a8bfd1cc7d manager:added more dynamic color vars to webui-next 2025-07-02 16:20:28 +06:00
Rifat Azad
58aeb2697a manager: add monet colors support to webui (webui-next)
- colors are served to /internal/colors.css

the current vars are :

primary
onPrimary
background
onSurface
onSurfaceVariant
tonalSurface
surfaceBright
outlineVariant
error
2025-07-02 14:36:43 +06:00
Rifat Azad
7f68766dc4 manager: move module/allowlist backup directory back to /data/adb/ksu/backup dir since /sdcarf/.ksunext is futile and easily can be used as a detection 2025-07-02 02:30:59 +06:00
Rifat Azad
310c0573c6 manager: fix empty gap shown when zygisk is unavailable (fix #594) 2025-07-02 02:08:54 +06:00
Rifat Azad
d1aad01df3 manager: new zygisk detection method implemented and deprecated old method
Currently only supports ReZygisk and soon ZygiskNext will hopefully follow (ZN users will have issues detecting zygisk injections until then)
2025-07-01 22:21:40 +06:00
Hinata Saine
9733b92d30 Do not translate SELinux status in Japanese (#590) 2025-07-01 15:28:25 +06:00
Pedro.js
aaf776f421 manager: fix integer underflow in get_manager_uid (#591)
This commit fixes the issue where the "uid_t" type variable, typedef'd from unsigned int, was being assigned -1, causing an integer underflow.
2025-06-30 22:17:15 +06:00
Rifat Azad
5e33aee99f manager: fix pull to refresh handling in ModuleList 2025-06-30 19:08:14 +06:00
Rifat Azad
4e3f06d405 kernel: added new prctl CMD_GET_MANAGER_UID to get the uid of the crowned manager
manager: show crowned manager uid in infocard when developer options is enabled
2025-06-30 14:22:19 +06:00
роизен
98b9863041 Update README_UA.md (#577)
Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com>
2025-06-30 13:22:45 +06:00
luigimak
29ae76d1fb Update and fix Italian translation (#583) 2025-06-30 13:21:13 +06:00
igor
2c3841558e Update translations (#580) 2025-06-30 13:20:55 +06:00
Juno Bủh
c8b357e31b Update Vietnamese Translation (#578)
* Update Vietnamese Translation

* Update Vietnamese Translation

* Update Vietnamese Strings

* Update Vietnamese Translation
2025-06-30 13:20:43 +06:00
AxelPLN(Axel Yinjia Huang)
3ad02ff50b fix: update translation for zh-rCH & zh-rTW (#575)
* docs: sync README_CN & README_TW with en

* fix: update manager translation for zh-rCN & zh-rTW

* docs: fixed some text issue

* fix: update translation about su compatibility
2025-06-30 13:20:23 +06:00
mr_vokintos
6a54b30a9d Update Russian (#574)
* Update Russian

again

* Update strings.xml
2025-06-30 13:20:06 +06:00
роизен
b0cb3bb4c2 Update Ukranian (#573)
* Update Uk

* Update strings.xml
2025-06-30 13:19:47 +06:00
Rifat Azad
7f957be99b manager: fix ListItem title size 2025-06-29 20:10:31 +06:00
Rifat Azad
a54c319d55 manager: improve padding 2025-06-29 18:50:04 +06:00
Rifat Azad
2c71531533 manager: UI overhaul 2025-06-29 15:31:17 +06:00
Rifat Azad
5c61a70e5a manager: fix disable back instance if flashing.status is flashing 2025-06-29 00:05:51 +06:00