cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to load OVRMrcLib.so

FB.dtalker
Explorer

Hello everyone, I've encountered an issue with my project when I'm trying to make my unity game support mixed reality capture.

I was able to successfully select my webcam on my desktop and connect on my quest2, but I'm stuck on the 

FBdtalker_1-1693461093287.png.

 

I am able to successfully connect my quest2 on obs when I am launch the beat saber, except for my game.

After comparing my game and other games that support mrc, I find the error in my game log (from adb):

08-31 09:57:16.028 15850 15879 I OVRPlugin: OVRPlugin 1.86.1 ... preinitialized
08-31 09:57:16.154 15850 15879 I OVRPlugin: OpenXR SDK version 1.0.27
08-31 09:57:16.154 15850 15879 I OVRPlugin: AppNativeLibraryDir: /data/app/~~Ilxo98GhRdsMhYzcPvYa8w==/com.FB.UnityMetaMRC-hjTiR0Cm6u5aiqOYuffJzQ==/lib/arm64
08-31 09:57:16.154 15850 15879 I OVRMrcLib: Try loading /data/app/~~Ilxo98GhRdsMhYzcPvYa8w==/com.FB.UnityMetaMRC-hjTiR0Cm6u5aiqOYuffJzQ==/lib/arm64/libOVRMrcLib.oculus.so
08-31 09:57:16.154 15850 15879 I OVRMrcLib: Try loading /data/app/~~Ilxo98GhRdsMhYzcPvYa8w==/com.FB.UnityMetaMRC-hjTiR0Cm6u5aiqOYuffJzQ==/lib/arm64/libOVRMrcLib.so
08-31 09:57:16.155 15850 15879 I OVRMrcLib: Try loading libOVRMrcLib.oculus.so
08-31 09:57:16.155 15850 15879 I OVRMrcLib: Try loading libOVRMrcLib.so
08-31 09:57:16.155 15850 15879 E OVRMrcLib: Unable to load OVRMrcLib
08-31 09:57:16.155 15850 15879 I OVRPlugin: Unable to load OVRMrcLib

My game doesn't load OVRMrcLib.so from quest system .so library causing the problem.

How can I slove this promble? By let my game loading OVRMrcLib.so from quest2 system library, like other mrc games.

 

My steps to access the function are:

1.Create a new urp unity project.

2.Import the unity-integration package (just vr part) which download from :https://developer.oculus.com/downloads/package/unity-integration/56.0

3.Fix all promble show in Project Settings that report by Oculus and XR Plug-in Management.

4.Switch platfrom to android.

5.Build my game and install.

6.Copy mrc.xml to my quest2

7.Launch game, connect to quest2 using OBS.

 

Test project and log file here:

https://github.com/Fb-dtalker/UnityMetaMRC/tree/main

 

Please help! I sincerely appreciate!

 

1 ACCEPTED SOLUTION

Accepted Solutions

arif69eee
Explorer

Hi,

Thanks for your reply!

I was already able to solve the issue! Here is how I solved it (it might help others who are facing the issue) -

1. I removed the "Oculus Integration" from my project
2. Installed the "Meta XR Core SDK"
3. Added following entry to AndroidManifest.xml
<uses-native-library android:name="libOVRMrcLib.oculus.so" android:required="true" />

Thanks 🙂 .

View solution in original post

8 REPLIES 8

arif69eee
Explorer

Hi,

Thanks for posting this issue! I am also getting exactly the same error.

Did you get any solution please?

Thanks!

Oh, yes. I found a way to solve the promble and it works.

However, I found it may solved in the Oculus Integration SDK v57, a few days ago . (Now it update to v59)

I recommand you try the new version of the sdk first, and it will load the dll from system lib automatically.

 

If even with the new version you still can't load OVRMrcLib.so, you can try to put the OVRMrcLib.so into your unity plugin folder just like: 

FBdtalker_0-1702265637224.png

In this way, .so file will be packed with the apk. I don't recommend this because it might not work on different version of quest.

----

You can get OVRMrcLib.so by: 

adb pull "/system/lib/libOVRMrcLib.oculus.so" "CopyToPath"

FBdtalker_1-1702269248662.png

arif69eee
Explorer

Hi,

Thanks for your reply!

I was already able to solve the issue! Here is how I solved it (it might help others who are facing the issue) -

1. I removed the "Oculus Integration" from my project
2. Installed the "Meta XR Core SDK"
3. Added following entry to AndroidManifest.xml
<uses-native-library android:name="libOVRMrcLib.oculus.so" android:required="true" />

Thanks 🙂 .

Hi,

Sorry for my late response.

Thank you very much for your solution!

I accept your solution as the answer for this post, and I think it is the best way to solve the promble!

Thank you!👍

 

arif69eee
Explorer

Hi,

No problem at all! And it's my pleasure that you accepted my solution! 

All the best! 

Thank you!

Hi, how did you remove "Oculus Integration"? I don't see the "remove" button in package manager, there's only "Import" and "Re-Download". The package only appeared in Packages: My Assets. It also appeared as "Oculus Integration (Deprecated)"

Screenshot 2024-02-13 015442.png


@arif69eee wrote:

Hi,

Thanks for your reply!

I was already able to solve the issue! Here is how I solved it (it might help others who are facing the issue) -

1. I removed the "Oculus Integration" from my project
2. Installed the "Meta XR Core SDK"
3. Added following entry to AndroidManifest.xml
<uses-native-library android:name="libOVRMrcLib.oculus.so" android:required="true" />

Thanks 🙂 .


 

I couldn't build the project. There were errors as in the screenshot below.
I thought I was missing the libOVRMrcLib.oculus.so, so I tried to pull the file from my Quest Pro, using "adb pull". But it still didn't work. I got this warning: `Plugin 'Assets/Plugins/Android/libs/arm64-v8a/libOVRMrcLib.oculus.so' doesn't have CPU architecture set, since it's a native plugin, valid architecture is required, skipping.`Screenshot 2024-02-22 164941.png


@arif69eee wrote:

Hi,

Thanks for your reply!

I was already able to solve the issue! Here is how I solved it (it might help others who are facing the issue) -

1. I removed the "Oculus Integration" from my project
2. Installed the "Meta XR Core SDK"
3. Added following entry to AndroidManifest.xml
<uses-native-library android:name="libOVRMrcLib.oculus.so" android:required="true" />

Thanks 🙂 .


 

When I add this line to my androidmanifest, the project won't build anymore. Builds fine without it.