Android dump. so file crash log

Source: Internet
Author: User

As we all know, in the android system, sometimes we encounter so File crash that can only be used for logging, but often we don't know where the crash is. Fortunately, after the crash, we generally generate one. dmp file.

We can obtain more detailed statck trace based on this file.

Some methods provided by google are mainly used. commands are too complex and prone to errors. Therefore, I wrote a python script to simplify the process.

 

 

#! /Usr/bin/env pythonimport osimport sysif len (sys. argv) <3: print (please check your parameter) exit (-1) soFile = sys. argv [1] dmpFile = sys. argv [2] print soFile, print dmpFilesymFile = soFile +. sym # dumple sym fileos. system (. /dump_syms + soFile +> + symFile) # get directory informationret = OS. popen (head-n1 + symFile ). read () arry = ret. strip (). split () dirName = arry [3] symPath =. /symbols/+ soFile +/+ dirName # create directoryos. system (mkdir-p + symPath) OS. system (mv + symFile ++ symPath) # minidump to log fileos. system (. /minidump_stackwalk + dmpFile +. /symbols> crashlog)


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.