In Android 12, Permission Denied for the folder ../data/com.beamdog.baldursgateenhancededition/files
alghost
Member Posts: 3
I'm trying to install a ui mod, and it requires writing some files to a folder in the android filesystem, but not even through adb I was able to access it? How can I get permission to write in this folder?
Did beamdog purposely block access to it? I can access other apps' files without issue.
I have tried copying the files through "my files", "google files", "files explorer", "total commander", "x-plore", reinstalling the whole app, and even transfering the files through adb via usb debugging, and everytime i get the permission denied prompt.
Edit:
It's working now, I don't know why. I didn't do anything, the folders and files just showed up and I suddenly have read/write permission.
Bloody witchcraft is what this is.
Edit 2:
Nevermind that, it's blocked again. And once again it's only the files for Baldur's Gate, all other apps' files are still accessible. What am I missing??
Edit3: I can confirm that the app actively locks the folder out. I just uninstalled and reinstalled, and before the app is opened after installation I can access the folder just fine. I can add custom character portraits, edit baldur.lua, and so on and so forth.
But the moment the app is open even once, it is locked forever, or at least until the app is uninstalled, which makes the folder get apparently deleted, and reinstalled, which restores some backup from the cloud or something.
This is an extremely annoying behavior, which should obviously not happen.
Come on Beamdog, why are you locking us out?
Did beamdog purposely block access to it? I can access other apps' files without issue.
I have tried copying the files through "my files", "google files", "files explorer", "total commander", "x-plore", reinstalling the whole app, and even transfering the files through adb via usb debugging, and everytime i get the permission denied prompt.
Edit:
It's working now, I don't know why. I didn't do anything, the folders and files just showed up and I suddenly have read/write permission.
Bloody witchcraft is what this is.
Edit 2:
Nevermind that, it's blocked again. And once again it's only the files for Baldur's Gate, all other apps' files are still accessible. What am I missing??
Edit3: I can confirm that the app actively locks the folder out. I just uninstalled and reinstalled, and before the app is opened after installation I can access the folder just fine. I can add custom character portraits, edit baldur.lua, and so on and so forth.
But the moment the app is open even once, it is locked forever, or at least until the app is uninstalled, which makes the folder get apparently deleted, and reinstalled, which restores some backup from the cloud or something.
This is an extremely annoying behavior, which should obviously not happen.
Come on Beamdog, why are you locking us out?
Post edited by alghost on
0
Comments
I believe I figured out what the problem is: It seems like Baldur's Gate EE Android app incorrectly sets permissions on its external storage directory. Here's the output of "ls -l" (command to show directory/folder lising, using adb shell on my Android 12 phone):
The list is longer but this proves my point: "com.beamdog.baldursgateenhancededition" is the only directory which has permissions, all others are .
In UNIX terms, means the directory is readable/writable only by the owner, in BGEE case that would be "u0_a338" (these are random user ids assigned differently for each android system).
means the directory is readable/writable by the owner and the group. As you can see from the directory listing, the group for all directories under /sdcard/Android/data is "ext_data_rw".
In other words, the directory permission for "com.beamdog.baldursgateenhancededition" must be for the save/portraits to be accessible.
The reason @alghost temporarily gained access to the directory is because when reinstalling the directory permissions are probably reset to the default. But when the BGEE app runs, it changes permissions preventing further access.
@JuliusBorisov As you can see, this is not related to Google/Android changes, but simply a bug in BGEE application. If you can pass this information along to the developers, they should be able to fix it quickly (simply search/remove in API calls to change directory permissions in the source code)
If you do this, Android fixes the directory permissions and you are able to backup the saves, characters, etc. As soon as you open the app though, the permissions get broken again, so this can only be used to backup data before wiping the phone or transfering to another device.
After backing up the data, copy it to the new device immediately after installing the game, but before opening the app, or you won't be able to write the backed up files.
Note that I only have tested this on my phone, which is a Moto G 200 with android 12, this may work differently on other devices.
Tried following your suggestion here: https://forums.beamdog.com/discussion/comment/1038874/#Comment_1038874 , but in my case the "user" directory (under Android > data > com.beamdog.nwnandroid > files) is inaccessible with the same permission problem.
Did your developers find anything? I'm a programmer myself and would be willing to contribute this fix if I have access to the source code. Not looking for a job, just love these games and would like to be able to sync between PC and Android. I can sign NDA or whatever else beamdog deems necessary. (my github profile name is the same as this forum's, "tarruda")
Is it confirmed? Is there any hope it will be fixed in the near future? I dont know why is it so hard to fix but i hope it gets fixed soon.
Is there any updates in relation to this Mr @JuliusBorisov?
Thanks again, I love this game, and the android ports help me keep my sanity during my 1 hour commute.
Edit: actually when I uninstalled and reinstalled bgee a bunch of my game and character saves just went missing. Lost tons of progress. Insanely frustrating.
Beamdog please let this guy fix your code.
This. Please fix this so I can port my bg1 character to bg2 before bg3 comes out.
https://forums.beamdog.com/discussion/86922/android-bg1ee-2-6-6-10-bgsod-2-6-6-10-bg2ee-2-6-6-10-modfiles/p1
It's not straight forward but it works