Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Quest V2 Signing

Discussion in 'AR/VR (XR) Discussion' started by jj-unity, Sep 3, 2019.

  1. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    58
    Built-in support for V2 signing for Oculus Quest apps has been making it into new Unity releases for 2019.2, 2019.3, and soon, 2018.4. It shows up as a checkbox in the Player Settings in the Oculus area.

    We discovered one issue with this in that the change also requires the 1.38.2 version of the ‘Oculus Android’ package. Newly created projects that add Oculus support will automatically get this version of the Oculus Android package. However, existing projects that already had Oculus support set up will not automatically grab the latest version of the package.

    If you have an existing project and want to use the Quest support, please go to Package Manager (Windows/Package Manager), scroll down to ‘Oculus Android’ and make sure that you’re using the 1.38.2 version of the package. Until you do this, built .apks may be missing some tracking functionality when run on Quest hardware.

    We’ll look into making sure that future builds of Unity grab the correct version of the package for this change, but until then, doing a quick upgrade in Package Manager should work fine.
     
    snobalpaul, hippocoder and mattbenic like this.
  2. rampudia

    rampudia

    Joined:
    Dec 23, 2013
    Posts:
    1
    Hello
    Thank you very much for your input. In this regard, I'd like to ask you. I'm trying to upload an app to the Oculus Store and I'm not accepted by the v2-schema signed app. It's for Quest and I think that's how the scheme has to be. Do you have any idea what might be going on?
     
  3. Deleted User

    Deleted User

    Guest

    @jj-unity Is it possible to toggle the check box through code? We're building the same app for Go and Quest and I would like to do this in my scripted build pipeline
     
    ThibaultFran likes this.
  4. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    58
  5. KovaPx

    KovaPx

    Joined:
    Jan 27, 2018
    Posts:
    18
    I'm on 2019.2.11f1 and If I enable v2 signing, the apk built is missing glEsVersion in the manifest and apk is rejected by oculus build manager.

    <uses-feature android:name="glEsVersion" android:glEsVersion="0x00030001" android:required="true" />

    I added the line in Plugins/Android/AndroidManifest.xml I can clearly see the line if I add a breakpoint on IPostGenerateGradleAndroidProject, but after it's just stripped in some final merge.

    If I disable v2 signing it works and the line is present again.
     
    solarisn likes this.
  6. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    58
    That's an interesting one. Thanks. I'll look into it.
     
  7. KovaPx

    KovaPx

    Joined:
    Jan 27, 2018
    Posts:
    18
    hey @jj-unity any luck on the gles missing from manifest issue yet?
     
  8. mayorc1978

    mayorc1978

    Joined:
    Dec 30, 2013
    Posts:
    36
    Is Quest v2 signing required for test build on Oculus? Or just for Oculus Store upload?
    Should I disable for testing my apps on Quest?
     
    Almut and bigSky like this.
  9. AdamSt

    AdamSt

    Joined:
    Jun 2, 2013
    Posts:
    17
    Okay I have problem sending APK to oculus store for tests. App is created for Quest, but on store we do not have this permission, so it is considered "mobile". Okay, nothing unnormous here till now. And that's when the fun part starts:
    Trying to send APK through store to ALPHA channel -> apk is more than 200 MB so I have to use command tool "ovr-platform-util".
    So I'm using - and this tool, after upload states:

    "ERROR: The APK is intended only for the 6DoF device and cannot be used on the 3DoF mobile platform. You can set the android parameter: required = "false" in the android.hardware.vr.headtracking property if the APK should be shared by GearVR / Go and Oculus Quest. APKs for 3DoF platforms should have a V1 signature."

    I used custom manifest and followed all instructions, so changed those lines:
    https://developer.oculus.com/distribute/publish-mobile-manifest/?device=QUEST
    Getting now this error:

    "ERROR: The APK file is signed using the unsupported Signature Scheme V2 standard. Disable signing using the Scheme V2 standard and resubmit (https://developer.android.com/about/versions/nougat/android-7.0.html#apk_signature_v2)."

    The time this error appered I was using old XR plugin. I disabled there V2 Signing. Deleted APK and build new one (with bumped build number) - still same error.
    Changed min. platform for 21 - still error,
    Used custom gradle with "v2SigningEnabled false" - still this error,
    Upgraded XR plugin to new XR, clicking "yes" for every question of removing old XR plugin files etc. - still this error,
    Also disabled V2 Signing in new plugin - still same error.

    Did I forgot to check some small hidden checkbox somewhere, because it obviously cannot be that simple like disabling V2 Signing in options of course :) ?

    Do you have any idea what is wrong here?
     
    Last edited: Jun 5, 2020
  10. Kibby10

    Kibby10

    Joined:
    Sep 26, 2018
    Posts:
    6
    Did you ever figure out what was causing the error?
     
  11. BleuCobalt

    BleuCobalt

    Joined:
    May 7, 2018
    Posts:
    3
    Tested with Unity 2019.4.3 :

    In Project Settings / Publishing Settings, in section Build :
    Check Custom Launcher Gradle Template
    A file is created : Assets/plugins/Android/launcherTemplate.Gradle

    Open this file with any text editor

    Between nodes lintOptions {...} and buildTypes {...} insert :

    Code (csharp):
    1. signingConfigs {
    2.        release {
    3.            v1SigningEnabled true
    4.            v2SigningEnabled false
    5.        }
    6.     }
    Compile

    Sideload the apk and check it runs on Quest and Go (it was ok for me)

    This apk was then sucessfully uploaded to the Oculus Store (ie the message "ERROR: The APK file is signed using the unsupported Signature Scheme V2 standard. etc" is not displayed anymore)

    This solution was inspired from :
    https://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle
     
    solarisn and noemis like this.
  12. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    63
    Huge Thank you @BleuCobalt ! You saved my day and a lot of time.

    My situation was, that I had to upgrade a long term VR project from Unity 2018 to 2019.4.11 -> and with it to URP and Shader and Input System... this already was a task but at least everything is running fine again and successful tested on the oculus go. But the last day when I upload to the oculus store (preview channel) I got these signing errors and this drove my crazy. Until I today came back with a cooled mind and saw you entry and voila: upload successful.

    I can say: Tested with Unity 2019.4.11 and the APK was successful signed with V1 for the oculus go.

    Thank you for sharing your solution!

    P.S.: under XR -> Oculus Settings there's a checkbox: V2 Signing, but this seem to do nothing in this case. Unity seems to overwrite always with V2 unless you use a "Custom Launcher Gradle Template"
     
  13. 3DNewsman

    3DNewsman

    Joined:
    Nov 3, 2012
    Posts:
    10
    When uploading to the Oculus platform, I get the error
    ERROR: Please sign your APK and then resubmit.

    Apksigner verify yields:
    Verifies
    Verified using v1 scheme (JAR signing): false
    Verified using v2 scheme (APK Signature Scheme v2): true
    Number of signers: 1

    Anyone have a sense of where the correct Quest signing settings are in Unity 2020? It worked fine in our 2019 LTS builds. (The above solution by BlueCobalt didn't work for us for Quest.)

    @jj-unity — any guesses on what might have changed, or how to ensure we're signing these Quest 1+2 builds the right way? Many thanks.
     
    Last edited: Dec 29, 2020
  14. 3DNewsman

    3DNewsman

    Joined:
    Nov 3, 2012
    Posts:
    10
    [SOLUTION]: For anyone that got caught in the same issue we did, you need to make sure for Quest/Quest 2 that "minimum API level" = 23 (not higher!) or the builds will not be signed with v1 (only v2), and will be rejected by the Oculus Store uploader.

    This was extra confusing because we have had builds with minimum API of 25 on the store platform for almost a year with no problem. This seems to be a recent change in the required specs? Either way, it works now.

    Specs: Unity 2020.2
    Oculus Integration 23.1
     
  15. Riacosta

    Riacosta

    Joined:
    Nov 24, 2012
    Posts:
    3
    I love you. I've been trying to figure out what was going on all day. Thank you kind internet stranger!
     
  16. solarisn

    solarisn

    Joined:
    Apr 6, 2016
    Posts:
    13
    I'm having this same problem. GLES 3 gets stripped out of the AndroidManifest during build regardless of Unity's only target graphics API being GLES 3 AND manually including the "uses-feature" in the AndroidManifest. Did you ever figure this one out?

    EDIT: SOLVED
    Check the changelog of the Oculus VR package. Update to the latest version.
    https://docs.unity3d.com/Packages/com.unity.xr.oculus.android@2.38/changelog/CHANGELOG.html
    * Fixed an issue with manifest generation when combined with the 1.44 Oculus Integration assets.
    * Fixed an issue introduced in 2.38.4 where some entries in a custom AndroidManifest.xml were getting removed when V2 signing was enabled.
     
    Last edited: Mar 18, 2021
    JoeStrout likes this.
unityunity