Monday, August 25, 2014

Android Application Logs

Learned a great new trick today - using logcat to display Android log meesages to the console window remotely.

Background

Android OS has a log feature (android.util.Logging) which has various levels of verbosity. Developers can send messages to this log. The log isn't written anywhere on the device, it's stored in memory (it is also RIFE with interesting data - such as frequent NMEA GPS location strings).

View the Log over ADB

On a rooted Android, simply enter:

adb logcat >log.txt

and memory-based logs will flow to the log.txt file in your current working directory.

No comments:

Post a Comment