Android Source Reading Tips

Source: Internet
Author: User

Skills:

When debugging or understanding how the system works, we often have to find the source code corresponding to the service program.

find source files for C or C + + programs:

For example, to find the source code corresponding to the INIT program, for example.

Find./-name android.mk-exec grep-l init {} \;

Note: Find all the android.mk through the Find command, through grep to find the program string, get its path, and then go to the path to find the source code, the reason is that the C or C + + code through ANDROID.MK to guide the compilation.

find Java source files:

Java source code is characterized by the same class name, so if we know a class name, find its Java source code directly with the Java suffix can be.

For example: Look for the code for the Com.android.internal.os.ZygoteInit class.

Find./-name Zygoteinit.java

Android Source Reading Tips

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.