0

Is it possible to say, bootstrap an Android app, then use reflection to access fields from that app while it's running?

With java you can take any java application and use a class loader to create and run a new instance of the application, this then allows you to use reflection to access the fields from the application at runtime (how runescape bots work).

I'm new to android development and am not sure of the restrictions.

Any information will probably be useful, and I realize this probably isn't all that legal.

Jord Flo
  • 29
  • 4
  • Are you accessing fields from within the app in question (i.e. do you control the app)? If so then of course, reflection works just fine on Android. However, you can only access the memory of your own app (unless you are willing to use Xposed). – Andrew Sun Aug 15 '16 at 15:01

1 Answers1

0

In Android, every app runs in its own sandbox. You cannot access the internals of one app from from outside it, unless the app itself provides a mechanism. See the Security overview documentation and specifically the Application security topic.

Note that tools like Xposed can be used to work around this, but they only work on rooted devices.

Also, you don't "bootstrap" an app from another app; rather you construct an Intent and ask the OS to launch it for you (as described in this thread).

Community
  • 1
  • 1
Ted Hopp
  • 232,168
  • 48
  • 399
  • 521