Android Question Android/data folder permission

Accessing and copying files to the Android data folder is limited in Androids above 10, especially 13 and 14, but file managers such as Z Archiver can access the Android/data folder by obtaining a permission.

I also want to copy a folder in B4A that contains several other folders and all files from the program's internal memory to the Android/data folder. Now either the folder itself to Android/data or the folder files to a folder in Android/data for example Android/data/A Folder

Someone had already made a B4A module for me for this purpose. Works on all Androids and most phones:


But it doesn't work on some phones like Xiaomi or A12 or A14 or A13 or A32 or SM-M325F, now it doesn't matter if they have Android 11 or 14:


Can someone here write me a dedicated B4A library that works in any model of phone and any version of Android and transfer the file and folder to Android/Data or the folders inside it?
 

agraham

Expert
Licensed User
Longtime User
Read this post carefully and note the link at the end of the post to post number 35 in another thread that has an example of accessing the data folder.
Also note that this loophole may have been closed on Android 14 but I don't know as I only have 13 on my phones. If your File Explorer can show the data folders this is how it is doing it.

If this doesn't work on your phones then it is likely they have closed the loophole and there is nothing you can do about it.
 
Upvote 0
Thank you for your guidance.
My phone is A23 and has Android 14 and the module works without problems.
But the module does not work on some phones like A13 or A24, which are like my phone from Samsung and have Android 13 or even 12 (image attached in the first post).
I don't think that the hole is closed on these phones because they are Samsung brand, and if it was closed, the access granting screen would not come up at all. In my opinion, if a person skilled in Android programming edits the codes a little, this problem should be solved and permission should be obtained on 100% of the devices.
 
Upvote 0
Dear @Erel , could you please guide me, what is the problem?
I know that it is not allowed to directly name you and ask for help from a specific person, but because my app is down for some users and I need urgent help, I am sending this.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
My phone (A24 & Android 14) is newer than the phone (A14 & Android 13).
The codes work on my phone and access is taken!
But it does not work on the phone (A14).
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…