Skip to content

In Android 12, Permission Denied for the folder ../data/com.beamdog.baldursgateenhancededition/files

alghostalghost Member Posts: 2
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?
Post edited by alghost on

Comments

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,496
    I don't think it depends on us. Google changed a lot of things in Android 12, and now in Android 13. If/when there is a patch for the Android version, we'll look into this. However, there are no plans atm, as we still have to release the 2.6 version on iOS first.
  • tarrudatarruda Member Posts: 4
    edited November 29
    I have the same issue, cannot access beamdog Baldur's Gate EE directory in external storage. This effectively prevents players from backing up or restoring saves.

    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):
    drwxrws--- 3 u0_a139 ext_data_rw 3452 2022-11-11 16:32 com.android.vending
    drwxrws--- 3 u0_a78  ext_data_rw 3452 2022-11-29 14:36 com.android.wifi.resources.overlay.WifiRes6GhzEnable
    drwxrws--- 3 u0_a82  ext_data_rw 3452 2022-11-29 14:36 com.android.wifi.resources.overlay.WifiResSoftap80211axEnable
    drwx------ 3 u0_a338 ext_data_rw 3452 2022-11-25 16:47 com.beamdog.baldursgateenhancededition
    drwxrws--- 3 u0_a298 ext_data_rw 3452 2022-11-11 19:43 com.brave.browser
    drwxrws--- 3 u0_a307 ext_data_rw 3452 2022-11-11 17:26 com.disney.disneyplus
    drwxrws--- 3 u0_a194 ext_data_rw 3452 2022-11-12 12:22 com.facebook.appmanager
    

    The list is longer but this proves my point: "com.beamdog.baldursgateenhancededition" is the only directory which has
    drwx------
    
    permissions, all others are
    drwxrws---
    
    .

    In UNIX terms,
    drwx------
    
    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).
    drwxrws---
    
    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
    drwxrws---
    
    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)
  • tarrudatarruda Member Posts: 4
    @JuliusBorisov just occurred to me that simply removing directory permission code will not fix the issue for existing users. The devs must probably set the correct permission on existing installations so that the saves currently locked can be backed up.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,496
    Thanks a lot for your findings, @tarruda. Our programmers are looking at your feedback. If it's confirmed, there are good chances an update might be released.
  • tarrudatarruda Member Posts: 4
    Glad to know I could be of assistance @JuliusBorisov , hope the devs can fix it.
Sign In or Register to comment.