push apk to /data/local/tmp/ instead of sdcard, otherwise packagemanager cannot install from sdcard

This commit is contained in:
root-intruder 2020-08-07 16:46:49 +02:00 committed by Kris Heid
parent d65c8b39d4
commit 163fa7f07f

View File

@ -49,7 +49,7 @@ public class PackageManager {
}
private void install(File apkFile, List<String> extraArguments) throws IOException, JadbException {
RemoteFile remote = new RemoteFile("/sdcard/tmp/" + apkFile.getName());
RemoteFile remote = new RemoteFile("/data/local/tmp/" + apkFile.getName());
device.push(apkFile, remote);
List<String> arguments = new ArrayList<>();
arguments.add("install");