SoFunction
Updated on 2025-03-01

Android iOS commonly used APP crash log acquisition command method

Preface

​ During the daily testing process, the app may crash and crash. At this time, the test students need to quickly capture the crash log to effectively assist in the development and positioning problems and quickly solve the problems.

Share common crash log acquisition methods for Android & iOS dual-end

Android crash log acquisition method

  • Use adb command to get
# grammar:adb shell logcat
# Can filter app package name and log level to quickly locateadb shell logcat -v -v -v time>E:/
  • logcat in Android studio

Connect the device to the computer, view the real-time log in logcat in Android studio, and you need to select the currently connected mobile phone

If you are using a debug package, you can also select the corresponding debug process, that is, the corresponding APP package name

You can search for keywords and quickly locate them directly, such as: begin, crash, Exception, fatal

You can also filter the app package name and log level to quickly locate it

  • adb bugreport command (it will take a long time)
# grammar:adb bugreport <Export path>
# The file will be exported to disk E, and the file is a zip compressed fileadb bugreport E:/
  • Local files for mobile phone

Generally, after the app crashes, a crash log will be written into the local file.

You can ask the log storage path for project development students, then use the adb command or mobile phone sharing function to obtain the log

  • Third-party platform

If the project has access to a third-party platform, such as: bugly, you can search directly on the third-party platform (such as: model, appearance time, etc.)

iOS crash log acquisition method

  • Third-party software (IS Assistant, iTools)

You need to connect to the computer with an iPhone device. The third-party software tool will have a <Crash Analysis>/<View Crash Log> function. You can open it to view the app crash log.

iPhone device storage crash log seems to have an upper limit, and it will not be generated after reaching the upper limit, so it needs to be cleaned regularly

  • Third-party platform

If the project has access to a third-party platform, such as: bugly, you can search directly on the third-party platform (such as: model, appearance time, etc.)

  • iPhone phone comes with features

Operation path: Settings → Privacy → Analysis and Improvement → Analyze Data

Then use the date + app name to get it

The above is the detailed content of the commonly used APP crash log command method for Android iOS. For more information about APP crash log commands, please follow my other related articles!