I am trying to access /proc/{PID}
(or run ps) of another process in my app on android 7.1. I can not access any data on other PIDs because of this patch:
https://android-review.googlesource.com/c/platform/system/core/+/181345
I thought that by running su, I would be able to access /proc, but I cannot. I can access /proc using ADB shell, even if i switch user to the user of said application.
Running groups
from adb shell:
> generic:/ # groups
uid=0(root) gid=0(root) groups=0(root)input log adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats readproc
Running groups
from adb after switching to the app's user:
generic:/ # su u0_a56
generic:/ $ groups
uid=10056(u0_a56) gid=10056(u0_a56) groups=10056(u0_a56)input log adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats readproc
Running groups
from inside app:
uid=10056(u0_a56) gid=10056(u0_a56) groups=10056(u0_a56)everybody all_a56
Running groups
from inside app after running su:
uid=0(root) gid=0(root) groups=0(root)everybody all_a56
Why does su change the gid but not the actual groups I am in?