I'm looking for the full list of ADB shell dumpsys
commands with a full explanation of all of the commands.
Where can I find this information?
I'm looking for the full list of ADB shell dumpsys
commands with a full explanation of all of the commands.
Where can I find this information?
According to official Android information about dumpsys:
The dumpsys tool runs on the device and provides information about the status of system services.
To get a list of available services use
What's dumpsys and what are its benefit
dumpsys is an android tool that runs on the device and dumps interesting information about the status of system services.
Obvious benefits:
What information can we retrieve from dumpsys shell command and how we can use it
If you run dumpsys you would see a ton of system information. But you can use only separate parts of this big dump.
to see all of the "subcommands" of dumpsys do:
dumpsys | grep "DUMP OF SERVICE"
Output:
Some Dumping examples and output
1) Getting all possible battery statistic:
You will get output:
2)Getting wifi informations
Output:
3) Getting CPU info
Output:
4)Getting memory usage informations
Output:
If you want see the info for all processes, use
~$ adb shell dumpsys meminfo
dumpsys is ultimately flexible and useful tool!
If you want to use this tool do not forget to add permission into your android manifest automatically
android.permission.DUMP
Try to test all commands to learn more about dumpsys. Happy dumping!
i use dumpsys to catch if app is crashed and process is still active. situation i used it is to find about remote machine app is crashed or not.
or
or anything that helps...etc
if app is not running you will get nothing as result. When app is stoped messsage is shown on screen by android, process is still active and if you check via "ps" command or anything else, you will see process state is not showing any error or crash meaning. But when you click button to close message, app process will cleaned from process list. so catching crash state without any code in application is hard to find. but dumpsys helps you.
Looking at the source code for dumpsys and service, you can get the list of services available by executing this:
You can then supply the service name you are interested in to dumpsys to get the specific information. For example (note that not all services provide dump info):
As you can see in the code (and in K_Anas's answer), if you call dumpsys without any service name, it will dump the info on all services in one big dump:
Some services can receive additional arguments on what to show which normally is explained if you supplied a
-h
argument, for example: