I made a backup with the standard file manager of the DB of an app.
Now, after deleting the app data and opening it again, I find that that program is unable to copy to the same subfolder it copied the file from.

I can't find any permission that might help.
I tried with another file manager, but it has the same issue, it's unable to access any subfolder on /Android/data/, except for media.

I understand why apps are restricted from accessing other apps folders.

Is there a way around this?

    SirLordThrThird

    Someone else had a similar issue with this in the past. They were able to split the screen to drag and drop between two instances of the Files app.

    Here's the related thread: https://discuss.grapheneos.org/d/1613-access-to-android-data-folder/8 and the steps this person followed to move files there referred to this here https://gitlab.com/CalyxOS/calyxos/-/issues/1302#note_1159213565

    Hopefully this helps, m'lord.

      SirLordThrThird I understand that you need to give the installed app access to the folder. You do this using the Storage Scope permission.
      Settings / Apps / App xyz / Storage Scopes

      6 days later

      unwat Thanks, I was finally able to do that. I don't get why it must be so tricky though, seems like a basic thing: give permission and move the file.

        nazar-pc

        Unless I'm misunderstanding something, copying files to those folders (~/Android/data/ and ~/Android/obb/) has been restricted since Android 11. It seems to be a result of this change: https://developer.android.com/about/versions/11/privacy/storage#file-access.

        This drag and drop thing is a workaround. Blocking those two actions for the two ~/Android/ folders is to protect users. Maybe blocking the actions is enough and Google doesn't care about this drag and drop workaround. Or maybe they do and will block this in the future too.

          unwat Too many apps storing backups under their data directory in under /storage/emulated/0/Android/data or /data. It not this I simply wouldn't be able to restore some of the settings. I used root on other ROMs in the past, but it is, unfortunately, not available here.

          Interestingly, the contents is browsable in files application, the path is just not available when trying to copy/move files into there.

            nazar-pc Interestingly, the contents is browsable in files application, the path is just not available when trying to copy/move files into there.

            Right. I didn't confirm this, but based on what I've found and how the files app is acting I think it's because the copy is trying to use ACTION_OPEN_DOCUMENT_TREE to select a folder for a move/copy target. It's not possible to select either of those folders anymore.

            nazar-pc Too many apps storing backups under their data directory in under /storage/emulated/0/Android/data or /data.

            Arguably, apps that suggest you restore data there should have stopped doing so since Android 11. They should have another way to restore or they should at least support adb backup.

              unwat Arguably, apps that suggest you restore data there should have stopped doing so since Android 11. They should have another way to restore or they should at least support adb backup.

              True, unfortunately we have to deal with what we have and developers are not always super responsive and some software is still proprietary. Just feels more like iOS than Linux due to not having control over my own device.