Android Miscellanous Commands

List Threads Based On Their Priorities

$ adb shell ps -T -l `adb shell pidof $PROCESS_NAME` |  sort -r -k 8 -n

Pull Out The Latest Trace

$ adb pull /data/local/traces/`adb ls /data/local/traces | tail -n 1 | awk '{ print $4 }'`

Buid, Flush. Sync

Build:

$ source build/envsetup.sh
$ lunch <product>-<variant>      
$ m

Flash:

$ vendor/google/tools/flashall

Incremental Flash:

$ adb remount && adb shell stop && adb sync && adb shell start