Is it possible to create a symbolic link on Android?



I want to know if in android it is possible to create symbolic links from my android application, because I want to create a symbolic link of the folder / data of my application with / sdcard. I am not an expert on android, but I usually do it in java using the Java.nio.File.Files class but in android this class is not allowed, I know that in android there is a way that is by using api 21 with The Os.symlink () method, but this is for android 5.0 and I need it for the minimum android 4.0 or 4.1 onwards. If you know any way please let me know, thank you very much.





Try running it as a command with the Process class.

Process symlink = Runtime.getRuntime().exec("ln -s /path/to/file /path/to/symlink");


Facebook Comments

Post a comment