Working Directory: null Environment: null
You need to make sure that the /data/data/com.example.foo/files/ffmpeg
file has the correct file permissions.
You can check file permission with the following command :
String[] command = new String[]{"/system/bin/ls", "-l",
"/data/data/com.example.foo/files/ffmpeg" };
Process process = Runtime.getRuntime().exec(command);
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
int read;
String output = "";
String line;
while ((line = reader.readLine()) != null) {
output.concat(line + "\n");
Log.w("myApp", "[[output]]:" + line);
}
reader.close();
process.waitFor();
The output would be something like this (depending on actual permissions , in this case the permissions are 777) :
[[output]]:-rwxrwxrwx u0_a67 u0_a67 254460 2015-03-02 17:12 ffmpeg
You can set the permissions to 744 , with the command below :
String[] command = new String[]{"/system/bin/chmod", "744",
"/data/data/com.example.foo/files/ffmpeg" };
If you are executing this command from outside activity (from a service lets say) , your permission will have to be 777 (not 744)
Maybe you need to add this permission to your AndroidManifest.xml file:
android.permission.WRITE_EXTERNAL_STORAGE