Debugging Android's framework source using eclipse

Source: Internet
Author: User

http://www.eoeandroid.com/forum.php?mod=viewthread&tid=325492

The 3rd and 4th chapters in this article describe the debugging of Java and C/cpp code, and debugging can greatly reduce the amount of log viewing costs.

(1) Debugging Java code has been verified, mainly in eclipse to create a same package name of the Android application project,

Project catalog to import the source code, and open in the Java window; in the DDMS to specify the thread to debug, open the source code in the Debug window set breakpoints;

If the directory structure can be the same as the package name, you can debug directly

If the directory structure and package name are different, right-click the corresponding thread in the Debug window point open Process and select the location where we need to specify the Android source. Click the "Edit Source lookup Path" button, then click the "Add" button and select "File System Directory".

This article introduces the way is also relatively simple, there is no need to import all the framework code, to debug which file to import the corresponding file, which is very suitable for my situation.

(2) Debug C/cpp code has not been validated yet.

Directory

1 Introduction ... 1

2 installation ... 1

2.1 Installing the JDK: 1

2.2 Install Eclipse. 1

2.3 Installing the Eclipse CDT plugin ... 1

2.4 Install Android SDK. 3

2.5 Installing Android ADT plugin ... 5

2.6 Installing the Android System Debug Utility ... 6

3 Debugging Android Java code ... 7

3.1 Commissioning System_process 7

3.1.1 Creates a pseudo (pseudo) Android project for System_process. ... 7

3.1.2 Using DDMS Debug system_process 9

3.2 Debugging Android Built-in apps ... 11

4 Debugging Android code C + + ... 13

4.1 Commissioning System_process 13

4.1.1 Creating a C + + project ... 13

4.1.2 Creating a Debug configuration ... 14

4.1.3 Commissioning System_process 16

4.2 Debugging Android Apps ... 19

4.2.1 Debug Android App ... 19

4.3 Debugging Android Services ... 21st

4.3.1 Debugging Android Services ... 21st

5 Debugging both Java and C + + 5.1 Observe all call traces from Java to native ... 23

5. Observe IPC call tracking ... 26

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.