Configure Android Manifest for deployment to Gear VR is wrong

By wrong I refer to the way this checkbox overwrites the android:installLocation to read internal only.
However, for some time now, on the Oculus store we read: Note: Effective March 14, 2017, apps must specify installLocation=“auto” instead of installLocation=“internalOnly”. This accommodates installing apps on SD card external storage.

As such, the way the Android Manifest is overwritten by the Gear VR check box, which is referred to as a mandatory step in the documentation for deployment of mobile apps on the Oculus store, is wrong as per the new Oculus store requirements.

On april the 7th, the folks from Oculus decided to actually enforce their rule and rendered all my app updates efforts futile.

Please advise on how to bypass this issue and please confirm when this bug has been fixed.

Thanks,
George

Hello cgiteach,

If you would like to set the Install location to “auto”, you could do so buy using the drop down found in Project settings > Platforms > Android > Install location. I have provided an example below. I hope that this helps.

Example:

Make it a great day

Hi Rudy, I’m reporting a bug, precisely because your suggested solutions doesn’t work.

If you would please take the time to reread what I’ve said in my post and then follow up and package the app with the Configure Android Manifest for Deployment to Gear VR checkbox on, it will bypass the above setting** and go for internalOnly.

The changes introduced by that checkbox aren’t up to date with Oculus Store standards, this is the Bug.

Please advise on a possible fix,
Thanks again,
George

I’ve posted my reply as an answer, not sure if you get notifications for that.
Like I said, that dropdown option doesn’t work in the conditions I’ve described. This is why I’m reporting this as a bug. The dropdown options works great in other scenarios.

It’s definitely a bug due to outdated defaults in the GearVR UE4 export.

Here’s an annoying workaround that works in the meantime until Epic can fix:

Use apktool to decode modify the manifest then re-build it:

apktool links:

// decodes bar-arm64-es2.apk to bar-arm64-es2 folder

apktool d bar-arm64-es2.apk

Now you can edit your AndroidManifest.xml file changing the install location property.

// builds bar-arm64-es2 folder into bar-arm64-es2/dist/bar-arm64-es2.apk file

apktool b bar-arm64-es2

Now you need to re-sign the apk then zipalign it:

Resign:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mykeystore.keystore bar-arm64-es2.apk mykeyallias

then zipalign:

zipalign -f -v 4 bar-arm64-es2.apk bar-arm64-es2_2.apk

zipalign.exe you can find easily on google :wink:

Hi ,

The fix you’ve mentioned is what I was trying to avoid.
The issue is, like I said, with the Gear VR check box which turns out is an integer part of the Gear VR plugin. Everything that checkbox does is in a file called “GearVR_APL.xml”. Search for it in the engine folder and edit out “internalOnly” with “Auto”. Much simpler than breaking up your .apk.

So this is the fix for now.

Credits for the fix above go to william_wemesh who replied on the Oculus forums here: Re: Submit error: APK install location should be `... - Meta Community Forums - 558483
and to the Oculus Support team who replied to my enquiries with the above link :smiley:

Hopefully this gets registered as a bug and a fix will come from Epic in the next release.

Thanks for posting that workaround from the oculus forum here - much easier than mine :slight_smile:
Hopefully Epic can adjust this in the next engine release!
PS: you can reply to other comments using the reply link under their answer :wink:

This is an easy fix. Edit Engine/Plugins/Runtime/GearVR/Source/GearVR/GearVR_APL.xml. On line 71 there is this line:

<addAttribute tag="manifest" name="android:installLocation" value="internalOnly"/>

just change this to:

<addAttribute tag="manifest" name="android:installLocation" value="auto"/>

This will be in 4.16.

Hello cgiteach,

I took another look at the issue and found that you are correct in that it overwrites the install location setting in the project settings. I misread your first post. A report has been written up and submitted to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.

Link: Unreal Engine Issues and Bug Tracker (UE-43839)

Make it a great day