Difference between revisions of "OS: Android - Build CyanogenMod"

From OnnoWiki
Jump to navigation Jump to search
 
(49 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
  sudo apt-get purge openjdk*
 
  sudo apt-get purge openjdk*
  
Install oracle java6
+
Install oracle java7 ('''JAVA8 TIDAK DI SUPPORT''')
  
 
  sudo add-apt-repository ppa:webupd8team/java
 
  sudo add-apt-repository ppa:webupd8team/java
 
  sudo apt-get update
 
  sudo apt-get update
  sudo apt-get install oracle-java6-installer
+
  sudo apt-get install oracle-java7-installer
 
  y
 
  y
  
Install ia32(?)
 
Tampaknya ini tidak di perlukan & hanya dibutuhkan di Ubuntu Mint
 
  
sudo apt-get install ia32-libs
+
Untuk Ubuntu 64 bit
y
 
  
 +
sudo apt-get install libgl1-mesa-dev:i386
  
Download & Extract
 
 
mkdir -p ~/android
 
wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130729.zip
 
 
Extrak di
 
 
cp adt-bundle-linux-x86_64-20130729.zip ~
 
cd ~
 
rm -Rf ~/android/*
 
unzip adt-bundle-linux-x86_64-20130729.zip
 
mv adt-bundle-linux-x86_64-20130729/* ~/android
 
cd ~/android/sdk/tools/
 
./android sdk
 
 
Install adb & fastboot
 
 
sudo apt-get install android-tools-adb
 
sudo apt-get install android-tools-fastboot
 
  
 
Instalasi aplikasi pendukung
 
Instalasi aplikasi pendukung
Line 45: Line 24:
 
  libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
 
  libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
 
  xsltproc g++-multilib lib32z1-dev lib32ncurses5-dev \
 
  xsltproc g++-multilib lib32z1-dev lib32ncurses5-dev \
  lib32readline-gplv2-dev gcc-multilib
+
  lib32readline-gplv2-dev gcc-multilib phablet-tools
 
  y
 
  y
  
Siapkan perintah repo
+
 
 +
===Ubuntu 16.04===
 +
 
 +
sudo apt-get -y install git-core gnupg flex bison gperf libsdl1.2-dev \
 +
libesd0-dev libwxgtk3.0-dev squashfs-tools build-essential zip curl \
 +
libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
 +
xsltproc g++-multilib libx32z1 libx32z1-dev libx32ncurses5-dev \
 +
libx32readline6 libx32readline6-dev gcc-multilib phablet-tools
 +
 
 +
sudo apt-get install android-tools-adb
 +
sudo apt-get install android-tools-fastboot
 +
 
 +
Sebagai user biasa, siapkan perintah repo command
  
 
  mkdir -p ~/bin
 
  mkdir -p ~/bin
  mkdir -p ~/android-cyanogen
+
  mkdir -p ~/android-cyanogenmod
  
  curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
+
  curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
 
  chmod a+x ~/bin/repo
 
  chmod a+x ~/bin/repo
 +
sudo cp ~/android-cyanogenmod/.repo/repo/repo /usr/bin/repo
 +
sudo ~/bin/repo /usr/bin/
  
 
Edit bashrc
 
Edit bashrc
  
 
  gedit ~/.bashrc
 
  gedit ~/.bashrc
 +
 
  export PATH=${PATH}:~/bin
 
  export PATH=${PATH}:~/bin
  export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/tools
+
  # export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/tools
  export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/platform-tools
+
  # export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/platform-tools
 +
 
 +
Set identitas kita
 +
 
 +
git config --global user.email "username@mail.com"
 +
git config --global user.name "Nama Anda"
  
==Siapkan Folder Source==
+
==Sync Folder Source==
  
 
repo sync ke folder source
 
repo sync ke folder source
  
  cd ~/android-cyanogen/
+
  cd ~/android-cyanogenmod/
 
  repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
 
  repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
 
  repo sync
 
  repo sync
 +
repo sync --force-sync ('''kalau mau memaksa''')
  
 +
atau
 +
 +
cd ~/android-cyanogenmod/
 +
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
 +
repo sync
 +
repo sync --force-sync ('''kalau mau memaksa''')
 +
 +
atau
 +
 +
cd ~/android-cyanogenmod/
 +
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
 +
repo sync
 +
repo sync --force-sync ('''kalau mau memaksa''')
 +
 +
atau
 +
 +
cd ~/android-cyanogenmod/
 +
repo init -u https://github.com/CyanogenMod/android -b cm-12.0
 +
repo sync
 +
repo sync --force-sync ('''kalau mau memaksa''')
 +
 +
atau
 +
 +
cd ~/android-cyanogenmod/
 +
repo init -u https://github.com/CyanogenMod/android -b cm-13.0
 +
repo sync
 +
repo sync --force-sync ('''kalau mau memaksa''')
 +
 +
==Clean==
 +
 +
Jika kita perlu membersihkan / clean build directory
 +
dapat menggunakan perintah
 +
 +
cd ~/android-cyanogenmod/
 +
make clean
  
  
 
==Build==
 
==Build==
  
  gedit ~/android-cyanogenod/.repo/local_manifests/roomservice.xml
+
 
 +
Edit roomservice.xml tampaknya tidak perlu dilakukan untuk CM 11.0.
 +
 
 +
  cd ~
 +
vi android-cyanogenmod/.repo/local_manifests/roomservice.xml
  
 
  <manifest>
 
  <manifest>
  <project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github"  revision="cm-10.2"/>
+
  <project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github"  revision="cm-11.0"/>
 
  </manifest>
 
  </manifest>
  
 +
 +
 +
 +
===mako===
  
 
  cd ~/android-cyanogenmod
 
  cd ~/android-cyanogenmod
Line 87: Line 130:
 
  . build/envsetup.sh
 
  . build/envsetup.sh
 
  brunch mako
 
  brunch mako
 +
 +
===LG Optimus G Pro===
 +
 +
cd ~/android-cyanogenmod
 +
repo sync
 +
~/android-cyanogenmod/vendor/cm/get-prebuilts
 +
cd ~/android-cyanogenmod
 +
. build/envsetup.sh
 +
brunch e980
 +
 +
versi e980 bisa untuk LG F240K tapi suara tidak keluar.
 +
Versi LG F240K yang tidak pernah di release ke publik.
 +
 +
===LG Optimus L7===
 +
 +
'''PERCOBAAN'''
 +
 +
cd ~/android-cyanogenmod
 +
repo sync
 +
~/android-cyanogenmod/vendor/cm/get-prebuilts
 +
. build/envsetup.sh
 +
brunch p700
 +
 +
===LG Optimus L7 II===
 +
 +
'''PERCOBAAN'''
 +
 +
cd ~/android-cyanogenmod
 +
repo sync
 +
~/android-cyanogenmod/vendor/cm/get-prebuilts
 +
. build/envsetup.sh
 +
brunch p713
 +
breakfast p713
 +
 +
==Jika Berhasil==
 +
 +
Jika berhasil compile akan tampak seperti di bawah ini
 +
 +
===LG Optimus G Pro===
 +
 +
using device-specific extensions in device/lge/gproj-common/loki
 +
building image from target_files RECOVERY...
 +
  running:  mkbootfs -f /tmp/targetfiles-rxC80N/META/recovery_filesystem_config.txt /tmp/targetfiles-rxC80N/RECOVERY/RAMDISK
 +
  running:  minigzip
 +
  running:  mkbootimg --kernel /tmp/targetfiles-rxC80N/RECOVERY/kernel --cmdline vmalloc=600M console=ttyHSL0,115200,n8 lpj=67677 user_debug=31 msm_rtb.filter=0x0 ehci-hcd.park=3 coresight-etm.boot_enable=0 androidboot.hardware=geefhd --base 0x80200000 --pagesize 2048 --ramdisk_offset 0x02000000 --ramdisk /tmp/tmpCDf9EN --output /tmp/tmpx9GqMD
 +
building image from target_files BOOT...
 +
  running:  mkbootfs -f /tmp/targetfiles-rxC80N/META/boot_filesystem_config.txt /tmp/targetfiles-rxC80N/BOOT/RAMDISK
 +
  running:  minigzip
 +
  running:  mkbootimg --kernel /tmp/targetfiles-rxC80N/BOOT/kernel --cmdline vmalloc=600M console=ttyHSL0,115200,n8 lpj=67677 user_debug=31  msm_rtb.filter=0x0 ehci-hcd.park=3 coresight-etm.boot_enable=0 androidboot.hardware=geefhd --base 0x80200000 --pagesize 2048 --ramdisk_offset 0x02000000 --ramdisk /tmp/tmpq2QISa --output /tmp/tmpdpetat
 +
  running:  imgdiff -b /tmp/targetfiles-rxC80N/SYSTEM/etc/recovery-resource.dat /tmp/tmp05FEXA /tmp/tmp9dtgp5 /tmp/tmphFASyS
 +
    boot size (6991872) is 30.31% of limit (23068672)
 +
  running:  openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
 +
  running:  java -Xmx2048m -jar /home/onno/android-cyanogenmod/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem  build/target/product/security/testkey.pk8 /tmp/tmpnKRx4l /home/onno/android-cyanogenmod/out/target/product/e980/cm_e980-ota-4be1bc551a.zip
 +
done.
 +
Package Complete: /home/onno/android-cyanogenmod/out/target/product/e980/cm-11-20160214-UNOFFICIAL-e980.zip
 +
 +
==JIKA DIPERLUKAN==
 +
 +
===adt bundle===
 +
 +
Jika di perlukan adt bundle dapat di instalasi melalui perintah berikut
 +
 +
 +
Download dari http://developer.android.com/sdk/index.html#download
 +
 +
mkdir -p ~/android
 +
wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130729.zip
 +
wget http://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86_64-20140321.zip
 +
wget http://enos.itcollege.ee/~jpoial/allalaadimised/AndroidSDK/adt-bundle-linux-x86_64-20140702.zip
 +
 +
Extrak di
 +
 +
cp adt-bundle-linux-x86_64-20140702.zip ~
 +
cd ~
 +
rm -Rf ~/android/*
 +
unzip adt-bundle-linux-x86_64-20140702.zip
 +
mv adt-bundle-linux-x86_64-20140702/* ~/android
 +
cd ~/android/sdk/tools/
 +
./android sdk
 +
 +
 +
===Ubuntu Mint===
 +
 +
Install ia32(?)
 +
Tampaknya ini tidak di perlukan & hanya dibutuhkan di Ubuntu Mint
 +
 +
sudo dpkg --add-architecture i386
 +
sudo apt-get update
 +
sudo apt-get install ia32-libs
 +
sudo apt-get install ia32-libs
 +
y
 +
  
 
==Referensi==
 
==Referensi==
  
 +
* http://askubuntu.com/questions/318246/complete-installation-guide-for-android-sdk-adt-bundle-on-ubuntu
 
* http://forum.xda-developers.com/showthread.php?t=2404841
 
* http://forum.xda-developers.com/showthread.php?t=2404841
 
* http://bernaerts.dyndns.org/linux/74-ubuntu/245-ubuntu-precise-install-android-sdk
 
* http://bernaerts.dyndns.org/linux/74-ubuntu/245-ubuntu-precise-install-android-sdk
 +
* http://wiki.cyanogenmod.org/w/Build_for_blade
  
 
==Pranala Menarik==
 
==Pranala Menarik==

Latest revision as of 10:26, 9 May 2016

Persiapan

Buang openjdk

sudo apt-get purge openjdk*

Install oracle java7 (JAVA8 TIDAK DI SUPPORT)

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


Untuk Ubuntu 64 bit

sudo apt-get install libgl1-mesa-dev:i386


Instalasi aplikasi pendukung

sudo 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 phablet-tools
y


Ubuntu 16.04

sudo apt-get -y install git-core gnupg flex bison gperf libsdl1.2-dev \
libesd0-dev libwxgtk3.0-dev squashfs-tools build-essential zip curl \
libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils \
xsltproc g++-multilib libx32z1 libx32z1-dev libx32ncurses5-dev \
libx32readline6 libx32readline6-dev gcc-multilib phablet-tools
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot

Sebagai user biasa, siapkan perintah repo command

mkdir -p ~/bin
mkdir -p ~/android-cyanogenmod
curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
sudo cp ~/android-cyanogenmod/.repo/repo/repo /usr/bin/repo
sudo ~/bin/repo /usr/bin/

Edit bashrc

gedit ~/.bashrc
export PATH=${PATH}:~/bin
# export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/tools
# export PATH=${PATH}:~/android/sdk/adt-bundle/sdk/platform-tools

Set identitas kita

git config --global user.email "username@mail.com"
git config --global user.name "Nama Anda"

Sync Folder Source

repo sync ke folder source

cd ~/android-cyanogenmod/
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
repo sync
repo sync --force-sync (kalau mau memaksa)

atau

cd ~/android-cyanogenmod/
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync
repo sync --force-sync (kalau mau memaksa)

atau

cd ~/android-cyanogenmod/
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
repo sync --force-sync (kalau mau memaksa)

atau

cd ~/android-cyanogenmod/
repo init -u https://github.com/CyanogenMod/android -b cm-12.0
repo sync
repo sync --force-sync (kalau mau memaksa)

atau

cd ~/android-cyanogenmod/
repo init -u https://github.com/CyanogenMod/android -b cm-13.0
repo sync
repo sync --force-sync (kalau mau memaksa)

Clean

Jika kita perlu membersihkan / clean build directory dapat menggunakan perintah

cd ~/android-cyanogenmod/
make clean


Build

Edit roomservice.xml tampaknya tidak perlu dilakukan untuk CM 11.0.

cd ~
vi android-cyanogenmod/.repo/local_manifests/roomservice.xml
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github"  revision="cm-11.0"/>
</manifest>



mako

cd ~/android-cyanogenmod
repo sync
~/android-cyanogenmod/vendor/cm/get-prebuilts
. build/envsetup.sh
brunch mako

LG Optimus G Pro

cd ~/android-cyanogenmod
repo sync
~/android-cyanogenmod/vendor/cm/get-prebuilts
cd ~/android-cyanogenmod
. build/envsetup.sh
brunch e980

versi e980 bisa untuk LG F240K tapi suara tidak keluar. Versi LG F240K yang tidak pernah di release ke publik.

LG Optimus L7

PERCOBAAN
cd ~/android-cyanogenmod
repo sync
~/android-cyanogenmod/vendor/cm/get-prebuilts
. build/envsetup.sh
brunch p700

LG Optimus L7 II

PERCOBAAN

cd ~/android-cyanogenmod
repo sync
~/android-cyanogenmod/vendor/cm/get-prebuilts
. build/envsetup.sh
brunch p713
breakfast p713

Jika Berhasil

Jika berhasil compile akan tampak seperti di bawah ini

LG Optimus G Pro

using device-specific extensions in device/lge/gproj-common/loki
building image from target_files RECOVERY...
  running:  mkbootfs -f /tmp/targetfiles-rxC80N/META/recovery_filesystem_config.txt /tmp/targetfiles-rxC80N/RECOVERY/RAMDISK
  running:  minigzip
  running:  mkbootimg --kernel /tmp/targetfiles-rxC80N/RECOVERY/kernel --cmdline vmalloc=600M console=ttyHSL0,115200,n8 lpj=67677 user_debug=31 msm_rtb.filter=0x0 ehci-hcd.park=3 coresight-etm.boot_enable=0 androidboot.hardware=geefhd --base 0x80200000 --pagesize 2048 --ramdisk_offset 0x02000000 --ramdisk /tmp/tmpCDf9EN --output /tmp/tmpx9GqMD
building image from target_files BOOT...
  running:  mkbootfs -f /tmp/targetfiles-rxC80N/META/boot_filesystem_config.txt /tmp/targetfiles-rxC80N/BOOT/RAMDISK
  running:  minigzip
  running:  mkbootimg --kernel /tmp/targetfiles-rxC80N/BOOT/kernel --cmdline vmalloc=600M console=ttyHSL0,115200,n8 lpj=67677 user_debug=31  msm_rtb.filter=0x0 ehci-hcd.park=3 coresight-etm.boot_enable=0 androidboot.hardware=geefhd --base 0x80200000 --pagesize 2048 --ramdisk_offset 0x02000000 --ramdisk /tmp/tmpq2QISa --output /tmp/tmpdpetat
  running:  imgdiff -b /tmp/targetfiles-rxC80N/SYSTEM/etc/recovery-resource.dat /tmp/tmp05FEXA /tmp/tmp9dtgp5 /tmp/tmphFASyS
   boot size (6991872) is 30.31% of limit (23068672)
  running:  openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
  running:  java -Xmx2048m -jar /home/onno/android-cyanogenmod/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem  build/target/product/security/testkey.pk8 /tmp/tmpnKRx4l /home/onno/android-cyanogenmod/out/target/product/e980/cm_e980-ota-4be1bc551a.zip
done.
Package Complete: /home/onno/android-cyanogenmod/out/target/product/e980/cm-11-20160214-UNOFFICIAL-e980.zip

JIKA DIPERLUKAN

adt bundle

Jika di perlukan adt bundle dapat di instalasi melalui perintah berikut


Download dari http://developer.android.com/sdk/index.html#download

mkdir -p ~/android
wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130729.zip
wget http://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86_64-20140321.zip
wget http://enos.itcollege.ee/~jpoial/allalaadimised/AndroidSDK/adt-bundle-linux-x86_64-20140702.zip

Extrak di

cp adt-bundle-linux-x86_64-20140702.zip ~
cd ~
rm -Rf ~/android/*
unzip adt-bundle-linux-x86_64-20140702.zip
mv adt-bundle-linux-x86_64-20140702/* ~/android
cd ~/android/sdk/tools/
./android sdk


Ubuntu Mint

Install ia32(?) Tampaknya ini tidak di perlukan & hanya dibutuhkan di Ubuntu Mint

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install ia32-libs
sudo apt-get install ia32-libs
y


Referensi

Pranala Menarik