Difference between revisions of "ROM Android: Download source code cyanogenmod"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (New page: ==Persiapan== Buang openjdk sudo apt-get purge openjdk* Install oracle java6 sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-inst...) |
Onnowpurbo (talk | contribs) |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Spesifikasi Hardware== | ||
+ | |||
+ | Agar aman pada saat compile android, | ||
+ | |||
+ | * CPU - bisa kelas-kelas atom, tapi akan butuh 1 harian (24 jam) utk compile. | ||
+ | * Memory - sebesar mungkin | ||
+ | * Swap - akan butuh sekitar 4Gbyte, untuk RAM 2GByte. | ||
+ | |||
+ | |||
+ | |||
==Persiapan== | ==Persiapan== | ||
Line 5: | Line 15: | ||
sudo apt-get purge openjdk* | sudo apt-get purge openjdk* | ||
− | + | Update repo | |
− | sudo | + | sudo su |
− | + | echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list | |
− | + | echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list | |
− | + | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
+ | apt-get update | ||
− | + | Instalasi oracle java7 (jangan menggunakan java8) | |
− | |||
− | + | apt-get remove --purge oracle-java8* | |
− | + | apt-get remove --purge oracle-java6* | |
− | + | apt-get install oracle-java7-installer | |
− | |||
− | |||
− | + | Jika menggunakan java8 akan keluar error | |
− | + | ************************************************************ | |
− | + | You are attempting to build with an unsupported version | |
− | + | of java. | |
− | + | ||
− | + | Your version is: java version "1.8.0_31". | |
− | + | The correct version is: Java SE 1.6 or 1.7. | |
− | + | ||
− | + | Please follow the machine setup instructions at | |
− | + | https://source.android.com/source/download.html | |
− | + | ************************************************************ | |
− | |||
− | |||
− | |||
− | |||
Instalasi aplikasi pendukung | Instalasi aplikasi pendukung | ||
Line 48: | Line 52: | ||
y | y | ||
− | sudo apt-get install android-tools-adb | + | sudo apt-get install android-tools-adb android-tools-fastboot python-lunch |
− | |||
Siapkan perintah repo | Siapkan perintah repo | ||
Line 72: | Line 75: | ||
==Siapkan Folder Source== | ==Siapkan Folder Source== | ||
+ | |||
+ | Buang manifests | ||
+ | |||
+ | cd ~/android-cyanogenmod/.repo | ||
+ | rm -Rf manifests | ||
repo sync ke folder source | repo sync ke folder source | ||
Line 96: | Line 104: | ||
repo init -u https://github.com/CyanogenMod/android -b cm-12.0 | repo init -u https://github.com/CyanogenMod/android -b cm-12.0 | ||
repo sync | repo sync | ||
+ | |||
+ | ==Ambil prebuild apps== | ||
+ | |||
+ | cd ~/android-cyanogenmod/system/vendor/cm | ||
+ | ./get-prebuilts | ||
==Clean== | ==Clean== | ||
Line 138: | Line 151: | ||
versi e980 bisa untuk LG F240K tapi suara tidak keluar. | versi e980 bisa untuk LG F240K tapi suara tidak keluar. | ||
Versi LG F240K yang tidak pernah di release ke publik. | Versi LG F240K yang tidak pernah di release ke publik. | ||
+ | |||
+ | ==LG Optimus G Pro F240K / geefhd== | ||
+ | |||
+ | cd ~/android-cyanogenmod | ||
+ | ~/android-cyanogenmod/vendor/cm/get-prebuilts | ||
+ | cd ~/android-cyanogenmod | ||
+ | . build/envsetup.sh | ||
+ | lunch geefhd | ||
+ | lunch f240k | ||
===LG Optimus L7=== | ===LG Optimus L7=== | ||
Line 166: | Line 188: | ||
===LG Optimus G Pro=== | ===LG Optimus G Pro=== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
default_system_dev_certificate = (str) build/target/product/security/testkey | default_system_dev_certificate = (str) build/target/product/security/testkey | ||
extfs_sparse_flag = (str) -s | extfs_sparse_flag = (str) -s | ||
− | extra_recovery_keys = (str) build/target/product/security/cm | + | extra_recovery_keys = (str) build/target/product/security/cm build/target/product/security/cm-devkey build/target/product/security/bacon |
fs_type = (str) ext4 | fs_type = (str) ext4 | ||
− | fstab = (dict) {'/sns': <common.Partition object at | + | fstab = (dict) {'/sns': <common.Partition object at 0x2b27f7331410>, '/cache': <common.Partition object at 0x2b27f73311d0>, '/boot': <common.Partition object at 0x2b27f7331110>, '/system': <common.Partition object at 0x2b27f7331190>, '/persist': <common.Partition object at 0x2b27f7331250>, '/recovery': <common.Partition object at 0x2b27f7331150>, '/firmware': <common.Partition object at 0x2b27f73313d0>, '/data': <common.Partition object at 0x2b27f7331210>, '/factory': <common.Partition object at 0x2b27f7331450>} |
fstab_version = (int) 2 | fstab_version = (int) 2 | ||
mkbootimg_args = (str) --ramdisk_offset 0x02000000 | mkbootimg_args = (str) --ramdisk_offset 0x02000000 | ||
+ | multistage_support = (str) 1 | ||
+ | ota_script_path = (str) ./build/tools/releasetools/ota_from_target_files | ||
+ | override_device = (str) e986,e980,geefhd,e988,gkatt | ||
recovery_api_version = (int) 2 | recovery_api_version = (int) 2 | ||
recovery_size = (int) 23068672 | recovery_size = (int) 23068672 | ||
− | selinux_fc = (str) /tmp/targetfiles- | + | selinux_fc = (str) /tmp/targetfiles-IO7Hw7/BOOT/RAMDISK/file_contexts |
system_size = (int) 880803840 | system_size = (int) 880803840 | ||
tool_extensions = (str) device/lge/gproj-common/loki | tool_extensions = (str) device/lge/gproj-common/loki | ||
+ | update_rename_support = (str) 1 | ||
+ | use_set_metadata = (str) 1 | ||
userdata_size = (int) 6189744128 | userdata_size = (int) 6189744128 | ||
using device-specific extensions in device/lge/gproj-common/loki | using device-specific extensions in device/lge/gproj-common/loki | ||
+ | building image from target_files RECOVERY... | ||
+ | running: mkbootfs -f /tmp/targetfiles-IO7Hw7/META/recovery_filesystem_config.txt /tmp/targetfiles-IO7Hw7/RECOVERY/RAMDISK | ||
+ | running: minigzip | ||
+ | running: mkbootimg --kernel /tmp/targetfiles-IO7Hw7/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/tmpqXHTEZ --output /tmp/tmpnusL9e | ||
building image from target_files BOOT... | building image from target_files BOOT... | ||
− | running: mkbootfs -f /tmp/targetfiles- | + | running: mkbootfs -f /tmp/targetfiles-IO7Hw7/META/boot_filesystem_config.txt /tmp/targetfiles-IO7Hw7/BOOT/RAMDISK |
running: minigzip | running: minigzip | ||
− | running: mkbootimg --kernel /tmp/targetfiles- | + | running: mkbootimg --kernel /tmp/targetfiles-IO7Hw7/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/tmp9ZDVPb --output /tmp/tmpacEsTQ |
− | boot size ( | + | running: imgdiff -b /tmp/targetfiles-IO7Hw7/SYSTEM/etc/recovery-resource.dat /tmp/tmpEtQIYY /tmp/tmpOr0Lkg /tmp/tmpLlEOux |
+ | boot size (6991872) is 30.31% of limit (23068672) | ||
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt | 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/ | + | 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/tmpaMp5Dk /home/onno/android-cyanogenmod/out/target/product/e980/cm_e980-ota-07b5c31ed7.zip |
done. | done. | ||
− | Package Complete: /home/onno/android-cyanogenmod/out/target/product/e980/cm- | + | Package Complete: /home/onno/android-cyanogenmod/out/target/product/e980/cm-11-20150106-UNOFFICIAL-e980.zip |
==Referensi== | ==Referensi== |
Latest revision as of 20:20, 2 February 2015
Spesifikasi Hardware
Agar aman pada saat compile android,
- CPU - bisa kelas-kelas atom, tapi akan butuh 1 harian (24 jam) utk compile.
- Memory - sebesar mungkin
- Swap - akan butuh sekitar 4Gbyte, untuk RAM 2GByte.
Persiapan
Buang openjdk
sudo apt-get purge openjdk*
Update repo
sudo su echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 apt-get update
Instalasi oracle java7 (jangan menggunakan java8)
apt-get remove --purge oracle-java8* apt-get remove --purge oracle-java6* apt-get install oracle-java7-installer
Jika menggunakan java8 akan keluar error
************************************************************ You are attempting to build with an unsupported version of java. Your version is: java version "1.8.0_31". The correct version is: Java SE 1.6 or 1.7. Please follow the machine setup instructions at https://source.android.com/source/download.html ************************************************************
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 y
sudo apt-get install android-tools-adb android-tools-fastboot python-lunch
Siapkan perintah repo
mkdir -p ~/bin mkdir -p ~/android-cyanogenmod
curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
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"
Siapkan Folder Source
Buang manifests
cd ~/android-cyanogenmod/.repo rm -Rf manifests
repo sync ke folder source
cd ~/android-cyanogenmod/ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2 repo sync
atau
cd ~/android-cyanogenmod/ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 repo sync
atau
cd ~/android-cyanogenmod/ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0 repo sync
atau
cd ~/android-cyanogenmod/ repo init -u https://github.com/CyanogenMod/android -b cm-12.0 repo sync
Ambil prebuild apps
cd ~/android-cyanogenmod/system/vendor/cm ./get-prebuilts
Clean
Jika kita perlu membersihkan / clean build directory dapat menggunakan perintah
cd ~/android-cyanogenmod/ make clean
Build
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>
Edit roomservice.xml tampaknya tidak perlu dilakukan untuk CM 11.0.
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 G Pro F240K / geefhd
cd ~/android-cyanogenmod ~/android-cyanogenmod/vendor/cm/get-prebuilts cd ~/android-cyanogenmod . build/envsetup.sh lunch geefhd lunch f240k
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
default_system_dev_certificate = (str) build/target/product/security/testkey extfs_sparse_flag = (str) -s extra_recovery_keys = (str) build/target/product/security/cm build/target/product/security/cm-devkey build/target/product/security/bacon fs_type = (str) ext4 fstab = (dict) {'/sns': <common.Partition object at 0x2b27f7331410>, '/cache': <common.Partition object at 0x2b27f73311d0>, '/boot': <common.Partition object at 0x2b27f7331110>, '/system': <common.Partition object at 0x2b27f7331190>, '/persist': <common.Partition object at 0x2b27f7331250>, '/recovery': <common.Partition object at 0x2b27f7331150>, '/firmware': <common.Partition object at 0x2b27f73313d0>, '/data': <common.Partition object at 0x2b27f7331210>, '/factory': <common.Partition object at 0x2b27f7331450>} fstab_version = (int) 2 mkbootimg_args = (str) --ramdisk_offset 0x02000000 multistage_support = (str) 1 ota_script_path = (str) ./build/tools/releasetools/ota_from_target_files override_device = (str) e986,e980,geefhd,e988,gkatt recovery_api_version = (int) 2 recovery_size = (int) 23068672 selinux_fc = (str) /tmp/targetfiles-IO7Hw7/BOOT/RAMDISK/file_contexts system_size = (int) 880803840 tool_extensions = (str) device/lge/gproj-common/loki update_rename_support = (str) 1 use_set_metadata = (str) 1 userdata_size = (int) 6189744128 using device-specific extensions in device/lge/gproj-common/loki building image from target_files RECOVERY... running: mkbootfs -f /tmp/targetfiles-IO7Hw7/META/recovery_filesystem_config.txt /tmp/targetfiles-IO7Hw7/RECOVERY/RAMDISK running: minigzip running: mkbootimg --kernel /tmp/targetfiles-IO7Hw7/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/tmpqXHTEZ --output /tmp/tmpnusL9e building image from target_files BOOT... running: mkbootfs -f /tmp/targetfiles-IO7Hw7/META/boot_filesystem_config.txt /tmp/targetfiles-IO7Hw7/BOOT/RAMDISK running: minigzip running: mkbootimg --kernel /tmp/targetfiles-IO7Hw7/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/tmp9ZDVPb --output /tmp/tmpacEsTQ running: imgdiff -b /tmp/targetfiles-IO7Hw7/SYSTEM/etc/recovery-resource.dat /tmp/tmpEtQIYY /tmp/tmpOr0Lkg /tmp/tmpLlEOux 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/tmpaMp5Dk /home/onno/android-cyanogenmod/out/target/product/e980/cm_e980-ota-07b5c31ed7.zip done. Package Complete: /home/onno/android-cyanogenmod/out/target/product/e980/cm-11-20150106-UNOFFICIAL-e980.zip
Referensi
- http://forum.xda-developers.com/showthread.php?t=2404841
- http://bernaerts.dyndns.org/linux/74-ubuntu/245-ubuntu-precise-install-android-sdk
- http://wiki.cyanogenmod.org/w/Build_for_blade
Pranala Menarik
- Android
- Pemrogramman Android
- OS: Android - Mempersiapkan Development Environment
- OS: Android - Memeriksa Spesifikasi Handphone yang digunakan
- OS: Android - Membuat Mirror Source
- OS: Android - Download
- OS: Android - Membuat Folder untuk Bekerja
- OS: Android - Mirror Source
- OS: Android - Mirror Source AOKP
- OS: Android - Mirror Source CyanogenMod
- OS: Android - Build
- OS: Android - Build CyanogenMod
- OS: Android - Build AOSP