You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/10/12 09:28:32 UTC

[GitHub] [cordova-plugin-file] Sebartus opened a new issue, #540: Permission denied - Android 12 API 32

Sebartus opened a new issue, #540:
URL: https://github.com/apache/cordova-plugin-file/issues/540

   ## Problem
   
   On Android 12 ( SDK 32 ) I'm receiving "Permission denied" error when I try update DFU from:
   `file:///storage/emulated/0/Download/test.zip`
   
   The zip file is in Download catalog on phone storage ( not on card ).
   
   In AndroidManifest.xml I add:
   ```
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
   ```
   and even:
   `<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />`
   
   
   
   **Has the path to the file changed in Android 12 ? 
   Is my path correct ?**
   
   I will be grateful for any help or suggestions...
   
   ### What does actually happen?
   
   Permission denied
   
   ### Key plugins
   `android@11.0.0`
   `cordova-plugin-dfu-update latest version`
   `cordova-plugin-bluetoothle latest version`
   `cordova-plugin-file latest version`
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] vldmrrr commented on issue #540: Permission denied - Android 12 API 32

Posted by GitBox <gi...@apache.org>.
vldmrrr commented on issue #540:
URL: https://github.com/apache/cordova-plugin-file/issues/540#issuecomment-1308099127

   I have similar issue. On previous version of plugin with cordova android 8 when the application first launch after installation a request to user to allow access to storage would show. Now with cordova 11 and android 11 the request is not shown and file access fails with permission denied. If I manually enable access to storage from system settings, then the error does not happen.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek commented on issue #540: Permission denied - Android 12 API 32

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #540:
URL: https://github.com/apache/cordova-plugin-file/issues/540#issuecomment-1308149242

   WRITE_EXTERNAL_STORAGE is deprecated and is a no op when targeting API 30 or later. The scoped storage system does not use the write permission anymore and all apps have limited access to write to the external filesystem.
   
   READ_EXTERNAL_STORAGE however is still used that gives the app permission to read files from external storage that other apps may have written to.
   
   The MANAGE_EXTERNAL_STORAGE is a new permission that allows broad filesystem access to the app, but it requires justification to be used. Google will not allow apps to use this permission unless if they can demonstrate an actual need for broad filesystem access.
   
   >Has the path to the file changed in Android 12 ?
   Is my path correct ?
   
   You have an absolute path, the path is not guaranteed to exist on all devices, but any device with a simulated external storage (doesn't have a physical  sd card) have the /storage/emulated path. The 0/ is the device user id, which on most devices is simply 0. So your path looks ok.
   
   > when I try update DFU...
   
   If your app didn't write `file:///storage/emulated/0/Download/test.zip`, then you may not have write access to the file. This is a scoped storage mechanism that changed in API 30, the external storage system is severely restricted to increase privacy. If you have to download app data, you may want to consider using internal storage instead, which does not require any special permissions. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek closed issue #540: Permission denied - Android 12 API 32

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #540: Permission denied - Android 12 API 32
URL: https://github.com/apache/cordova-plugin-file/issues/540


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-file] breautek commented on issue #540: Permission denied - Android 12 API 32

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #540:
URL: https://github.com/apache/cordova-plugin-file/issues/540#issuecomment-1402876512

   Stale.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org