2014年7月27日 星期日

to be continue... Android build environment setup(ubuntu 12.04)

  1. install Ubuntu 12.04 LTS 64bit
  2. follow google's instruction:
    1. https://source.android.com/source/initializing.html
      1. install oracal JDK 6 
        1. sudo apt-get install software-properties-common
        2. sudo add-apt-repository ppa:webupd8team/java
        3. sudo apt-get update
        4.  
      2. install required packages 
        1. sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 libglapi-mesa:i386 
        2. sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
      3.  get and setup repo
        1. mkdir ~/bin
        2. add "PATH=~/bin:$PATH" in ~/.bash then run bash again
        3. curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
        4. chmod a+x ~/bin/repo
      4. download source code
        1. create new directory for download project, then switch to that directory
        2. repo init -u https://android.googlesource.com/platform/manifest
        3. repo sync -j10
      5. setup ccache (compiler cache, for speedup build time)
        1. add "export USE_CCACHE=1" in ~/.bashrc 
        2. run "prebuilts/misc/linux-x86/ccache/ccache -M 50G" in your project

沒有留言:

張貼留言