How does logcat not display output information during Android mobile phone Development and debugging?

Source: Internet
Author: User

Problem: after connecting the mobile phone to the computer, the driver is correctly installed and the USB debugging mode is enabled. The device and its process information can be seen in DDMS, but no information is output in logcat.

Cause: logcat is disabled by default in some rom

Problem description: In ddms, the display of the device name as a question mark does not affect, that is, the display of adb get-serialno as a question mark does not affect.

Solution:

1. root permission required (not required for some rom)

2. Open logcat, set the level, and run the following command (after android upgrade, adb is in platform-tools, not in tools)

Adb shell

Echo 1>/sys/kernel/logger/log_main/enable

Note: 1 is written to the log switch file, 1 is on, and 0 is off.

Echo 2>/sys/kernel/logger/log_main/priority

Description: writes level 2 to priority files.

3. Restart adb. If eclipse is used, disable eclipse, restart adb, and then start eclipse.

Adb kill-server

Adb start-server

4. logcat should be able to work now. If it still does not work, update adb

Android update adb

5. Repeat Step 3. At this time, logcat should be able to work. If it still does not work, find the android directory in your home directory, such as C: Documents and SettingsAdministrator. android.

Find the adb_usb.ini file in this directory. The content of the file is only three lines by default, all of which are comments. Add a line after it and the content is 0x12d1.

6. Repeat Step 3. logcat should be ready to work now.

Related Article

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.