Install Apk In Background Using Busybox
can i install apk in background using busybox on rooted device ??? i see something like that but it doesn't work process install; CommandCapture command = new CommandCapture(0, '
Solution 1:
without using busybox
install = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(install.getOutputStream());
os.writeBytes("pm install "+APKFile.apk+"\n");
os.writeBytes("exit\n");
os.flush();
install.waitFor();
Solution 2:
It looks you use two paths for your busybox binary. First you chmod
it in /system/xbin
, but then you invoke it from system/bin
. Ensure you use right path. And chmod 777 /data/app
looks VERY BAD.
Solution 3:
If you run su -c pm install myapp.apk
in a root shell, you should be able install in the background (note the 'pm') part. This has nothing to do with busybox, you can use any shell and you certainly don't need to change permission of /data/app
.
Post a Comment for "Install Apk In Background Using Busybox"