[Android] Android Log crawl software test

Source: Internet
Author: User

1. Log file Classification introduction 1. Print in real time:

1.1 Logcat Main (application)

--adb logcat-b main-v time > App.log

1.2 Logcat Radio (RF related-SIMSTK,MODEM related Atcommand)

--adb logcat-b radio-v time > Radio.log

1.3 Logcat Events (System event logs, such as touch-screen events, etc.)

--ADB logcat-b events-v time

1.4 Tcpdump (TCP/IP protocol related, such as when catching MMS download when the UA profile,browser Internet, using proxy APN download, streaming related content including UA profile, etc.)

--adb shell tcpdump-s 10000-w/sdcard/capture.pcap

1.5 There is also the Qualcomm platform will have QXDM log (Qualcomm provides solutions, please refer to Qpst, QXDM basic usage instructions and role).

2. Status information:

2.1 kmsg

--adb shell cat/proc/kmsg > kmsg.txt, open to check Msm_kgsl field

Description: Used to retrieve kernel messages generated with PRINTK. Only one process with superuser privileges can read this file at any time. These messages can also be retrieved using System invoke syslog. These messages are typically retrieved using the tool DMESG or daemon klogd. Proc is a memory file system, each read file kmsg is actually a loop buffer inside the kernel, after each read, the loop buffer thing is considered to have been processed (that is, to become invalid content), so you read again empty is very normal why this process, the loop buffer size is limited, The kernel can write to it at any time, so it's normal to handle it. You go find out if/proc/kmsg's information is associated with the system log, and if so, you can read the log file.

2.2 DMESG (Boot information)

--adb shell DMESG > Dmesg.txt

Kernel will store the boot information in the ring buffer, you can use DMESG to view the information if you are not able to view it at boot time. DMESG is kernel log, usually with kernel related, such as driver out of the problem (camera, Bluetooth, USB, boot, etc.) boot information is also saved in the/var/log directory, the name is DMESG file. More/var/log/dmesg

ADB shell dumpstate (System status information, including the current memory information of the phone, CPU information, Logcat cache, kernel cache, etc.)

2.4 Dumpsys (content of system service)

--adb shell Dumpsys meminfo system (view system memory information for this process)

2.5 bugreport (includes dmesg,dumpstate and Dumpsys)

--adb bugreport > Bugreport.log

2.6 Engineering Mode, etc.

For the Apollo phone, call *#* #8888 #*#* and tick the corresponding log. After the test is over, export log to pc.-via SD card as reference

3. Open push and pull permissions, and read and write permissions

By default, all read-only permissions are:
1. Enter ADB remount;
2. If the 1th method does not work,after the adb shell Su, the file system remount to read and Write permissions: Mount-o rw,remount/system. In security considerations, remember after the remount back read: Mount-o ro,remount/system

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: info-contact@alibabacloud.com 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.