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