OS: Android - Mempersiapkan Development Environment

From SpeedyWiki

Jump to: navigation, search

Sebelum men-download & membuat Android dari source, pastikan

  • Komputer yang digunakan menggunakan sistem operasi Linux (terutama Ubuntu) atau Mac.
  • Harddisk kosong > 30 GB atau 100GB untuk full set.
  • 64-bit untuk Gingerbread (2.3.x) atau yang lebih baru.
  • Python 2.6 -- 2.7
  • GNU Make 3.81 -- 3.82
  • JDK 6 untuk Gingerbread yang yang lebih baru. JDK 5 untuk Froyo atau yang lebih lama.
  • Git 1.7 atau yang lebih baru.



Contents

[edit] Instalasi Aplikasi Pendukung

Remove

sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*


[edit] SDK java7

Java8 belum di support untuk digunakan dalam compile Android. Kita harus menggunakan java7

Siapkan SDK

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Cek menggunakan perintah

java -version

Akan keluar

Java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

[edit] Siapkan Apps Pendukung

Instalasi

apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev \
libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev \
zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc \
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib \
android-tools-adb android-tools-fastboot

Remove

sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

[edit] Sebagai User Biasa

Sebagai user biasa. Buat directory

mkdir -p ~/bin

Sebagai user biasa. Instalasi perintah repo

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

[edit] Edit bashrc

sudo nano ~/.bashrc

isi dengan

export PATH=${PATH}:~/bin

jalankan di shell

source ~/.bashrc

atau

export PATH=${PATH}:~/bin


[edit] Setup usb & SDK=

Jika diperlukan kita dapat menginstalsi usb dan SDK menggunakan perintah berikut


[edit] Download SDK dll

Dari

http://developer.android.com/sdk/index.html

Seperti

http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130729.zip
http://dl.google.com/android/adt/adt-bundle-linux-x86-20130729.zip
http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
http://dl.google.com/android/studio/android-studio-bundle-130.737825-linux.tgz


[edit] Instalasi SDK

# PATH=$PATH:/your/specific/path/to/android/sdk/platform-tools/


[edit] Instalasi udev

Edit

sudo vi /etc/udev/rules.d/51-android.rules

Isi dengan, (ganti username dengan username anda)

# 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>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
# fastboot protocol on codename unknown (Axioo Vigo 350)
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", MODE="0600", OWNER="<username>"

Lakukan

sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start


[edit] Referensi

[edit] Pranala Menarik

Personal tools