From 1f84626278c719e0208aea182c923e9165e06753 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 2 Jan 2017 17:48:50 +0800 Subject: [PATCH] Handle /cache/su.img --- scripts/flash_script.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/flash_script.sh b/scripts/flash_script.sh index 1ee28fae8..b34c06cd3 100644 --- a/scripts/flash_script.sh +++ b/scripts/flash_script.sh @@ -397,7 +397,11 @@ if ($SUPERSU); then ui_print "- SuperSU patched boot detected!" ui_print "- Adding auto patch script for SuperSU" cp -af $INSTALLER/common/custom_ramdisk_patch.sh /data/custom_ramdisk_patch.sh - SUIMG=/data/su.img + if (is_mounted /data); then + SUIMG=/data/su.img + else + SUIMG=/cache/su.img + fi mount_image $SUIMG /su if (! is_mounted /su); then ui_print "! SU image mount failed..."