How to crawl log with ADB?

Source: Internet
Author: User

In the androidclient test process, sometimes we encounter such anomalies as the flash back.

At this point we can crawl the log through ADB. So as to provide many other information for development.

First, download ADB.exeSearch the "ADB toolkit" online to find a lot of adb, we need to Adb.exe, AdbWinApi.dll, AdbWinUsbApi.dllThese 3 files, others do not matter. Place the folder containing the 3 files in a random folder (put the D:\adb folder here) ii. Configuring environment variablesOn the computer desktop, right-click Computer--Properties--Advanced system configuration--environment variables, find path in system variables (not able to create a new one). Click on path and then add your path to the beginning of the variable value "D:\ADB;". Remember to take a semicolon at the end of the path. Click OK-OK, this completes the configuration of the environment variable. Third, catch log
    1. Connect your phone to your computer with a data cable.

    2. Open the command line (start with an attachment-to-command prompt), and then proceed through the steps:
  • Show now connected mobile devices (make sure your phone is connected to your computer): Enter adb devices + return
  • Grab log: Input adb logcat + ENTER
  • Stop grabbing log: use CTRL + C
  • Export log:adb logcat > D:1.txt(Export log to D:/1.txt file)
through the above 4 steps we successfully crawled the log and placed it in the corresponding directory. Isn't it very easy?

How to crawl log with ADB?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.