I am creating an Android App (Xposed module) that disables applications (packages). When I run the command from adb shell
it runs perfectly. But from my application I am not able to figure out why it is not working.
Here is the code:
try {
Process su = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
outputStream.writeBytes("pm disable com.bt.bms");
outputStream.writeBytes("exit\n");
outputStream.flush();
}
catch (IOException e) {
throw new RuntimeException(e);
}
Is there any way I can see the result of the executed code?
This worked for me: