I'm currently creating an android application that will run some terminal commands. I am using a genymotion Nexus 5 (4.4.4) emulator that comes with root by default. However, to test some general commands I did the following:
Process process = Runtime.getRuntime().exec("su");
process = Runtime.getRuntime().exec(new String[]{"mkdir /sdcard/tmp1/"});
process = Runtime.getRuntime().exec(new String[]{"adb pull /sdcard/tmp3/new4.txt \"C:\\Users\\my_username\\Documents\\\""
When the "su" executes i get a message from an app named SuperUser saying I have have been given root privileges. However none of the other commands are executed. No tmp1 direcotry is made and I can't pull the new4.txt file, which I manually added to the emulator, to my documents folder.
Am I missing something in my path strings?