System: ubuntu 14.04


1. download source code and build 


This step is not hard. basically following the doc here:


https://source.android.com/source/building-running.htmlYou should be able to run emulator after build. One tips for re-running emulator after closing the terminal window is to create script like belowmethod 1:
build/envsetup.sh && lunch full-eng && emulator

method 2:
where to find the emulator?


2. debug android framework java source code

download the ADT eclipse ADT:  http://developer.android.com/sdk/installing/index.html

   it has the eclipse IDE and DDMS debugger


you can create a java project to import all the java source code into eclipse as described in https://source.android.com/source/using-eclipse.html

I have tried the red part below:

          

  1. f Eclipse asks you for a workspace location,  don't choose default, create the workspace at the android root. 

  2. If you have a "Welcome" screen, close it to reveal the Java perspective.

  3. File > New > Java Project

  4. Pick a project name, "android" or anything you like.

  5. Select "Create project from existing source", enter the path to your Android root directory, and click Finish.

  6. Wait while it sets up the project. (You'll see a subtle progress meter in the lower right corner.)

then, pick an app like setting app to debug.  Set break point to the setting app's source code. 


3. common command

- croot:   Changes directory to the top of the tree.- m:       Makesfrom the top of the tree.- mm:      Builds all of the modules in the currentdirectory.- mmm:     Builds all of the modules in the supplieddirectories.- cgrep:   Greps on all local C/C++ files.- hgrep:   Greps on all local C/C++ header files.- jgrep:   Greps on all local Java files.- mkgrep:  Greps on all local make files.- rcgrep:  Greps on all local .rc files.- resgrep: Greps on all local res/*.xml files.- shgrep:  Greps on all local .sh files.- godir:   Go to the directory containing a file.




good post:

http://apienthusiast.blogspot.com/2014/06/using-eclipse-to-browse-and-edit-aosp.html


andriod build system

http://elinux.org/Android_Build_System


use emulator

http://stackoverflow.com/questions/9022750/running-emulator-after-building-android-from-source


gdb & gdb server

http://www.thegeekstuff.com/2014/04/gdbserver-example/

http://thinksrc.com/2012/07/15/android-gdb-full-symbol/


http://www.kandroid.org/online-pdk/guide/debugging_gdb.html

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android中的布局方式(二)
  2. Android(安卓)安全卫士 第二天_注意事项
  3. [置顶] Android常用命令
  4. GridView、AutoCompleteTextView、Expana
  5. flutter 打包签名配置
  6. 【Android经典入门教程-上(bill译)】
  7. MIUI官方论坛 - 发烧友必刷的Android(安
  8. Android之Intent和Activity
  9. 为 Android(安卓)平台开发一个输入法
  10. 【Android经典入门教程-下(bill译)】