Intend to start Android system learning, June pre-good things, its prerequisite. If you can debug System_server in Eclipse, it can be a great help to understand the Android system service.
On the Internet to check some information, basically are more trouble:
Here is Lao Luo's article, a bit old, need to compile an Android ROM themselves. Light source will be ready for a long time!
http://blog.csdn.net/luoshengyang/article/details/6559955
There is also a direct burning ROM to the Nexus Real machine, this has the advantage that the real machine faster! But also very troublesome, remove the source code, solve various compilation problems, but also need to buy a nexus.
Http://www.360doc.com/content/14/0604/23/17754428_383723001.shtml
Self-figured out a solution, using virtualbox+genymotion+eclipse, faster than the real machine, and do not need to compile Android source code.
The following uses the Ubuntu14.04 LTS environment, debugging the System_server source with Eclipse, of course, since it is eclipse, it can only be debugged to the Java layer.
1, download and install virtual box, this online has a lot of articles.
2. Download and install Genymotion, this is a good thing, can build Android ROM and can let eclipse through the network port connected to Virtual box vm, https://cloud.genymotion.com/page/ launchpad/download/
3. Download Android4.1.1 rom, http://mirror1.jarfil.net/androvm.org/Download/,
Mobile Version Androvm_vbox86p_4.1.1_r6.1-20130222.ova
Tablet version Androvm_vbox86tp_4.1.1_r6.1-20130222.ova
4. Install the Android ROM in virtual box, and remember to configure the network to bridge the NIC, select Wlan0 or eth0. Eclipse relies on it to connect ADB to virtual machines.
5. Start Android and find the Android VM configuration app, usually in homepage, or in the application list.
6. Open, find the IP address, if not found, then return to step 4 under the interface eth0 or Wlan0.
7. Open terminal, typing command: ADB connect <ip>.
8. Go to Grepcode to download Android 4.1.1 source code.
http://grepcode.com/snapshot/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/
9. Open Eclipse, create a Java project, note that it is a Java project, and then import the downloaded Android-4.1.1_r1-sources.jar file into the project.
10. Select the System_server process in DDMS, switch to package Explorer, right-select Java project, Debug as--> debug configurations--> double-clickJava application, fill host:local host, Port:8700,debug.
11. Well, done, you should be able to see in the Ddms system_server debug bug turned green, there are wood! Write your own apk, for example, call StartActivity () in the app, and then set a breakpoint in the StartActivity () function in Activitymanagerservice.java to start the Android tour.
12. When the breakpoint is trigger, eclipse will not find the source, select the frame you want to debug in the Debug window, then edit source lookup-->project--> to select your project. You can see the source.
Android Learning launcher--eclipse how to debug System_server