編譯 Android 原始碼

下載 Android Source Code


在 Setting up your machine 這裡

假設大家都下載安裝好 ubuntu10.10 了


但是在新的版本中,預設 apt 都是裝 JDK6
但是我們看到 google 說要用 JDK5 來編

編輯 sources.list

vi /etc/apt/sources.list


deb http://us.archive.ubuntu.com/ubuntu jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu jaunty-updates multiverse


apt-get update

現在可以裝 JDK5 了

apt-get install sun-java5-jdk sun-java5-plugin

接下來我們在按造 google 步驟

apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

你有可能用 valgrind 來找安全性問題,我們有裝一下

apt-get install valgrind

接下來請把載回來的 android 原始碼解壓縮
進去 make,今天如果你的電腦是多 CPU 記得加個 j,如範例 -j 雙核心

make -j(核心數)

make -j2

編譯 Android Source Code

等等等…,現在一般的個人電腦大概要編 4 小時
差一點的可能會多很多我用舊筆電跑 12 小時
完以後在 /android_22/out/target/product/generic


請將這3個檔案複製到你的 Android SDK
像我自己從android-8複製了一個 android-9


你在開發時就可以使用自己編的 android 了
切來切去有點煩,全部改 Linux 開發好了


  1. Unquestionably believe that which you stated. Your favorite reason appeared to be on the web the easiest thing to be aware of.
    I say to you, I definitely get irked while people consider worries that they plainly don’t know about.

    You managed to hit the nail upon the top and also defined out the whole thing without having side effect ,
    people can take a signal. Will likely be back to get
    more. Thanks

  2. Write more, thats all I have to say. Literally, it seems as though you relied
    on the video to make your point. You obviously know what youre talking about, why
    waste your intelligence on just posting videos to your blog when you could be giving
    us something enlightening to read?

  3. I have been exploring for a bit for any high quality articles
    or blog posts on this sort of house . Exploring
    in Yahoo I eventually stumbled upon this
    website. Reading this information So i’m satisfied to express that I have a very good uncanny feeling I discovered just what I needed.
    I so much indisputably will make certain to do not overlook this web site and give it a glance on a
    continuing basis.

  4. It’s the best time to make some plans for the future
    and it is time to be happy. I’ve read this post
    and if I could I desire to suggest you some interesting things
    or advice. Maybe you could write next articles referring to
    this article. I wish to read even more things about it!

  5. Great blog! Do you have any tips for aspiring writers?
    I’m planning to start my own website soon but I’m a little lost on everything.
    Would you advise starting with a free platform like WordPress
    or go for a paid option? There are so many choices out there that I’m totally overwhelmed ..
    Any recommendations? Thank you!

  6. First of all I want to say awesome blog! I had a quick question which I’d like to ask if you don’t mind.
    I was interested to know how you center yourself
    and clear your thoughts before writing. I have had difficulty
    clearing my thoughts in getting my ideas out. I do enjoy writing but it just seems like
    the first 10 to 15 minutes are generally lost just trying to figure out how
    to begin. Any suggestions or hints? Cheers!

  7. We are a group of volunteers and starting a brand new scheme
    in our community. Your website provided us with valuable information to work on. You have done an impressive process and our entire neighborhood can be
    grateful to you.

  8. First of all I would like to say superb blog! I had a quick question in which I’d like to ask if you don’t mind.
    I was curious to find out how you center yourself and clear your thoughts before writing.
    I have had trouble clearing my mind in getting my thoughts
    out there. I truly do enjoy writing but it just seems like the first 10 to 15 minutes are wasted simply just trying to figure out how to begin. Any ideas or tips?


  9. Right here is the right site for anyone who would like to understand this topic.
    You understand so much its almost tough to argue with you (not
    that I actually will need to…HaHa). You certainly put a
    new spin on a topic that’s been discussed for decades.
    Excellent stuff, just great!

  10. I love your blog.. very nice colors & theme.
    Did you design this website yourself or did you hire someone to do it for you?

    Plz answer back as I’m looking to design my own blog and would
    like to know where u got this from. cheers

  11. You actually make it seem really easy along
    with your presentation however I in finding this topic to be really one thing which I believe I would never understand.

    It kind of feels too complicated and very large for me.
    I am looking ahead in your subsequent put up, I’ll
    try to get the cling of it!

  12. I blog frequently and I genuinely appreciate your information. The article has really peaked my interest.
    I’m going to bookmark your website and keep checking for new information about once
    per week. I opted in for your RSS feed too.

  13. Hey there! I could have sworn I’ve been to this blog before but after checking through some of the
    post I realized it’s new to me. Anyhow, I’m definitely delighted I found it and
    I’ll be book-marking and checking back often!

  14. Hey there! I know this is kinda off topic however I’d figured I’d ask.

    Would you be interested in trading links or maybe guest
    writing a blog post or vice-versa? My blog covers a lot of the same subjects as yours and I
    feel we could greatly benefit from each other. If you happen to be interested
    feel free to send me an email. I look forward to hearing from
    you! Wonderful blog by the way!

  15. hello!,I like your writing very much! proportion we keep up a correspondence
    more approximately your article on AOL? I need a specialist
    in this space to resolve my problem. May be that is you!
    Looking ahead to peer you.

  16. I loved as much as you will receive carried out right here.
    The sketch is tasteful, your authored material stylish.
    nonetheless, you command get bought an edginess over that you wish be delivering the following.
    unwell unquestionably come more formerly again since exactly the same nearly very often inside case you shield
    this hike.

  17. Hello! Quick question that’s totally off topic. Do you know how to make your site mobile friendly?
    My site looks weird when browsing from my iphone4. I’m trying to find a template or plugin that might be able
    to fix this problem. If you have any recommendations, please
    share. Thank you!

  18. Howdy, i read your blog occasionally and i
    own a similar one and i was just wondering if you get a lot of spam responses?
    If so how do you stop it, any plugin or anything you can advise?
    I get so much lately it’s driving me crazy so any help
    is very much appreciated.


你的電子郵件位址並不會被公開。 必要欄位標記為 *