cancel
Showing results for 
Search instead for 
Did you mean: 

Quest 2 - Local Storage Path changed? - Quest1 App broken!

Anonymous
Not applicable
Dear all,

I developed a few APKs that run perfectly on Go and Quest 1.
A Unity video player loads a video stored in a local folder on runtime. For that, I switched the video source to URL and its path to /mnt/sdcard/myfolder/video.mp4

Now on Quest 2, it doesn't load the video! Is there a new path? Or does Quest 2 not accept ARMv7 APKs? The app is running on Quest 2, mind you, but not loading the video - as if it doesn't know where to look for the files.

I hope someone from the Oculus officials can shed some light on this.

Thanks
Felix

32 REPLIES 32

gedo831
Level 4
@TheSwanCollective
I do not have any specific insights about Quest2's path structure since I have never experienced any problem yet.
Below is the simplest sample of code how I access to the local storage of my Quest/Quest2. This may not work for the defaults (pre-created by OS) folders but works fine for my use case.

using System.IO;
public class DirectorySetter : MonoBehaviour
{
void Start()
{
Directory.CreateDirectory("sdcard/MyFolder");
}
}

Anonymous
Not applicable
Hmm... Maybe I should get rid of the /mnt/ then? Worth a try tomorrow 🙂 

Cain_Bloodbane
Level 5
Your app can access the Quest storage outside the apps permanent storage folder? Does that mean you can access screenshots taken on the Quest and such as well?

I have not tried that yet on the Quest 2, I have only used the permanent storage folder, which in this case is:
\Android\data\dk.Dionysus.QuestMenuApp\files

Well, might be longer on the Quest 2 itself, this is the path my computer sees when accessing the Quests internal storage. I am testing a bunch of stuff these days, like being able to save images to this folder, loading them, saving other custom files to it. Going pretty well so far.

But I just assumed it would not be possible to access any other folders.

Regarding the question though... I think the Quest 2 might be using a newer version of Android than the Quest 1. Although I find it unlikely as I am pretty sure the Quest 1 would have gotten an update if that was the case. Less code to maintain if they keep both of them running the same Android version. But I have not checked if the Quest 2 might be using a newer version of Android.

Anonymous
Not applicable
Like I said, on Quest 1 it was perfectly possible to access a custom folder in your root directory on the Quest. So for example video YYY.mp4 inside folder MyFolder would be accessed (in Unity) via /mnt/sdcard/MyFolder/YYY.mp4

But on Quest 2 it doesn't work anymore 😞

gedo831
Level 4
@TheSwanCollective
Did you try it without "/mnt/"?

Anonymous
Not applicable
@gedo831 yeah I tried all kinds of variations. Also system folders like download or movies. 
Always black screen. Don't know if it's a path problem or maybe some kind of 'permission to read' problem.
But manifest checks out and like I said, on quest 1 it just works.... 

gedo831
Level 4
Better check if the system reaches to the files by outputting some debug log.
Then could be Unity's video player issue, maybe.

Anonymous
Not applicable
Please, @OculusSupport ! This is very important to a lot of your loyal customers 😕

Hi, I had the same problem, but I solved it with the following method.

Add the following code to the application tag in AndroidManifest.xml.

android:requestLegacyExternalStorage="true" 

Anonymous
Not applicable
Dear @"yuuki.shimada.77" , thanks for your reply! This sounds too awesome to be true, and I guess this might be the solution!

However: When I add your line to <application ... > in the android manifest, I get a bunch of build errors like:

error: attribute android:requestLegacyExternalStorage not found.
error: failed processing manifest

I was targeting API level 28.

Any ideas about how to correctly implement this line in the manifest?

THANKS AGAIN for your incredible help,
Felix