Common commands of the Android system tool dumpsys, effectively obtain device information and discover application crash problems

Common commands of the Android system tool dumpsys, effectively obtain device information and discover application crash problems

dumpsys

"dumpsys is an executable file in the Android system", which is mainly used to output (dump) some information of the current Android system (such as Activity, package, etc.). It is very effective for analyzing Android device problems, checking running status, usage, etc.

The method of using the dumpsys command is to enter the shell environment of the device through adb shell and execute the dumpsys command. For example, executing adb shell dumpsys -l can view all the services running in the current Android system. In order to view the information of a service more specifically, you can specify the service name, such as adb shell dumpsys activity to view the information related to Activity.

In the Android system, because each service implements the dump method, when the dumpsys command is executed, the system will obtain the corresponding service information through the ServiceManager and execute the dump function of the service to obtain and output relevant information.

Common dumpsys commands

  1. 「dumpsys activity」 //Query AMS service related information, equivalent to ActivityManagerService.dump()
  • dumpsys activity intents: query the system for all pending intent information;
  • dumpsys activity broadcasts: can query all registered broadcast receivers, foreground broadcasts, and background broadcast information;
  • dumpsys activity providers: query system component provider related information;
  • dumpsys activity activities: query the system component activity related information;
  • dumpsys activity services: query system component service related information;
  1. 「dumpsys window」 //Query WMS service related information
  • dumpsys window: can get the application of the current interface, and can see the window and application that have gained focus;
  1. 「dumpsys cpuinfo」 //Query CPU status - dumpsys cpuinfo: Get the current CPU usage, or use the top command;
  2. 「dumpsys meminfo」 //Query memory status
  • dumpsys meminfo + package name: view application memory usage information;
  • dumpsys meminfo --oom: View the application memory level;
  1. 「dumpsys package」 //Query PMS related information
  • dumpsys package + package name: view application related information;
  • dumpsys package + package name | grep version: view the version information of the application;
  • dumpsys package + package name | grep apk: view application installation path information;
  1. 「dumpsys gfxinfo」 //Query image related information
  • dumpsys gfxinfo+ package name: check the frame loss of the application;

<<:  iOS 18 is about to be released, get to know the new features first

>>:  The key to adjusting the Android window soft keyboard: windowSoftInputMode property setting

Recommend

Tik Tok, Kuaishou or Bilibili? How do brands choose short videos?

Recently, Bilibili has become popular because of ...

Growth Hacker: Talking to Former Googlers about App Growth

The concept of growth has a long history in Silic...

The information flow effect is not good enough? Because there are blind spots!

We all know that the ultimate goal of information...

100 marketing campaigns, 20 campaign experiences!

Every year, I participate in the planning and imp...

How does Baidu determine the conversion effect of bidding keywords?

After expanding the keywords, the enterprise SEM ...

100 event planning tools, how many do you know?

When you first start planning, your leader assign...

You may not have heard of "Pistachio", but you have definitely eaten it!

Today’s hot topic comes from this guy in the comm...

PPTV A three-year medical history of an "anemia" patient

There is a company that suffers from anemia. They...

Marketing Promotion: How does fission marketing achieve market “fission”?

Fission marketing is like cell division, from one...