Open rafaelvcaetano opened 7 years ago
From the log it looks like the sample app cannot load the Tango shared library. Did you install the ARCore Service? See the "Preparing your Device" section of Google's instructions https://developers.google.com/ar/develop/java/getting-started
Yes. Also, I forgot to mention I'm running Lineage OS with Android 7.1.2
Found more information in the logcat that might prove useful:
I ActivityManager: Displayed com.tomthecarrot.helloar/com.unity3d.player.UnityPlayerActivity: +288ms
I TangoClientLibLoader: Pure Java path, not loading libtango_client_api.so at all.
D ApplicationLoaders: ignored Vulkan layer search path /data/app/com.google.tango-1/lib/arm:/system/fake-libs:/data/app/com.google.tango-1/base.apk!/lib/armeabi-v7a for namespace 0x82f21090```
Thanks for that info. not loading libtango_client_api.so at all
is an interesting error. I don't remember seeing that in any other logs.
Also interesting that it's ignoring the Vulkan layer search path; I believe that the referenced path is the correct one for ARCore.
Did that log appear before the first log you posted?
It happened before. Here is a full logcat since launch untill crash: https://pastebin.com/3eD1pu9d
Thanks for posting that. The following line indicates that the native library cannot find a suitable camera.
ndk_camera: Zero cameras detected. Camera system initialization complete
Can you ensure the camera permission (in Android App Settings) is enabled for both TangoCore and the sample app?
Permissions were disabled for both apps (nice catch!) but the same error is still happening.
Could be Vulkan-specific. See #5
Added the known devices to a research document to try to isolate the issue. OnePlus X is the only device on the list with an Adreno 330, so it's possible that the architecture is currently unsupported. Let's try to fix that :)
I went a bit deeper into the problem and decompiled the arcore-preview.apk
. Inside I found some methods that check if the current device is one of the supported. You can find this method:
private static boolean deviceCalibrationAvailable()
{
return (Build.FINGERPRINT.contains("sailfish:7")) || (Build.FINGERPRINT.contains("sailfish:O")) || (Build.FINGERPRINT.contains("sailfish:8")) || (Build.FINGERPRINT.contains("marlin:7")) || (Build.FINGERPRINT.contains("marlin:O")) || (Build.FINGERPRINT.contains("marlin:8")) || (Build.FINGERPRINT.contains("walleye:O")) || (Build.FINGERPRINT.contains("walleye:8")) || (Build.FINGERPRINT.contains("taimen:O")) || (Build.FINGERPRINT.contains("taimen:8")) || (Build.FINGERPRINT.contains("SC-02J/SC-02J:7")) || (Build.FINGERPRINT.contains("SCV36_jp_kdi/SCV36:7")) || (Build.FINGERPRINT.contains("dreamqlteue/dreamqlteue:7")) || (Build.FINGERPRINT.contains("dreamqltesq/dreamqltesq:7")) || (Build.FINGERPRINT.contains("dreamqlteldusq/dreamqltesq:7")) || (Build.FINGERPRINT.contains("dreamqltezm/dreamqltecmcc:7")) || (Build.FINGERPRINT.contains("dreamqltevl/dreamqltecan:7")) || (isSupportedExynosDevice());
}
These translate to the following:
These methods are inside the class com.google.atap.tangoservice.SupportedDevices
and is accessed by com.google.tango.jni.TangoCameraNative
on its initialize()
method. So, I would say that this is a pretty decent place to start looking. Unfortunately I'm not experienced with recompiling jars and APKs. @tomthecarrot do you think you can take a look at it?
Thanks for your research! I'll look into it now. Your information is useful for this idea.
I built an early version of a modified ARCore Service, which seems to be functional without per-app modifications, all on my "unsupported" device.
Please try it on your device and let me know if it works. You'll need to uninstall the existing "Tango Core" first. Thanks!
Thanks for your effort! Unfortunately the same error is still occurring.
I have the same couldn't find "libtango_hal.so"
error on the bq Aquaris X5 Plus. I suspect the error in this case is an unsupported CPU, because the arcore-preview(-modified).apk
only contains arm64 precompiled libraries and my phone has an armv7l CPU.
09-09 14:03:38.820 2790 4426 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.ar.core.examples.java.helloar/.HelloArActivity (has extras)} from uid 10113 on display 0
09-09 14:03:38.826 2790 4426 D ActivityTrigger: ActivityTrigger activityPauseTrigger
09-09 14:03:38.857 4346 4349 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
09-09 14:03:38.890 27157 27157 E SupportedDevices: Device calibration unavailable. Just kidding! ;)
09-09 14:03:38.893 27157 27157 I tango_camera_native_jni: Attaching texture_window 0x90daa008
09-09 14:03:38.893 27157 27157 D TangoVhs: about to bind as vhs
09-09 14:03:38.898 21151 21151 I ServiceManager: Waiting for service AtCmdFwd...
09-09 14:03:38.910 2790 2800 I ActivityManager: Start proc 27917:com.google.tango/u0a160 for service com.google.tango/com.google.atap.tango.TangoVirtualHalService
09-09 14:03:38.910 27157 27157 D TangoVhs: finished bind as vhs
09-09 14:03:38.974 27917 27917 D AndroidRuntime: Shutting down VM
09-09 14:03:38.975 27917 27917 E AndroidRuntime: FATAL EXCEPTION: main
09-09 14:03:38.975 27917 27917 E AndroidRuntime: Process: com.google.tango, PID: 27917
09-09 14:03:38.975 27917 27917 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.google.tango-1/base.apk"],nativeLibraryDirectories=[/data/app/com.google.tango-1/lib/arm, /system/fake-libs, /data/app/com.google.tango-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libtango_hal.so"
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:984)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1530)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at com.google.atap.tango.TangoVirtualHalService.<clinit>(TangoVirtualHalService.java:41)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3173)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.app.ActivityThread.-wrap5(ActivityThread.java)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
09-09 14:03:38.975 27917 27917 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Sample app fails to initialize with the following stack trace: