2012년 7월 15일 일요일

Setup Android build enviroment ( ubuntu 10.04, 12.04 )

  • linux version

Android recommand ubuntu 10.04 LTS 64bits.
Actually, android can not be built under 32bits linux version.

  • Check the tool version

$make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
이 프로그램은 자유소프트웨어입니다; 복사조건은 소스를 참고하십시오.
상품성이나 특정 목적에 대한 적합성을 비롯하여, 어떠한 보증도 하지
않습니다
This program built for x86_64-pc-linux-gnu

$ python -V
Python 2.6.5

$ git --version
git version 1.7.0.4

$ java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

refer to http://source.android.com/source/initializing.html

  • Intall JDK6


According to http://source.android.com/source/initializing.html

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

But it's not works

use below

sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk

For  ubuntu 12.04 LTS

  •  Install JDK 7

$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk

  •  Install other packages


sudo apt-get install zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev
$ sudo apt-get install libx11-dev:i386 libreadline6-dev:i386
$ sudo apt-get install libgl1-mesa-glx:i386
 => it might be a problem
 => install libgl1-mesa-dri:i386 instead of this
$ sudo apt-get install libgl1-mesa-dev g++-multilib mingw32 tofrodos
$ sudo apt-get install python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

  • For ADB debugging

Create /etc/udev/rules.d/51-android.rules
and add which device you have as like below

# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

댓글 없음:

댓글 쓰기