This technique may be useful for detecting application with memory leakage. Example below focused
on com.android.systemui and system process, but you can easy modify and improve it for yourself.
Android logging system is based on ring buffers located in RAM. Because of that sometimes you can't get the log of an issue (such as unexpected reboot or if you have no connection to adb at that moment). It's especially significant if you test unstable firmware (such as cyanogen nightly).
The following method enables one to overcome this restriction.
There's easy way for getting logs on a rooted android device
without fiddling with adb.
First of all should install Scripting Layer for Android (SL4A)
In the next step should to check that shell interpreter installed (menu -> view -> interpreters). - If it was not, it should to add it (menu -> add -> Shell)
Finally should create a script.
I wrote the following script for get logcat.log, logcat_radio.log, dmesg.log, kmsg.log and last_kmsg.log