Please check before submitting an issue | 在提交 Issue 前请检查
Version requirements | 版本要求
Bug description | 描述 Bug
APatch /system/bin/su does not inject right gid, groups for non-root privileged user like shell.
This will only affect users who want to run a script/executable with ADB(shell) permission but not the root permission, limiting unnessacary privilege.
Reproduce method | 复现方法
In any terminal emulator,
Open a shell with shell (2000):
Then run id to inspect current uid, gid, groups.
Expected behavior | 预期行为
The actual ADB shell gives:
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
Actual behavior | 实际行为
uid=2000(shell) gid=0(root) groups=0(root) context=u:r:magisk:s0
Screenshots | 截图
No response
Logs | 日志
No response
Device name | 设备名称
PJE100
OS version | 系统版本
LineageOS 23
APatch version | APatch 版本
11142
Kernel version | 内核版本
5.15.202-g4e22ad8d830b
KernelPatch version | KernelPatch 版本
0.12.2
Other information | 其他信息
APatch_bugreport_2026-05-21_19_56.tar.gz
Please check before submitting an issue | 在提交 Issue 前请检查
Version requirements | 版本要求
Bug description | 描述 Bug
APatch /system/bin/su does not inject right gid, groups for non-root privileged user like
shell.This will only affect users who want to run a script/executable with ADB(shell) permission but not the root permission, limiting unnessacary privilege.
Reproduce method | 复现方法
In any terminal emulator,
Open a shell with shell (2000):
Then run
idto inspect current uid, gid, groups.Expected behavior | 预期行为
The actual ADB shell gives:
Actual behavior | 实际行为
Screenshots | 截图
No response
Logs | 日志
No response
Device name | 设备名称
PJE100
OS version | 系统版本
LineageOS 23
APatch version | APatch 版本
11142
Kernel version | 内核版本
5.15.202-g4e22ad8d830b
KernelPatch version | KernelPatch 版本
0.12.2
Other information | 其他信息
APatch_bugreport_2026-05-21_19_56.tar.gz