### Binary usage commands Source: https://github.com/aerath-stuff/fgetpriority/blob/lkm/userspace/README.md Shows the command-line interface for the userspace binary. Use `enable` with a UID to filter that UID, `disable` with a UID to stop filtering it, and `reset` to clear the filter bitmap. ```shell ./binary enable 10000 # filter uid 10000 ./binary disable 10000 # do NOT filter uid 10000 ./binary reset # reset bitmap ``` -------------------------------- ### Filter all package UIDs Source: https://github.com/aerath-stuff/fgetpriority/blob/lkm/userspace/README.md Shell loop that enables filtering for every UID >= 10000 listed in /data/system/packages.list. Useful for applying the filter to all user apps. ```shell for i in $(awk '$2 >= 10000 {print $2}' /data/system/packages.list | sort -n); do /tmp/binary enable $i; done ``` -------------------------------- ### Load fgetpriority LKM with sys_call_table addresses Source: https://github.com/aerath-stuff/fgetpriority/blob/lkm/kernel/README.md Shell script to retrieve native and compat sys_call_table addresses from /proc/kallsyms and load the fgetpriority.ko module. Requires CONFIG_KALLSYMS_ALL=y when built as a module. Pass compat_sct_param=0x0 to skip hooking compat_sys_call_table. ```shell #!/bin/sh kptr_set=$(cat /proc/sys/kernel/kptr_restrict) echo 1 > /proc/sys/kernel/kptr_restrict native_sct=$(grep " sys_call_table$" /proc/kallsyms | awk {'print "0x"$1'}) compat_sct=$(grep " compat_sys_call_table$" /proc/kallsyms | awk {'print "0x"$1'}) echo $kptr_set > /proc/sys/kernel/kptr_restrict insmod fgetpriority.ko native_sct_param="$native_sct" compat_sct_param="$compat_sct" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.