We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:c1_building_android [2015/12/31 14:29]
odroid [Download]
en:c1_building_android [2016/10/25 17:21] (current)
codewalker [Android kitkat]
Line 2: Line 2:
 This page will introduce you how you can download and build Android source tree to customize it for your usage. This page will introduce you how you can download and build Android source tree to customize it for your usage.
 <WRAP center round important 60%> <WRAP center round important 60%>
-If you have not built Android on your desktop yet, please read Android'​s official build environment set up guide [[https://​source.android.com/​source/​initializing.html]] carefully before your proceed. Otherwise, you would have unexpected errors and exhaust to read quite long and complcated ​build log to find the problem.+If you have not built Android on your desktop yet, please read Android'​s official build environment set up guide [[https://​source.android.com/​source/​initializing.html]] carefully before your proceed. Otherwise, you would have unexpected errors and exhaust to read quite long and complicated ​build log to find the problem. ​Also note that you need around 100GB of free space in your storage to get the full source code and binary space. At least 8GB of RAM is required. \\ 
 +Android 5.x (Lollipop) build needs the OpenJDK 7 not the Oracle-Java-JDK.\\ 
 +[[https://​source.android.com/​source/​requirements.html]]
 </​WRAP>​ </​WRAP>​
 ===== Toolchain ===== ===== Toolchain =====
Line 12: Line 14:
 ===== Checkout full source code ===== ===== Checkout full source code =====
 This command will initiate to download Android source tree for **ODROID-C1**. This command will initiate to download Android source tree for **ODROID-C1**.
 +==== Android kitkat ====
 +=== 4.4.2 v3.2 ==
 <​code>​ <​code>​
 $ mkdir odroid-c1 $ mkdir odroid-c1
 $ cd odroid-c1 $ cd odroid-c1
 $ repo init -u https://​github.com/​hardkernel/​android.git -b s805_4.4.2_master $ repo init -u https://​github.com/​hardkernel/​android.git -b s805_4.4.2_master
 +$ repo sync
 +</​code>​
 +=== 4.4.4 v3.3 ==
 +<​code>​
 +$ mkdir odroid-c1
 +$ cd odroid-c1
 +$ repo init -u https://​github.com/​hardkernel/​android.git -b s805_4.4.4_master
 +$ repo sync
 +</​code>​
 +==== Android lollipop ====
 +<​code>​
 +$ mkdir odroid-c1
 +$ cd odroid-c1
 +$ repo init -u https://​github.com/​hardkernel/​android.git -b s805_5.1.1_master
 $ repo sync $ repo sync
 </​code>​ </​code>​
Line 23: Line 41:
   * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_kernel|Toolchain for Kernel]]   * [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_building_kernel|Toolchain for Kernel]]
 There is no specific build script for **ODROID-C1**,​ instead it supports generic build step what AOSP does as below. There is no specific build script for **ODROID-C1**,​ instead it supports generic build step what AOSP does as below.
 +
 +==== Android Kitkat ====
 <​code>​ <​code>​
 +$ export ARCH=arm
 +$ export CROSS_COMPILE=arm-linux-gnueabihf-
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/​bin/:​$PATH
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-none-eabi-4.8-2014.04_linux/​bin:​$PATH
 +$ export JAVA_HOME=/​usr/​lib/​jvm/​java-6-oracle
 +$ export PATH=$JAVA_HOME/​bin:​$PATH
 $ source build/​envsetup.sh $ source build/​envsetup.sh
 $ lunch odroidc-eng $ lunch odroidc-eng
 $ make -j4 $ make -j4
 </​code>​ </​code>​
 +
 +==== Android Lollipop ====
 +<​code>​
 +$ export ARCH=arm
 +$ export CROSS_COMPILE=arm-linux-gnueabihf-
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/​bin/:​$PATH
 +$ export PATH=/​opt/​toolchains/​gcc-linaro-arm-none-eabi-4.8-2014.04_linux/​bin:​$PATH
 +$ export JAVA_HOME=/​usr/​lib/​jvm/​java-1.7.0-openjdk-amd64
 +$ export PATH=$JAVA_HOME/​bin:​$PATH
 +$ source build/​envsetup.sh
 +$ lunch odroidc-eng
 +$ make -j4
 +</​code>​
 +
 You can replace the number on the command **make** for simultaneous compile as much as number of core on your build machine. But it should not to exceed 16, otherwise build would stop with an error. You can replace the number on the command **make** for simultaneous compile as much as number of core on your build machine. But it should not to exceed 16, otherwise build would stop with an error.
 ===== Download ===== ===== Download =====
Line 33: Line 73:
 ==== Boot loader ==== ==== Boot loader ====
 <​code>​ <​code>​
-sudo fastboot flash bootloader out/​target/​product/​odroidc/​u-boot.bin+$ fastboot flash bootloader out/​target/​product/​odroidc/​u-boot.bin
 </​code>​ </​code>​
 ==== Linux kernel ==== ==== Linux kernel ====
 <​code>​ <​code>​
-sudo fastboot flash dtb out/​target/​product/​odroidc/​meson8b_odroidc.dtb +$ fastboot flash dtb out/​target/​product/​odroidc/​meson8b_odroidc.dtb 
-sudo fastboot flash boot out/​target/​product/​odroidc/​kernel+$ fastboot flash boot out/​target/​product/​odroidc/​kernel
 </​code>​ </​code>​
 ==== Android ==== ==== Android ====
 These three files contains Linux utilities, Android frameworks and pre-installed Android applicatioins as well as necessary files to run Android. These three files will be flash into its own partition dedicated, please find [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_partition_table#​android_partition_table|the partition table]] pre-defined for each partition'​s size. These three files contains Linux utilities, Android frameworks and pre-installed Android applicatioins as well as necessary files to run Android. These three files will be flash into its own partition dedicated, please find [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c1_partition_table#​android_partition_table|the partition table]] pre-defined for each partition'​s size.
 +
 +=== KitKat ===
 <​code>​ <​code>​
-sudo fastboot flash system out/​target/​product/​odroidc/​rootsystem.img +$ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img 
-sudo fastboot flash userdata out/​target/​product/​odroidc/​userdata.img +$ fastboot flash userdata out/​target/​product/​odroidc/​userdata.img 
-sudo fastboot flash cache out/​target/​product/​odroidc/​cache.img+fastboot flash cache out/​target/​product/​odroidc/​cache.img 
 +</​code>​ 
 + 
 +=== Lollipop === 
 +<​code>​ 
 +$ fastboot flash system out/​target/​product/​odroidc/​rootsystem.img 
 +fastboot flash cache out/​target/​product/​odroidc/​cache.img
 </​code>​ </​code>​
 ==== Misc ==== ==== Misc ====
 These file are not mandatory for Android to use, but useful for further features. **recovery.img** helps you to update Android system, **ODROID-C1** use this for installatioin. **hardkernel-720.bmp** is to show a logo on your HDMI display on boot and disappear when Android display subsystem is initiated. These file are not mandatory for Android to use, but useful for further features. **recovery.img** helps you to update Android system, **ODROID-C1** use this for installatioin. **hardkernel-720.bmp** is to show a logo on your HDMI display on boot and disappear when Android display subsystem is initiated.
 +
 +=== Kikkat ===
 <​code>​ <​code>​
-sudo fastboot flash recovery out/​target/​product/​odroidc/​recovery.img +$ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img 
-sudo fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp+$ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp 
 +</​code>​ 
 + 
 +=== Lollipop === 
 +<​code>​ 
 +$ fastboot flash recovery out/​target/​product/​odroidc/​recovery.img 
 +$ fastboot flash logo out/​target/​product/​odroidc/​hardkernel-720.bmp.gz
 </​code>​ </​code>​
 ===== How to create Android bootable media with empty MicroSD/​eMMC ===== ===== How to create Android bootable media with empty MicroSD/​eMMC =====
Line 61: Line 117:
 $ make selfinstall $ make selfinstall
 </​code>​ </​code>​
 +==== Using Updatepackage.zip ====
 +**out/​target/​product/​odroidc/​updatepackage-odroidc-signed.zip**.
 +<​code>​
 +$ make updatepackage
 +</​code>​
 +Copy updatepackage-odroidc-signed.zip via USB mass storage and run ODROID Utility and Select "​Package install from storage"​.
 ===== FAQ ===== ===== FAQ =====
 ==== How can I get into fastboot mode to download Android images ==== ==== How can I get into fastboot mode to download Android images ====
en/c1_building_android.1451541585.txt.gz · Last modified: 2015/12/31 14:29 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0