+2 votes
by (350 points)
edited by

Hello world!

Trying to build and run on Pico 3 using Unity editor. Build is successful without errors but it's not showing up on the device (/Unknown). Adb install shows 'success'. A folder for the app is not added on the device.

What reasons could restrict the app from installing on the device?

In another test project the build works fine and installs + runs as expected, showing up in '/Unknown'. Development mode on the device is active. Entitlement check is skipped. Restart didn't work. Unity Build/BuildandRun leads to the same result as PVR_UnitySDK/BuildAndRun.
Any ideas?

Thank you for your help.

Solved Edit:
Commenting out the PatchAndroidManifest(path) logic in OVRGradleGeneration.cs, as @PicoDevSupport suggested, seemed to the trick. It seems the Oculus SDK does interfer with any Mobile Build, despite disabling the Oculus integration system from the PlayerSettings and not having any Oculus scripts in the scene.

As more of the OVRGradleGeneration class logic seems to alter any builds for Android, we decided to comment out all of the content of the class.

We also deleted our current custom Manifest file in Plugins/Android/AndroidManifest, then disabled and enabled the 'Use custom manifest' toggle in the Playersettings.

Now a new build from the project is listed in /Unknown on the device.

4 Answers

+1 vote
by (55.5k points)
selected by
 
Best answer

Hi,

To display the app icon in application list of Pico launcher, it requires that there must be a category "" in your Manifest.xml. Actually, Pico's default Manifest contains this category by default, if you deleted it manually, please please restore it. The category as below:
enter image description here

Besides, Oculus plugin will also tamper the Manifest.xml, if your have imported Oculus SDK to your project, this might be the main cause. The solution is to comment out the line that operates PatchAndroidManifest() in OVRGradleGeneration.cs. In my project it's located in line 198:

