As we all know, on the Android system, sometimes we encounter so file crash can only play log, but many times do not understand crash where, fortunately, after crash, generally can produce a. dmp file.
We can get a more detailed STATCK trace based on this file.
The main use is some of the methods provided by Google, the command is too complex, very error-prone, so I wrote a Python script, simplifying the steps.
For details, refer to Https://code.google.com/p/google-breakpad/wiki/LinuxStarterGuide
#! /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 ("./d Ump_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")