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
- Connect your phone to your computer with a data cable.
- 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?