I am trying to call shell command on a emulator programmatically from my program. I looked at the adb terminal and it was written
adb shell session runs with
root in case of emulator or rooted device)
UID. Your app (and all subprocesses it spawns) still run with its own
UID. You still need to manually elevate your privileges (by using
su) even when running on an emulator or a rooted device.