Search Unity

Question Issue with storage access on Quest 2

Discussion in 'VR' started by Volkerku, Feb 17, 2021.

  1. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    I have trouble accessing (writing to) the internal storage /sdcard/Pictures/ (or /mnt/sdcard/Pictures/)

    This has never been an issue with Quest 1, but just emerged with Q2.
    After installing the APK and running it, Quest 2 asks me to allow permission to access storage, which I confirm.

    I'm in Unity (settings below), and the logcat error I'm getting is:
    ADB Logcat:
    Error Unity UnauthorizedAccessException: Access to the path "/mnt/sdcard/Pictures/xxx.JPG" is denied.
    Error Unity at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0


    Any idea what the cause and fix might be?

    thx, volker
     
  2. flores64

    flores64

    Joined:
    Jan 30, 2019
    Posts:
    1
    did you ever find a fix to this? I am having the same issue event with external permissions
     
  3. digipaul

    digipaul

    Joined:
    Nov 24, 2018
    Posts:
    43
    Quest doesn't have an SD card.You'll never be able to access that path.
     
  4. sanjay_devadiga

    sanjay_devadiga

    Joined:
    Feb 18, 2022
    Posts:
    1
    I am facing the same issue.
    @digipaul I hope we can access the file using either
    /storage/emulated/0/Pictures
    or
    /sdcard/Pictures
    If anyone got a fix, please let me know.

    I faced permission issue in unity version 2023.1.16f1 so I degraded to 2021.3.25f1
    Even though I grant the permission I am getting "access denied".