I want to implement a silent installer-from-apk-file and unistaller-package in Android. The topic has largely been discussed on SO and elsewhere but I can\'t apply any for s
Installing in the /system/app
directory is essentially the same as requiring root.
Assuming you have root, check out RootTools. Then you can do:
if (RootTools.isAccessGiven()) {
CommandCapture command = new CommandCapture(0, "pm install " + PATH_TO_APK);
RootTools.getShell(true).add(command).waitForFinish();
}
Note that waitForFinish()
is a blocking call!