diff --git a/app/src/main/java/com/topjohnwu/magisk/asyncs/HideManager.java b/app/src/main/java/com/topjohnwu/magisk/asyncs/HideManager.java index 2fe77161c..081db038c 100644 --- a/app/src/main/java/com/topjohnwu/magisk/asyncs/HideManager.java +++ b/app/src/main/java/com/topjohnwu/magisk/asyncs/HideManager.java @@ -2,6 +2,7 @@ package com.topjohnwu.magisk.asyncs; import android.content.Context; import android.content.pm.PackageManager; +import android.os.Environment; import android.widget.Toast; import com.topjohnwu.magisk.MagiskManager; @@ -31,7 +32,8 @@ public class HideManager extends ParallelTask { return false; // Generate a new unhide app with random package name - File unhideAPK = new File(magiskManager.getCacheDir(), "unhide.apk"); + File unhideAPK = new File(Environment.getExternalStorageDirectory() + "/MagiskManager", "unhide.apk"); + unhideAPK.getParentFile().mkdirs(); String pkg = ZipUtils.generateUnhide(magiskManager, unhideAPK); // Install the application