From d520b3d2a03a24802a79b15e38860596135f9dac Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 8 Sep 2018 23:27:19 -0400 Subject: [PATCH] Request storage permission when patching boot images --- app/src/full/java/com/topjohnwu/magisk/FlashActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java b/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java index e5c33eed0..b95090fb3 100644 --- a/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java @@ -139,8 +139,9 @@ public class FlashActivity extends BaseActivity { new InstallMagisk(this, console, logs, InstallMagisk.SECOND_SLOT_MODE).exec(); break; case Const.Value.PATCH_BOOT: - new InstallMagisk(this, console, logs, - intent.getParcelableExtra(Const.Key.FLASH_SET_BOOT)).exec(); + runWithPermission(new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, + () -> new InstallMagisk(this, console, logs, + intent.getParcelableExtra(Const.Key.FLASH_SET_BOOT)).exec()); break; } }