NadavRub
NadavRub

Reputation: 2610

Android, Java, running an Executable resource

Environment

Use-case

Questions/Discussion

Is the above use-case supported by the Android OS?

To the best of my knowledge, '/data/local/tmp' is not accessible to a running app ( but to shell & root ), Is there a directory where the file can be extracted too and executed? ( dir must have execution rights )

What would be the best approach to achieve the above mentioned?

Upvotes: 1

Views: 318

Answers (1)

chiastic-security
chiastic-security

Reputation: 20520

Yes, you can do this. You will need to make sure that the native executable is for the appropriate target architecture (some type of ARM processor, usually).

But you shouldn't extract it to /data/local/tmp. You will need to extract it to /data/data/application.package.name/lib, which is a directory to which your app has read/write permissions.

There are more details in this question and its accepted answer. It looks as though you can have the executable extracted automatically for you if you name it as if it were a library file rather than a standalone executable.

Upvotes: 2

Related Questions