Skip to content

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

alghostalghost 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?
Post edited by alghost on

Comments

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    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: 6
    edited November 2022
    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: 6
    @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,754
    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: 6
    Glad to know I could be of assistance @JuliusBorisov , hope the devs can fix it.
  • tarrudatarruda Member Posts: 6
    Based on the original post by @alghost , I've found a possible workaround to anyone that needs to backup their BGEE,BG2EE or IWDEE files: Simply uninstall the game without clearing data, then reinstall it WITHOUT opening the app.

    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.
  • tarrudatarruda Member Posts: 6
    @JuliusBorisov I've recently bought neverwinter nights ee from play store and discovered it suffers from similar issue.

    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")
  • KomoracKomorac Member Posts: 13
    @JuliusBorisov just to mention that this problem is important for modding community because modding is almost impossible, there are few loopholes for modding bg1 and Sod but I cant find solution for bg2. It only creates its data folder upon starting the game and makes it unaccessible with those permissions tarruda mentioned. Hope to get some kind of feedback on this
  • leviathanjonleviathanjon Member Posts: 2
    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.

    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.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    The studio is closed for the holidays. I hope I'll bring more news in 2023.
  • alghostalghost Member Posts: 3
    Hello everyone, thanks for all the feedback so far.

    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.
  • carthagomycarthagomy Member Posts: 2
    Bump. Having this same issue and would love to tackle SOD again.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    We've been hiring a Legacy Programmer for a while already. Hopefully, when it's all done, there will be hands and minds available to update the Android version.
  • LTC_PandersLTC_Panders Member Posts: 6
    edited March 2023
    Reinstalling and accessing before opening the game app worked for me but this is a terrible workaround. I hope this gets fixed soon.

    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.
    Post edited by LTC_Panders on
  • LTC_PandersLTC_Panders Member Posts: 6
    tarruda wrote: »
    @JuliusBorisov I've recently bought neverwinter nights ee from play store and discovered it suffers from similar issue.

    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")

    Beamdog please let this guy fix your code.
  • LTC_PandersLTC_Panders Member Posts: 6
    Any update on this?
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,754
    The Legacy Programmer has been hired. This is on their to-do list (which is quite a big one). Sorry for the delay.
  • carthagomycarthagomy Member Posts: 2
    That's such good news Julius :) Thanks so much for the update and hope to be able to import my BGEE saves soon!
  • LTC_PandersLTC_Panders Member Posts: 6
    Thank you for the update! Maybe you can update us on here once he tackles this?
  • LTC_PandersLTC_Panders Member Posts: 6
    Any news on this?
  • sincerossinceros Member, Mobile Tester Posts: 7
    How is this coming along? Hoping to finish a series run before BG3 comes out.
  • LTC_PandersLTC_Panders Member Posts: 6
    sinceros wrote: »
    How is this coming along? Hoping to finish a series run before BG3 comes out.

    This. Please fix this so I can port my bg1 character to bg2 before bg3 comes out.
  • KonponKonpon Member Posts: 7
    edited February 12
    It is now 2024. When is this fix rolling out?
  • KomoracKomorac Member Posts: 13
    @Konpon if you want mod there is a workaround works on all android versions so far... i've posted it here

    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
Sign In or Register to comment.