Building a ROM for Android on Ubuntu in Virtualbox

Similar documents
P6: Trial Build of a ROM Nikhil George. 1. Introduction. Overview of the build task. Cite the build/ wiki articles you read.

Android ROM Porting: A Review

Ingenic. Newton Android Development Guide

Project 1 Setup. Some relevant details are the output of: 1. uname -a 2. cat /etc/*release 3. whereis java 4. java -version 5.

WES 237A Project Part 1 Guide

DEVELOPMENT GUIDE VAB-630. Android BSP v

Mars ZX3 Android manual. Antmicro

Downloaded from: justpaste.it/io7w

Android Studio Setup Procedure

REX-RED Community Android 4.3

Building Tizen Development Environment

DEVELOPMENT GUIDE VAB-820. Android BSP v

The HiKey AOSP collaborative experience

Android. Separated Kernel build might break the Android build process. Toolchain

Tizen Project Guideline. SKKU Embedded Software Lab.

DEVELOPMENT GUIDE VIA VAB-820. Android BSP v

NanoPi K2. Introduction. Hardware Spec

Building Tizen Development Environment

Initial setting up of VPN Java version.

DEVELOPMENT GUIDE VAB-630. Linux BSP v

TEMPO INSTALLATION I O A. Platform Independent Notes 1. Installing Tempo 3. Installing Tools for the Plugins 5. v0.2.

DEVELOPMENT GUIDE AMOS-825. Android BSP v

User Guide Yocto Linux. Board Support Package For Intel Quark

Android beyond the smartphone

Android Debugging and Performance Analysis

Android AOSP Overview. Karthik Dantu and Steve Ko

Getting the Source Code

Embedded Linux. A Tour inside ARM's Kernel

Introduction to Linux

Git & Github Fundamental by Rajesh Kumar.

SCM-i.MX 6 Series Yocto Linux User's Guide

How To Install Java On Linux Ubuntu >>>CLICK HERE<<<

Install and Configure Ubuntu on a VirtualBox Virtual Machine

Zephyr Kernel Installation & Setup Manual

Introduction to Linux

Multicore Programming Handout 1: Installing GCC Cilk Plus

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Android Training. Lab Book. Free Electrons

Installing MediaWiki using VirtualBox

SAS Event Stream Processing for Edge Computing 4.3: Deployment Guide

Lab1 tutorial CS

Lab 6: OS Security for the Internet of Things

Lab 6: OS Security for the Internet of Things

Setting up Ubuntu with VirtualBox

ALTA DS 2 ARTiGO A900 VAB-1000

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

Customing Android: Looking inside the droids belly

Proview on Raspberry PI

Install and Configure wxwidgets on Ubuntu

Introduction of Linux

swiftenv Documentation

Android Sdk Setup For Windows 7 32 Bit Full Version

Complex Text Rendering

Android SDK under Linux

Installation Instructions

Installation Instructions

IT-G400 Series. Android 6.0 Quick Start Guide. This document is a Development Guide Book for IT-G400 application developers. Ver 1.

Cubieboard4 Linux Sdk Guide TF BOOT & TF WRITE EMMC. Website: Support:

Apache Tomcat Installation Guide [ Application : IVMS Base, Rich and Core Version ] [ Platform : 64 Bit Linux ] Tomcat Version: 6.0.

Introduction to Git and Github Repositories

The instructions in this document are applicable to personal computers running the following Operating Systems:

Manual Of Virtualbox Additions Ubuntu Server 12.04

Building CircuitPython

CS3210: Operating Systems

Android meets Docker. Jing Li

1. Install a Virtual Machine Download Ubuntu Create a New Virtual Machine Seamless Operation between Windows an Linux...

APEX Installation Guide. Sven van der Meer, Liam Fallon, John Keeney. Version SNAPSHOT, T16:01:13Z

CS260 Intro to Java & Android 02.Java Technology

Android Debugging and Performance Analysis

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Welcome to Kmax Installing Kmax

icancloud Quick Installation Guide

Zephyr 4.6 Installation on RedHat Enterprise 5/6 Linux 64-Bit

How to install Java Virtual Machine on Debian 7 GNU / Linux

INF322 Operating Systems

Android System Development Training 4-day session

Installation of the PLCnext Technology SDK and Eclipse

Getting Started With Cpsc (Advanced) Hosted by Jarrett Spiker

Dell EMC ME4 Series vsphere Client Plug-in

Tizen TCT User Guide

Addonics T E C H N O L O G I E S. mini NAS. Model: NAS25HDU Key Features

Developing Android applications in Windows

Root User Guide Android Jelly Bean Operating System

Introduction to Pintos. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Index. Alias syntax, 31 Author and commit attributes, 334

Oracle Communication Policy Controller. Lab Environment Preparation

INFO Object-Oriented Programming

Using Openembedded with Snapdragon Flight

User Guide. Android x86 Modified System. Sponsor: Huan Ren. Compiled by: Zachary Bair, Taronish Daruwalla, Joshua Duong, and Anthony Nguyen

Installation and setup guide of 1.1 demonstrator

JPA - INSTALLATION. Java version "1.7.0_60" Java TM SE Run Time Environment build b19

Manual Java Update Mac Developer Package

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Version control. what is version control? setting up Git simple command-line usage Git basics

Quick Start Guide to Compute Canada Cloud Service

Experiment Task Design:

Setting up the K70 with KDS

Operating Systems Lab 1. Class topic: Installation of the operating system. Install Ubuntu on Oracle VirtualBox

MV 4412 Android 4.0 Compilation

1. SUPPORT PLATFORMS 2. INSTALLATION GUIDE Install Android SDK

Transcription:

Building a ROM for Android on Ubuntu 14.04 in Virtualbox 1. Introduction a) Read AOSP Tour from "Embedded Android" Book b) Created Ubuntu 14.04 Virtual Machine with 2 CPUs, 5GB RAM and 200GB dynamic allocation virtual disk. c) Java was not installed in Ubuntu 14.04. d) Followed the instructions from https://source.android.com/source/index.html e) The source code was downloaded and did not use the komban's version f) The time taken to build was easily more than 7 hours ( started the build at around 10 AM and the process was still going on by 4.30 PM - did not measure after that) g) The disk usage was around 64 GB for downloading and building AOSP. 2. Setting up Environment: JAVA SETUP a) Download Oracle Java6 JDK and JRE from http://download.oracle.com b) Commands to install Java # mkdir /usr/local/java # cd /usr/local/java/ # mv /home/jevitha/downloads/jre-6u45-linux-x64.bin. # chmod +x jre-6u45-linux-x64.bin # ls -l jre-6u45-linux-x64.bin #./jre-6u45-linux-x64.bin # ls -l jre1.6.0_45/ # mv /home/jevitha/downloads/jdk-6u45-linux-x64.bin. # chmod +x jdk-6u45-linux-x64.bin #./jdk-6u45-linux-x64.bin c) Setting up JAVA in the path Add these in ~/.bashrc JAVA_HOME=/usr/local/java/jdk1.6.0_45 JRE_HOME=$JAVA_HOME/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH d) Test whether Java is installed properly by issuing java and javac commands. jevitha@jevitha-virtualbox:~$ java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) jevitha@jevitha-virtualbox:~$ javac -version javac 1.6.0_45 jevitha@jevitha-virtualbox:~$

ENVIRONMENT DETAILS jevitha@jevitha-virtualbox:~$ gcc -v Using built-in specs.... gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) jevitha@jevitha-virtualbox:~$ make -version GNU Make 3.81... 3. Setting up the required libraries Installed the libraries mentioned for ubuntu 14.04 as mentioned on https://source.android.com/source/initializing.html #sudo apt-get install bison g++-multilib git gperf libxml2-utils 4. Configuring USB Access a) As per the instructions on the https://source.android.com/source/initializing.html Create a file /etc/udev/rules.d/51-android.rules & copied the following lines into the file after changing the OWNER filed to the username on my machine. # adb protocol on passion (Nexus One) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="jevitha" # fastboot protocol on passion (Nexus One) SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="jevitha" # adb protocol on crespo/crespo4g (Nexus S) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="jevitha" # fastboot protocol on crespo/crespo4g (Nexus S) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="jevitha" # adb protocol on stingray/wingray (Xoom) SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="jevitha" # fastboot protocol on stingray/wingray (Xoom) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="jevitha" # adb protocol on maguro/toro (Galaxy Nexus) SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="jevitha" # fastboot protocol on maguro/toro (Galaxy Nexus) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="jevitha" # adb protocol on panda (PandaBoard) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="jevitha" # adb protocol on panda (PandaBoard ES) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="jevitha" # fastboot protocol on panda (PandaBoard)

SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="jevitha" # usbboot protocol on panda (PandaBoard) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="jevitha" # usbboot protocol on panda (PandaBoard ES) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="jevitha" # adb protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="jevitha" # fastboot protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="jevitha" # adb protocol on manta (Nexus 10) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="jevitha" # fastboot protocol on manta (Nexus 10) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="jevitha" 5. Did not setup ccache Since was mentioned as optional setup 6. Install Repo tool Make sure you have a bin/ directory in your home directory and that it is included in your path: $ mkdir ~/bin $ PATH=~/bin:$PATH Download the Repo tool and ensure that it is executable: $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo sha1sum on repo matched For version 1.21, the SHA-1 checksum for repo is b8bd1804f432ecf1bab730949c82b93b0fc5fede 7. Downloading sources $mkdir android $ cd android Run repo init to bring down the latest version of Repo with all its most recent bug fixes. $ repo init -u https://android.googlesource.com/platform/manifest Figured out the build number from https://source.android.com/source/build-numbers.html, under SOURCE CODE TAGS AND BUILDS section. To check out a branch other than "master", specify it with -b: $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.4_r1 $ repo sync 8. Initialize Build environment Initialize the environment with the envsetup.sh script $ source build/envsetup.sh or

root@jevitha-virtualbox:/usr/local/java/android#. build/envsetup.sh 9. Choose a Target Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g. root@jevitha-virtualbox:/usr/local/java/android# lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. mini_armv7a_neon-userdebug 6. mini_mips-userdebug 7. mini_x86-userdebug 8. aosp_grouper-userdebug 9. aosp_flo-userdebug 10. aosp_deb-userdebug 11. aosp_tilapia-userdebug 12. aosp_manta-userdebug 13. aosp_hammerhead-userdebug 14. aosp_mako-userdebug Which would you like? [aosp_arm-eng] Press Enter to choose this to build for the ARM emulator ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.4 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic HOST_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-32-generic-x86_64-with-Ubuntu-14.04-trusty

HOST_BUILD_TYPE=release BUILD_ID=KTU84P OUT_DIR=out... 10. Start the build root@jevitha-virtualbox:/usr/local/java/android# make -j16... error --- install flex... There were multiple errors at this time to install some missing packages: # apt-get install flex... The following NEW packages will be installed: flex libfl-dev... # apt-get install build-essential... The following NEW packages will be installed: build-essential dpkg-dev libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl... The following NEW packages will be installed: build-essential dpkg-dev libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl... root@jevitha-virtualbox:/usr/local/java/android# make -j16... /usr/local/java/android/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686- linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory make: *** [out/host/linux-x86/obj/static_libraries/libutils_intermediates/basichashtable.o] Error 1... error while loading shared libraries: libz.so.1 Quick lookup on google mentioned the following step to fix the libz.so.1 error: # apt-get install -y libc6:i386 libgcc1:i386 libstdc++6:i386 libz1:i386 # lunch # make -j16 Build success.

#emulator --- to load the emulator with the built image