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