cancel
Showing results for 
Search instead for 
Did you mean: 

Upload an app - oculus developer hub problem

sansonimauro
Honored Guest

Hello
I am trying to upload a virtual reality app for architecture in the oculus store via oculus developer hub.
When I try to upload the app I get a banner with the following errors:

 

*********************************************************************************
* Your copy of Oculus Platform Command Line Utility is old. *
* Version 1.67.0.000001 was released on Thu Oct 07 2021. *
* Please use the following command to update it: *
> ..\...\NUsersUsuario\NAppData\Roaming\Nodh\ovr-platform-util.exe self-update *
*********************************************************************************
[1m
Validating the compilation...[0m
NOTE:
Your manifest includes the following permissions restricted by Oculus:
- android.permission.READ_EXTERNAL_STORAGE.
- android.permission.ACCESS_MEDIA_LOCATION
Please remove these permissions if they are not necessary for your application. If they are required, you must include a justification in the "Notes to reviewer" field when you submit your application for review. Failure to do so will result in your application being rejected.
[1m
Preparing for upload...[0m
[1m
Uploading the APK...[0m
Uploading...
Waiting for the processing to start...
rebuilding uploaded file (1 / 3)
validating package contents (2 / 3)
ERROR: There were problems validating the APK. Check that it meets the app manifest requirements, then resubmit the app.
* APK screen orientation is not horizontal (android:screenOrientation in AndroidManifest.xml).
Build Upload Error - an error has occurred.

 

 

I tried by a lot of means to remove those two permissions but I can't get it.
If someone can help me I would really appreciate it.

I am developing the project in unreal using blueprints, not c++ (I have no programming knowledge).
Regards.

19 REPLIES 19

Ok, do I need to do steps 1 through 3? Or just the last step for the build.cs? Also where do I find the Androidsanitizepermissions_upl.xml? Do I need to create this? Thanks for All your help man! I really appreciate it! 

Where do I get the AndroidSanitizePermissions_UPL.xml? Do I have to create it? Do I follow his directions steps 1 through 3 with the override txt document as well? Or just do the AndroidSanitizePermissions_UPL.xml document thing and add the lines to build.cs? Thanks for all your help man! I really appreciate it! 

 

It's worked for me without doing step 1.

 

Step 2 is to create the AndroidSanitizePermissions_UPL.xml file under "YourProjectName/Source/YourProjectName" directory. Yours should look like this:

<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
  <androidManifestUpdates>
    <removePermission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
    <removePermission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  </androidManifestUpdates>
</root>

 

Step 3 is to modify the YourProjectName.Build.cs file in that same directory. You need to add these lines to the constructor. So just before the last two } in the file.

if (Target.Platform == UnrealTargetPlatform.Android  && Target.Configuration == UnrealTargetConfiguration.Shipping)
{
    var manifestFile = System.IO.Path.Combine(ModuleDirectory, "UpdatePermissions.xml");
    AdditionalPropertiesForReceipt.Add("AndroidPlugin", manifestFile);
}

I've included and extra if so that it only strips these for shipping builds. If you don't do this it can break your ability to use the launch button in the Unreal editor.

You included an extra } symbol? Also do I need to create the AndroidSanitizePermissions_UPL.xml myself or does it already exist? Thanks man

Also my applab upload failed because of write_external_storage as well if I take away the read permission is that good enough? Or so do I need to manually add the write one too? Thanks 

When I edit the build.cs file by opening it with note pad it stays until I build game then when I come back to the build.cs file everything I pasted into it is gone? Also I created the xml file by copying another xml file renaming it then putting the text into it. Still not working? 

I think I might be doing the Build.cs file wrong because it’s not saving after I build my project and go back to look at the build.cs file all the code you have above that I pasted in is gone. Can you please send me a pic of where exactly to put it in the file? Thanks for all your help man! I’ve been struggling to submit my app for almost a week now

Also I’m using Blueprints not c++ does that matter at all? Thanks 

pro_zac
Heroic Explorer

You must convert your blueprint only project to C++ to use the .Build.cs method. You can convert by going to File > New C++ Class and adding an empty class. For a walkthrough, check out this video.

 

 

Did you convert yours? I’ve tried converting it during a build in the past and it had errors…I found some other unreal documentation that shows another way to do it. Here https://forums.unrealengine.com/t/remove-permissions-android-manifest/490305 do you think this would work?