Table of Contents

Log analysis on Android

For logs on native (Android) and Unity (Android), please refer to the following instructions.

How to obtain logs

Logs can be obtained through Android Studio or adb logcat. It is recommended to use adb logcat to obtain complete logs.

When using it, you may need to enable the developer mode on the Android device, enable USB debugging or wireless debugging, connect the USB cable or pair and connect via WLAN. Please refer to Android Debug Bridge (Chinese English).

The following is an example of pairing and connecting via WLAN and using adb logcat.

log Android logcat

After connecting adb, first use adb logcat -c to clear the previous logs, then run adb logcat > log.txt to output the logs to log.txt. At this time, run the program until an error occurs, and then use Ctrl + C to end the log output.

The following is an example of a log file.

log Android

Understanding the logs

The following tags are particularly important for debugging.

  • EasyAR

    Logs output by EasyAR

  • Unity

    Logs output by the Unity engine at the C# layer

  • UnityPlayer

    Logs output by the Unity engine at the Java/JNI layer

  • libunity

    Logs output by the Unity engine at the C++ or IL2CPP layer

  • AndroidRuntime

    Logs output by the Android system when Java exceptions are not caught

  • ActivityManager

    Logs output by the Android system in cases such as ANR

When analyzing errors, it is often necessary to clarify the conditions under which the error occurred, such as the called function, parameters, and related states.

Notes when providing feedback

When providing feedback, please provide unfiltered tag log information, because sometimes the underlying system library will issue detailed error reasons, and the tags of these libraries are different on different systems.

In addition, the following information needs to be included when providing feedback.

  • Version numbers of EasyAR Sense and EasyAR Sense Unity Plugin

    Such as 4.7.0.11800-cf8e24e30

  • Community edition/Enterprise edition

  • CPU architecture

    aarch64/armeabi-v7a