[Android Software Development] raffaeu:
Build the basic ROM

Unfortunately the information related to our ROM and SDK are still available only in Chinese, that's why with this project on XDA we are willing to make a translation of all the necessary resources needed to develop for OXY.

In this specific post I am going through the creation of a development environment using Ubuntu 12 LT which in my case is hosted on Windows Azure Asia Servers so that the download from GIT is faster and more reliable. At the end you will have the basic IWOP image built. IWOP is a the custom Android ROM built by Ingenic which runs on our Hardware.

Resource location

The resources are available at the website of Ingenic, the official page which is visible from outside China and supported also by OXY also: http://iwop.ingenic.com/zh-cn/. We are actively working on translating the website in English-US so that in the future the IWOP SDK will be available in full English.

First step you need to download the REPO TOOL and the GIT structure. To make this job easier we have created a custom folder containing the entire repo which is available on Google Drive. We have also the full source code (~25GB) available for download in case you cannot download from our Chinese mirror.

In order to avoid unfriendly behaviors from competitors and in order to avoid to run out of bandwidth, the Google Drive is shared only with the active members of the OXY Development Program, just drop me a PVT if you are willing to join the project.

Once the REPO structure is downloaded and unzipped, you will end up with the following folder of almost 5GB in size:

[IMG="ELF V 1.0 repository"]http://snag.gy/Ts0yj.jpg[/IMG]

Now you are ready to compile ELF. ELF is a custom version of Android built by Ingenic to work on their CPU architecture and on their hardware. The ROM is quite stable and it has already a rich set of API available through their SDK to work directly on OXY SmartWatches and in the future with OXY SmartPhones.

Now run a sync with the local repository:

$ .repo/repo/repo sync --local-only

Second step, in order to download the full-source you need an SSH account from us.

Again, in order to avoid problems of bandwidth at this stage of the project we will grant SSH files and accounts only to users that are joining the dev program

Then you can run a sync against the Ingenic GIT repository and download the entire source code:

$ .repo/repo/repo init -u ssh://[account]@oxytechs.com:29418/elf/manifests.git -b release-4.3 -m elf.xml

And synchronize

$ .repo/repo/repo sync --current-branch --no-tags

Beware that if your machine is not in ASIA the first synchronization is very slow, the full source is between 20~24GB

Configure the Development Machine

Install the SDK 1.6

The correct SDK for ELF is available at this address: http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html

Then you have to register the SDK in your PATH using:

export JAVA_HOME=/work/soft/jdk1.6.0_33
export PATH=$PATH:$JAVA_HOME/bin

Finally you can verify that the SDK is correctly installed by typing:

$java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

Download the ELF SDK available on our Google Drive

Then register the SDK on your environment:

export ANDROID_HOME=~/work/soft/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/build-tools

Download the Linux NDK available on our Google Drive

Then register the NDK:

export NDK_HOME=~/work/soft/android-ndk-r10
export PATH=$PATH:$NDK_HOME

Prepare Ubuntu for Build Android

If you machine is new and you never built Android SDK before, you need to install also these packages in the correct order and Do not upgrade these packages

$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
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

Build

Finally you can build ELF for OXY using the following commands:

SQUARE

./build/smk.sh --preset=aw808_v11_wisesquare_iwop

ROUND

./build/smk.sh --preset=aw808_v11_naturalround_iwop

You will end up with the following files which are the ELF ROM for OXY.

u-boot-with-spl-mbr-gpt.bin、 boot.img、 system.img、 recovery.img

Now you are ready to: customize the ROM, customize the Home launcher, create new apps for OXY

In the next post we will write the basics of how to create an Android App for OXY SmartWatch and how to upload the app on our Cloud using REST