else
        {
            UnityEngine.Debug.LogWarning("Unable to locate build.gradle");
        }

        PatchAndroidManifest(path);        //<------ Comment this out
    }

    public void PatchAndroidManifest(string path)
    {

Best Regards,

0 votes
by (55.5k points)

It means apk has been installed on the device when ADB install shows 'success'.Please check it again.

What does 'Restart didn't work' mean? Cloud you tell me more details?

by (350 points)

Thank you for your reply!

Despite the 'success' on adb, it's still not listed under /Unknown on the Pico device. And no related folder on the device was created either. How could this be?
What requirements are there for an app to show up in /Unknown on the Pico device?
We altered the Android Manifest the way as described in the documentation.

With 'Restart didn't work' a (successful) restart of the PC and the Pico device was meant, that didn't change anything to the described matter.

by (350 points)

As no solution was found yet, these are the logs from ADB when installing the app on the device:

09-10 09:47:56.440 1880 1880 D Avrcpext: Exit handlePackageModified
09-10 09:47:56.440 1880 1880 D BluetoothMapAppObserver: onReceive
09-10 09:47:56.440 1880 1880 D BluetoothMapAppObserver: The installed package is: com.DefaultCompany.PicoHMDtest
09-10 09:47:56.440 1189 1514 D CompatibilityInfo: mCompatibilityFlags - 4
09-10 09:47:56.440 1189 1514 D CompatibilityInfo: applicationDensity - 560
09-10 09:47:56.440 1189 1514 D CompatibilityInfo: applicationScale - 1.0
09-10 09:47:56.440 1880 1880 D BluetoothMapAppObserver: Found 0 application(s) with intent android.bluetooth.action.BLUETOOTH
MAPPROVIDER
09-10 09:47:56.441 2092 2092 E PhoneInterfaceManager: [PhoneIntfMgr] getCarrierPackageNamesForIntent: No UICC
09-10 09:47:56.441 2092 2092 D CarrierSvcBindHelper: No carrier app for: 1
09-10 09:47:56.441 2656 3386 I PackageRecordManager: getAppInfo: packageName = com.DefaultCompany.PicoHMDtest
09-10 09:47:56.441 570 570 I hwservicemanager: getTransport: Cannot find entry vendor.qti.hardware.servicetracker@1.0::IServicetracker/default in either framework or device manifest.
09-10 09:47:56.442 2092 2092 D ImsResolver: maybeAddedImsService, packageName: com.DefaultCompany.PicoHMDtest
09-10 09:47:56.443 2092 2092 D CarrierConfigLoader: mHandler: 9 phoneId: 0
09-10 09:47:56.443 1189 1503 D CompatibilityInfo: mCompatibilityFlags - 4
09-10 09:47:56.443 1189 1503 D CompatibilityInfo: applicationDensity - 560
09-10 09:47:56.443 1189 1503 D CompatibilityInfo: applicationScale - 1.0
09-10 09:47:56.443 1880 1880 D BluetoothMapAppObserver: Found 0 application(s) with intent android.bluetooth.action.BLUETOOTH
MAPIMPROVIDER
09-10 09:47:56.443 2656 3386 I c : recordAppInfo# AppInfo{name='PicoTest2', packageName='com.DefaultCompany.PicoHMDtest', versionCode='1', versionName='0.1', sn='PA7H10MGF5250560W', size='244 MB'},install
09-10 09:47:56.444 570 570 I hwservicemanager: getTransport: Cannot find entry vendor.qti.hardware.servicetracker@1.0::IServicetracker/default in either framework or device manifest.
09-10 09:47:56.445 1189 1513 W VoiceInteractionManagerService: no available voice recognition services found for user 0
09-10 09:47:56.455 13223 17279 W ExclusiveDefaultHolderMixin: Cannot get ApplicationInfo for default holder, config: configdefaultSms, package: com.android.messaging
09-10 09:47:56.457 13223 17279 W ExclusiveDefaultHolderMixin: Cannot get ApplicationInfo for default holder, config: config
defaultDialer, package: org.codeaurora.dialer
09-10 09:47:56.466 866 1030 E ANDR-PERF-LM: MetaMeter: handleAsync() 164: AdaptLaunch Invalid Async
09-10 09:47:56.669 1189 1513 I RoleUserState: Wrote roles.xml successfully
09-10 09:47:56.716 909 909 I pxrstreamingser: type=1400 audit(0.0:9730): avc: denied { search } for name="androidusb" dev="sysfs" ino=61879 scontext=u:r:pxrstreamingservice:s0 tcontext=u:objectr:sysfsandroidusb:s0 tclass=dir permissive=1
09-10 09:47:56.716 909 909 I pxrstreamingser: type=1400 audit(0.0:9731): avc: denied { read } for name="state" dev="sysfs" ino=83695 scontext=u:r:pxrstreamingservice:s0 tcontext=u:objectr:sysfsandroidusb:s0 tclass=file permissive=1
09-10 09:47:56.716 909 909 I pxrstreamingser: type=1400 audit(0.0:9732): avc: denied { open } for path="/sys/devices/virtual/android
usb/android1/state" dev="sysfs" ino=83695 scontext=u:r:pxrstreamingservice:s0 tcontext=u:objectr:sysfsandroidusb:s0 tclass=file permissive=1
09-10 09:47:56.716 909 909 I pxrstreamingser: type=1400 audit(0.0:9733): avc: denied { getattr } for path="/sys/devices/virtual/android
usb/android1/state" dev="sysfs" ino=83695 scontext=u:r:pxrstreamingservice:s0 tcontext=u:objectr:sysfsandroidusb:s0 tclass=file permissive=1
09-10 09:47:56.716 909 909 I pxrstreamingser: type=1400 audit(0.0:9734): avc: denied { read } for name="plugin
status" dev="sysfs" ino=62721 scontext=u:r:pxrstreamingservice:s0 tcontext=u:objectr:sysfs:s0 tclass=file permissive=1
09-10 09:47:56.786 2776 2943 W GyroscopePowerPolicyController: sleepclient is 5wakeclient is 0screenStatus is 1powerMessageSendStatus is 1
09-10 09:47:56.798 896 3326 D PxrHmdService: Debug - brightness=[1].
09-10 09:47:57.251 606 742 W ServiceManagement: Waited one second for vendor.qti.hardware.radio.uim
remoteclient@1.0::IUimRemoteServiceClient/uimRemoteClient0
09-10 09:47:57.252 606 742 I ServiceManagement: getService: Trying again for vendor.qti.hardware.radio.uim
remote_client@1.0::IUimRemoteServiceClient/uimRemoteClient0...

0 votes
by (160 points)

We have the very same problem. As soon as we add an AndroidManifest.xml to the project, the game is not visible on the Neo after installation, although adb reports "success". Without an AndroidManifest.xml, the game shows up under "Unknown".

After investigating, I found out that the main activity gets removed from AndroidManifest.xml as soon as you add your own AndroidManifest.xml to the project. You have to manually add it to your AndroidManifest.xml, then the app shows up on the device again.

This is our working AndroidManifest.xml (note the activity block):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.your.package">
  <application>
    <activity android:screenOrientation="landscape" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="density|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|uiMode" android:launchMode="singleTask" android:resizeableActivity="false" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true">
      <intent-filter>
        <action
            android:name="android.intent.action.MAIN" />
        <category
            android:name="android.intent.category.LAUNCHER" />
      </intent-filter>

      <meta-data
          android:name="unityplayer.UnityActivity"
          android:value="true" />
    </activity>

    <!-- China -->
    <!--APP ID-->
    <meta-data
        android:name="pico_app_id"
        android:value="xxx"/>
    <!--APP key-->
    <meta-data
        android:name="pico_app_key"
        android:value="xxx"/>
    <!--Scope-->
    <meta-data
        android:name="pico_scope"
        android:value="get_user_info"/>
    <!--This is fixed-->
    <!--Merchant ID-->
    <meta-data
        android:name="pico_merchant_id"
        android:value="xxx"/>
    <!--Pay Key-->
    <meta-data
        android:name="pico_pay_key"
        android:value="xxx"/>
    <!-- Release area -->
    <meta-data
        android:name="pico_app_id_foreign"
        android:value="xxx"/>
    <meta-data
        android:name="pico_app_key_foreign"
        android:value="xxx"/>
    <meta-data
        android:name="pico_scope_foreign"
        android:value="get_user_info"/>
    <!--This is fixed-->
    <meta-data
        android:name="pico_merchant_id_foreign"
        android:value="xxx"/>
    <meta-data
        android:name="pico_pay_key_foreign"
        android:value="xxx"/>
  </application>
</manifest>
by (350 points)

Good point @FiveMindCreations! I also expected the Android Manifest as the problem. However, the main activity is already included in our custom manifest file. Did you change it before or after the build?

0 votes
by (180 points)

There is another work round to solve your probleam,you could use adb shell command to launch the application after installing completed,such as adb shell am start -n com.DefaultCompany.MyFirstGame/com.unity3d.player.UnityPlayerActivity,just replace the packagename and activity name,which could be found in the activity list of the AndroidManifest.xml(defined as )

by (180 points)

activity with attribute. android:name="android.intent.category.LAUNCHER

...