From e1110af0da06e3ed7fb13d98e3f96cdc6f535b6e Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 13 Oct 2019 22:35:45 +0200 Subject: [PATCH] Android 10: work-around no prompt for android.permission.WRITE_EXTERNAL_STORAGE being shown --- CommonInstaller | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CommonInstaller b/CommonInstaller index 038840a..21566df 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -415,6 +415,15 @@ nanodroid_finalize () { ;; esac + # required on Android 10, else all apps bundled with NanoDroid will not show a permission prompt for + # android.permission.WRITE_EXTERNAL_STORAGE (for whatever reason). + if [ "${SDK_VERSION}" -ge 29 ]; then + find /data/system/users -type f -name 'runtime-permissions.xml' 2>/dev/null | while read file; do + rm -f "${file}" + echo " ++ resetting permissions: ${file}" + done + fi + if [ "${MODE}" = "MAGISK" ]; then magisk_install_finish else