Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ extern "C" {
*/
#define PROCESS_CONTEXT_PREFIX__UNTRUSTED_APP_27 "u:r:untrusted_app_27:"

/**
* The process context prefix assigned to app processes
* running inside the `run-as` command from ADB or root shell.
*
* - https://cs.android.com/android/platform/superproject/+/android-13.0.0_r18:system/sepolicy/private/seapp_contexts;l=177
* - https://cs.android.com/android/platform/superproject/+/android-13.0.0_r18:system/sepolicy/public/runas_app.te;l=1
* - https://cs.android.com/android/platform/superproject/+/android-13.0.0_r18:system/sepolicy/private/runas_app.te
*/
#define PROCESS_CONTEXT_PREFIX__RUNAS_APP "u:r:runas_app:"

/**
* The process context assigned to `root` (`0`) user processes by
* AOSP, like for `adb root`. The process context always equals
Expand All @@ -93,6 +103,17 @@ extern "C" {
*/
#define PROCESS_CONTEXT__AOSP_SU "u:r:su:s0"

/**
* The process context assigned to `root` (`0`) user processes by
* KernelSU, like for `su` commands. The process context always equals
* `u:r:ksu:s0` without any categories.
*
* - https://github.com/tiann/KernelSU
* - https://github.com/tiann/KernelSU/blob/v3.2.5/manager/app/src/main/java/me/weishu/kernelsu/Natives.kt#L29
* - https://github.com/tiann/KernelSU/blob/v3.2.5/website/docs/guide/app-profile.md#selinux
*/
#define PROCESS_CONTEXT__KERNEL_SU "u:r:ksu:s0"

/**
* The process context type assigned to `root` (`0`) user processes by
* Magisk, like for `su` commands. The process context always equals
Expand Down