Working Directory : null environment when running Process.Builder on android
I am using two phones, Galaxy Nexus(JellyBean) and Nexus 5(KitKat). I am trying to execute a script which exists in /data/folder/scripts/run.sh I use Process.Builder to build the command. This command is built by getting Environment.getDataDirectory().toString() + "/folder/scripts/run.sh" There are no issues running this on the Galaxy Nexus but when I run it on the Nexus 5, I catch an exception when I run the process.start(). The output which I get contains: Error running exec(). Command: [/data/folder/scripts/run.sh, "param"]. Working directory: null Environment: [ADNROID_ROOT=/system ... ]