This article will cover steps to find top processes by memory/cpu on Android using Adb. We will use pixel-2 for this article. But any other android phone can also be used.
- Install adb tools and enable developer mode on android phone.
- Connect android phone with Laptop using USP port
- Run the following command to see top processes sorted by memory
adb shell top -s 6
- Here is how it will appear
- Run the following command to see top processes sorted by cpu
adb shell top -s
9
The same command can also be used to sort the outcome on other fields. One of the use case is to check the memory taken by a specific process/app and observe the change on various action to detect memory leaks.