Android app Development is complete, sometimes is not the log to save the remote or local, when there is a problem, it is not easy to locate.
Then non-developers can use Android-sdk-windows's adb shell to complete the log view
Output System state information to F:\test\dumpstate.txt, because root permission is required, so no root of the phone output is empty adb shell dumptate >f:\test\dumpstate.txt// Output the state of the past system, log, the general operation of the process when the log is not captured in the event of a problem with this command to view the ADB shell bugreport >f:\test\bugreport.txt//output kernel information adb shell dmesg/ /output Current buffer log and save adb shell Logcat >f:\test\bugreport.txt//output memory information adb shell Dumpsys meminfo//Output Current CPU usage information adb shell Dumpsys cpuinfo//Output Current Activity usage information adb shell Dumpsys activity//equivalent to filtering, only find activity usage information named "MF" adb shell Dumpsys Activity | Find "MF"//Get the key information, the phone does not have key information, you will be prompted each device ID represents the device information, the key process will be in real-time refresh adb shell getevent//get System Properties adb shell getprop// View PM Help information adb shell pm//View the list of installed packages in the phone adb shell pm List packages//View current phone process information adb shell ps//get CPU usage, view only once, do not refresh adb shell top in real time- n 1//get top Ten CPU usage, view only once, do not refresh adb shell top- n 1-m 10//query Each memory consumption situation adb shell procrank//detailed query memory usage of a package adb shell Dumpsys Meminfo PackageName
Android Phone log capture