When I just run adb shell, I get shell running from uid=2000(shell) gid=2000(shell), without ptrace access to my application.
adb shell
uid=2000(shell) gid=2000(shell)
How to open a
Use run-as to switch to your app's UID or run-as to run a single command with your app's UID.
run-as