Mob: +91-963283917
Email:
[email protected]
Copyright © 2013 Wavedigitech. All rights reserved.
Android Debug Bridge (adb):- ADB is a versatile command line tool that lets you
communicate with an emulator instance or connected Android-powered device.
It is a client-server program that includes three components:
A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb
command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
A server, which runs as a background process on your development machine. The server manages
communication between the client and the adb daemon running on an emulator or device.
logcat :- The Android logging system provides a mechanism for collecting and viewing system debug
output. Logs from various applications and portions of the system are collected in a series of circular buffers,
which then can be viewed and filtered by the logcat command. You can use logcat from an
ADB (Android Debug Bridge) shell to view the log messages.
=====================================================================================
Step 1: Using the ADB Command
=====================================================================================
At your command prompt, simply type:
adb /* The ADB tool is launched from the command line. */
adb logcat /* start printing out everything that is going on on the device. */
adb logcat -C /* Colour: show logs with color to make them easier to read when viewing.*/
adb logcat -d > Mylogcat.txt /* You can dump the complete logcat to a file like this */
=====================================================================================
Connect Android device to your development machine. Now, if you use the ADB devices command, it
should list any attached devices or emulator instances.
adb devices /* list any attached devices or emulator instances */
adb shell /* Begins shell connection with phone */
=====================================================================================
Step 2: Restarting the ADB Server
=====================================================================================
(Enabled the USB Debugging:: Go to Menu > Settings > Applications > Development > USB Debugging
adb kill-server /* Terminates the adb server process. */
adb start-server /* Checks whether the adb server process is running and starts it, if not */
=====================================================================================
Since LogCat can get pretty large very quickly you may want to clear from Eclipse or from a terminal
window using.
adb logcat -c
adb logcat Wifi:E *:S -v long > Error-Log.txt
And this will only print out any errors associated with Wifi, and anything which is fatal.
In Wifi:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error