kernel: added CMD_HOOK_MODE prctl to get the enabled su hook mode value

This commit is contained in:
rifsxd
2025-05-21 17:19:59 +06:00
parent 3b1d5f15f4
commit ce37e17c87
6 changed files with 42 additions and 0 deletions
@@ -50,6 +50,16 @@ object Natives {
external fun uidShouldUmount(uid: Int): Boolean
/**
* Get a string indicating the SU hook mode enabled in kernel.
* The return values are:
* - "Manual": Manual hooks was enabled.
* - "Kprobes": Kprobes hooks was enabled (CONFIG_KSU_KPROBES_HOOK).
*
* @return return hook mode, or null if unavailable.
*/
external fun getHookMode(): String?
/**
* Get the profile of the given package.
* @param key usually the package name