Problem with android 12 limited storage access

961 views
Skip to first unread message

Taynan Diogo

unread,
Aug 17, 2022, 2:50:08 PM8/17/22
to DroidScript
Hello, i'm currently having a problem using the assets tool to add some assets. The file picker works fine, but when i select some file, the file doesn't get added on my projects folder. I think this may have something with android's new file access policy that limits the access to files. Any help would be nice

Alan Hendry

unread,
Aug 17, 2022, 4:20:08 PM8/17/22
to DroidScript
Hi,
What version of Android is this?
Are you just using DroidScript on a phone/tablet? (Or using the WiFi IDE, or BlueStacks, or ChromeBook).
You should be able to work around the problem by copying the assets using the Android Files app
( In scoped storage, the Files app is probably restricted, so I use X-Plore a free app from the Google Play Store,
Your projects/apps should be at sdcard/Android/data/com.smartphoneremore.androidscriptfree/files/DroidScript )
Regards, ah
Message has been deleted

Taynan Diogo

unread,
Aug 17, 2022, 4:38:12 PM8/17/22
to DroidScript

Android 12, i'm using it on my Samsung phone. I already tried that workaround of mannually adding files, but i find it less pratical than using the built-in asset manager. I'm hoping the devs see this problem and maybe manage to find a solution in the next update

Alan Hendry

unread,
Aug 19, 2022, 6:27:44 AM8/19/22
to DroidScript
HI,
It may help the official/technical team to know specifically where you are trying to copy assets from.
Pretty certain that DS can write to your project/app folder,
so presumably whatever it is using to browse folders has read access to the folder, but DS can't copy from there. 
Regards, ah

Taynan Diogo

unread,
Sep 9, 2022, 8:44:16 AM9/9/22
to DroidScript
i'm using many folders, mostly the downloads folder, the solution to this problem seems clear to me now, scoped storage in android 12 now demands some new security requiriments, and, for being able to access all files in a folder, you need to execute the "ACTION_OPEN_DOCUMENT_TREE" But still, some folders aren't allowed-Per example, the downloads folder. Another better alternative to end all those problems on android is to request permission to access all media is to request "MANAGE_EXTERNAL_STORAGE" or by using the intent "Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION"
Thank you -Taynan

Dave

unread,
Sep 11, 2022, 4:59:43 PM9/11/22
to DroidScript
Try the latest beta version - http://androidscript.org/beta/DroidScript_254b1/

I just tested this on Android 12 with a fresh install and I could add images from the phone's photo album fine.

Reply all
Reply to author
Forward
0 new messages