my uiautomator testcase requires file copied sdcard data/local/tmp , proceed further. when use below mentioned code:
public void runasroot(string cmds) throws ioexception{ process p = runtime.getruntime().exec("cmds"); }
i exception.
java.io.ioexception: error running exec(). command: [cmds] working directory: null environment: null @ java.lang.processmanager.exec(processmanager.java:211) @ java.lang.runtime.exec(runtime.java:168) @ java.lang.runtime.exec(runtime.java:241) caused by: java.io.ioexception: permission denied @ java.lang.processmanager.exec(native method) @ java.lang.processmanager.exec(processmanager.java:209) ... 20 more
is there other way same? appreciate answers, thanks.
there typo in example. "cmds" instead of cmds. code part of android app? kind of commands using? launching on rooted phone or emulator?
Comments
Post a Comment