google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 401 forks source link

Session.CheckApkAvailability() wrongly returns ApkAvailabilityStatus.SupportedNotInstalled for Huawei Honor P8 Lite #428

Open AllBecomesGood opened 5 years ago

AllBecomesGood commented 5 years ago

I basically have a simple Unity scene (no ARCore prefab in it) with a button that queries Session.CheckApkAvailability() and then it returns that it's supported, but not installed. Upon running Session.RequestApkInstallation(false); it opens Google Store "ARCore by Google" and there it says that the device is not compatible.

Expected result is: ApkAvailabilityStatus.UnsupportedDeviceNotCapable Observed result is: ApkAvailabilityStatus.SupportedNotInstalled

I query as shown here: https://answers.unity.com/questions/1481890/how-to-use-arcore-sessioncheckapkavailability.html

Huawei Honor 8 Lite Model number PRA-LX1 EMUI 5.0.3 Android Version 7.0

ARCore 1.5.0 and 1.4.1, Unity 2018.2.13f1

There is a Android 8.0 update available for this phone, which I DO NOT INSTALL. Because I need to test on a phone which does not support ARCore ^^. Not sure if this messes with it, but I actually don't know if the 8.0 update is even meant to get ARCore working for this phone anyway.

Any more info needed let me know how to get it and i will post it

Edit: On a OnePlus6 phone it works as expected when we either have ARCore installed or not.

Edit: One question: How does Session.CheckApkAvailability() work under the hood? Is it just retrieving a variable that's basically input into the phone at when you manufacture/first time install software onto it? So does the manufacturer basically have to configure it? Or is it doing some magic like checking for what sensors and stuff are there? I assume it cannot be a simple API level check xD Just curious! :)

pablisho commented 5 years ago

Hi thanks for the report. I added it to our internal tracker.

fredsa commented 5 years ago

Have you manually installed ARCore APK on the device? Please check: $ adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:

If you did side-load ARCore, you can uninstall it with: adb uninstall com.google.ar.core

AllBecomesGood commented 5 years ago

@fredsa I did not manually install ARCore, neither via GoogleStore (where it says it's incompatible anyway), nor sideload.

On ARCore 1.6 this bug still exists.

Edit: On a sidenote, I upgraded to Android 8.0 (or whatever variation Huawei offers), which doesn't change the outcome.

stackOverflower92 commented 5 years ago

@pablisho same issue here. I tried with a Xiaomi Mi A1 with Android 9 Pie and also a Moto Z2 Play (both of them do not support AR Core) and the result was ApkAvailabilityStatus.SupportedNotInstalled.

Is there any insight on when will this be resolved or an alternetive method to correctly check it?

Thanks.

fredsa commented 5 years ago

In case anyone still is experiencing an issue here:

  1. Please check that your device is in fact listed as an ARCore Supported Devices
  2. Make sure that your device is running the minimum required version of Android
  3. Your device has a working internet connection

If Session.CheckApkAvailability() still returns ApkAvailabilityStatus.SupportedNotInstalled, please create a new issue, and include the requested information, including device fingerprint (adb shell getprop ro.build.fingerprint).

fredsa commented 5 years ago

Note, the original issue mentioned above was for the "Huawei Honor 8 Lite", which is not listed on the support devices page.

When filing a new bug, please include the output of adb shell getprop ro.build.fingerprint

hosamre94 commented 5 years ago

Same issue here, I've tested it on "Galaxy J7 Prime SM-G610-F" running on Android 8.1 "Huawei nova plus" running Android 7.0 both devices are not listed on the support devices page but when I try Session.CheckApkAvailability() it returns "ApkAvailabilityStatus.SupportedNotInstalled" instead of "ApkAvailabilityStatus.UnsupportedDeviceNotCapable"

also after that, I've installed arcore apk manually and i get ApkAvailabilityStatus.SupportedAndInstalled

I'm using unity 2017.4 and arcore-unity-sdk-1.6.0

AllBecomesGood commented 5 years ago

Note, the original issue mentioned above was for the "Huawei Honor 8 Lite", which is not listed on the support devices page.

When filing a new bug, please include the output of adb shell getprop ro.build.fingerprint

Hm yea that is the point, the phone is not supporting AR, but ARCore thinks that it does.

fredsa commented 5 years ago

Sorry about that. Reopening.

fredsa commented 5 years ago

@AllBecomesGood on the "Huawei Honor 8 Lite" device can you please provide the output of: $ adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:

and: adb shell getprop ro.build.fingerprint

fredsa commented 5 years ago

@hosamre94 Can you also please provide the output adb shell getprop ro.build.fingerprint on both the "Galaxy J7 Prime SM-G610-F" and the "Huawei nova plus"?

fredsa commented 5 years ago

Sorry @hosamre94, I meant to ask for the output of adb shell getprop ro.build.fingerprint.

(I fixed my comments above so they have the correct command.

hosamre94 commented 5 years ago

@fredsa this is the result i got after executingadb shell getprop ro.build.fingerprint on J7-Prime: samsung/on7xeltedd/on7xelte:8.1.0/M1AJQ/G610FDDU1CRJ4:user/release-keys on Nova Plus HUAWEI/MLA-L11/HWMLA:7.0/HUAWEIMLA-L11/C185B345:user/release-keys

AllBecomesGood commented 5 years ago

@fredsa I couldn't use the Unix command, so I ran: adb shell pm list packages -3 and adb shell pm list packages -s and in either I didn't find an ar.core package anywhere.

adb shell getprop ro.build.fingerprint gives output: HUAWEI/PRA-LX1/HWPRA-H:8.0.0/HUAWEIPRA-LX1/402(C432):user/release-keys

I hope that gives you the info you need.

fredsa commented 5 years ago

Thanks, @hosamre94 / @AllBecomesGood .

Can you also please share a screenshot of the Play Store open on the ARCore app. You can get there with:

adb shell am start -a android.intent.action.VIEW -d 'market://details?id=com.google.ar.core'

AllBecomesGood commented 5 years ago

@fredsa HuaweiHonor8Lite

fredsa commented 5 years ago

Thanks, @AllBecomesGood.

  1. Is your app "AR Required" or "AR Optional"? https://developers.google.com/ar/develop/unity/enable-arcore

  2. What is the output of adb shell pm path com.google.ar.core (no output is expected on unsupported devices)

  3. Please shared the output of adb logcat:

    • Swipe away / kill the app activity
    • Clear the log: adb logcat -c
    • Launch the app and wait for the CheckApkAvailability() status to return
    • Attach the complete adb logcat output to this issue
AllBecomesGood commented 5 years ago

1 - optional 2 - none 3: (I hope this is enough, for some reason it took very long to run, as in 10 minutes and then i aborted it, so lemme know if this is rubbish) huaweihonor8litelogcat.txt

fredsa commented 5 years ago

Thanks. Forgot to mention that adb logcat will run indefinitely until killed.

minoken commented 5 years ago

It is now possible to get the correct value (UnsupportedDeviceNotCapable) by changing ARCore to not required in Unity settings. 1) Edit-> Project Settings-> ARCore 2) Uncheck "AR Core Required"