Table of Contents

Log analysis on android

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

Log acquisition methods

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

During use, you may need to enable developer mode on the Android device, turn on USB debugging or wireless debugging, and connect via 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 previous logs, then run adb logcat > log.txt to output logs to log.txt. Run the program until an error occurs, then use Ctrl + C to stop log output.

The following is an example of a log file.

log Android

Understanding logs

The following tags require special attention during 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 uncaught

  • 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 state.

Notes for feedback

When providing feedback, please provide unfiltered log information by tag, as sometimes underlying system libraries output detailed causes of errors, and these libraries' tags vary across different systems.

Additionally, include the following information when providing feedback.

  • EasyAR Sense and EasyAR Sense Unity Plugin version numbers

    e.g., 4.7.0.11800-cf8e24e30

  • Community edition/Enterprise edition

  • CPU architecture

    aarch64/armeabi-v7a