1

I have root. So how can I change the user id of an android app? The background is, I have to start an activity of an app not owned by me in my app. But this will only work if the apps have the same user id.

Thank you for your help

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141

1 Answers1

1

You can run the activity of the other app as root by starting the other app's Activity, using the am start command, and run the am start command as root.

See the following places:


So in the end you would be doing something like `Runtime.exec("su -c \'am start....\'")

Community
  • 1
  • 1
cnexus
  • 454
  • 1
  • 3
  • 14