Creating symbolic links from a Java java application

I am developing a small java Android application - I am a real newbie with Android. I am looking for a way to create a symbolic link from my application in a specific directory.

I need to do this as root - suppose the owner of the phone has root privileges on his file system.

Can anyone help me? I could not find it ... if the API does not exist for this, is there an alternative, for example, to run your own script or something else?

Thanx! Gili

+6
android
source share
3 answers

Since you cannot force the vm process to become root, you will have to start another process using any root mechanism ("su", etc.) supported by the user interface. This process must be either a standalone executable executable (created (ab) using ndk gcc) or a shell script.

Obviously, none of them are supported in official Android builds.

0
source share

I do not need root in my application!

All I want to do is create symbolic links from the internal storage reserved for my application (Context.getFilesDir()) to real files on / sdcard.

Curious, but I do not see the possibility of doing this without JNI ...

0
source share

All Articles