An open API service indexing awesome lists of open source software.

https://github.com/lana-20/dumpsys


https://github.com/lana-20/dumpsys

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

          

# dumpsys

There is a handy command-line tool called dumpsys. It allows us to dump the state of system services.

The very interesting thing we can do is dump activities from Activity Manager and look for the running ones.
This is the thing that is missing from the IDE we use, because what we can use in Android Studio is the Layout Inspector, so we can dump a state of a single activity and look at individual views inside of it.
But if we have multiple activities - for example, if we are getting introduced to a new code base and we get into some activity - there are certain methods to know what activity we are in, but this is one of the handiest ones.

We have a currently running activity on top here.
If out app has multiple activities that are somewhere in the stack, this is the way to find out where we are.

We can also dump the status of jobscheduler and may therefore find out, for example, that Calendar uses two jobs.
One of the jobs periodically queries the content provider and the other one queries the notifications provider.

If we are debugging an app which uses some jobs, we can force our jobs to be executed using the -f flag,