Unauthorized access to libmedia.so

When I run my game on Android I get a message

Detected problem with app native libraries (please consult log for detail):
libvrapiimpl.so: unauthorized access to "/system/lib/libmedia.so"

In my log I found:

W/linker(6352): library "/system/lib/libmedia.so" ("/system/lib/libmedia.so") needed or dlopened by "/data/app/com.oculus.systemdriver-1/lib/arm/libvrapiimpl.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.

but this is only a warning. The problem occured when I upgraded my device to Android 7. Should I add some special permission to the Android manifest if I want to use libmedia.so?

Here I found the exact problem but according to this I need to rebuild UnrealBuildTool. Is there another way to solve this issue?

Hello Koralgoll,

From looking at the links you provided, have you tried what fixed the issue for brockheinz on the Oculus forums? He mentioned that having “Debuggable” in the manifest caused this issue for him. Have you tried this in any other projects that have Gear VR enabled or is it only in your project?

I tried to remove android:debuggable="true" from Android Manifest under Intermediate/Android but those files are overwritten while building .apk. I have not changed this from source code. However I disabled the Oculus Rift plugin in the editor and the problem seems to be gone for now.

The Oculus Rift plugin shouldn’t be required for Gear VR, so if disabling this plugin resolves the issue, that should be a valid fix. Does this work for you?

With the Oculus Rift plugin disabled the error is not showing up, but when I enable the plugin again the error is not showing up either. My app is working fine now but I guess it is not a proper solution.