Android Build System and Overview Karthik Dantu and Steve Ko.

Slides:



Advertisements
Similar presentations
Prashant Somashekar. What will we discuss? -Brief overview of a kernel -How a kernel fits into the hierarchy -Android versus Linux kernel -Building an.
Advertisements

This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Android architecture overview
Android Platform Overview (1)
Android: An Open Software Platform for Mobile Devices
Implementation of an Android Phone Based Video Streamer 2010 IEEE/ACM International Conference on Green Computing and Communications 2010 IEEE/ACM International.
APPFORUM2014 Helping the developer community build next-generation, multi-platform apps. SCHAUMBURG, ILLINOIS | SEPTEMBER 8-10.
DEPARTMENT OF COMPUTER ENGINEERING
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
© 2010 MindTree Limited CONFIDENTIAL: For limited circulation only Slide 1 CONFIDENTIAL: For limited circulation only An automaton that is created from.
Mobile Application Development
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Android Introduction Platform Overview.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
Mobile Application Development with ANDROID. Agenda Mobile Application Development (MAD) Intro to Android platform Platform architecture Application building.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Java Android-8 Imran Shafi. Lecture Contents  Debugging Android Projects  Java/XML Errors  Debugger  Logcat Utility  Android Debug Bridge (adb) 
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
CASE STUDY 1: Linux and Android Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Linux Architecture Overview 1. Initialization Uboot – hardware init, loads kernel Kernel – remaining initialization, calls “init” Init – 1 st process,
ANDROID BY:-AANCHAL MEHTA MNW-880-2K11. Introduction to Android Open software platform for mobile development A complete stack – OS, Middleware, Applications.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
Building Your Own Android Systems from Source Adam C. Champion CSE 5236: Mobile App Development 1.
1 Android Introduction Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Mobile Application Development with ANDROID Umang Patel(6537) LDCE.
Linux Architecture Overview.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
By Adam Reimel. Outline Introduction Platform Architecture Future Conclusion.
Android. Android An Open Handset Alliance Project A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google.
PhoneGap. web-based mobile development framework, based on the open-source Cordova project. use standard web technologies such as HTML5, CSS3, and JavaScript.
Android Overview Reference: Embedded Android by Yaghmour.
Introduction to Android Programming
Computer System Structures
Mobile Device Development
Android Mobile Application Development
Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5.
Android Kernel Extensions
Advanced Computer Systems Lab
Karthik Dantu and Steve Ko
Welcome to Linux Chap#1 Hanin Abdulrahman.
Chapter 2: Operating-System Structures
chapter 6- Android Introduction
Android.
CASE STUDY 1: Linux and Android
Android: Modding & Hacking whitone 2012/12/12.
CMPE419 Mobile Application Development
Building Android OS Topics: Building Android and Kernel
Application Development A Tutorial Driven Course
John D. McGregor Module 0 Session 2 Infrastructure and problem
Cordova & Cordova Plugin Installation and Management
Android Developer Fundamentals V2
Linux Architecture Overview.
Korea Software HRD Center
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Welcome to Linux Chap#1 Hanin Abdulrahman.
Welcome to Linux Chap#1.
CMPE419 Mobile Application Development
Building Your Own Android Systems from Source
Presentation transcript:

Android Build System and Overview Karthik Dantu and Steve Ko

Administrivia Show us your CyanogenMod! Any issues in building? Post your comments for both papers.

Android Build System & Source Tree Today’s goal Getting to know the build system Navigating the source tree Resources /build/core/build- system.html “Embedded Android” by Karim Yaghmour Other sources: “Android Building” google groups

Git & Repo AOSP is a set of repositories, each individually managed by git. If you don’t know git, please go find out! repo is a tool that manages multiple git repositories..repo directory: management files It’s actually another git repository. repo init: just clones this repository. repo sync: clones other repositories based on manifest.xml file.

Try Out! You might need to add your own repository for your project. $ cd.repo $ ls –al $ cd manifests $ vi default.xml (vi or whatever editor) $ git branch -a

Build Targets Build name + build type (eng, user, & userdebug) Generates different builds for different purposes eng: produces an “engineering” build. user: produces a release build. userdebug: produces a release build plus some limited debugging support. Sets different system properties. getprop, setprop property_get(), property_set()

Build Targets eng adb enabled and runs as root by default (ro.secure=0) DDMS & debugger connection enabled (ro.debuggable=1) user adb disabled by default & no debugging userdebug adb enabled (does not run as root) & debugging support

Try Out! You might want to define system-wide properties. $ adb shell getprop $ adb shell getprop ro.secure $ adb shell getprop ro.debuggable

Build Environment Useful commands after source-ing build/envsetup.sh croot: cd to the source root. m: make from the source root. mm: make in the current module. mmm: make what’s specified. cgrep, jgrep, mgrep: grep in C, Java, and Makefiles. godir: go to a directory that contains a file. (If you run it, it will index first.) printconfig: prints out the current configuration.

Try Out! $ godir Android.mk

Make System Combines Build configuration (build/envsetup.sh & lunch) Core.mk files (build/core/main.mk, build/core/config.mk, build/core/definitions.mk, build/core/Makefile, etc.) Product descriptions (AndroidProducts.mk &.mk for the specific product) Board description (BoardConfig.mk) files Module description (Android.mk) files

Make Targets make showcommands: shows all the make commands as it goes on. (good for debugging) make clobber: the cleanest removal. make modules: shows all modules that can be built individually. make : builds just that module. Android.mk: Makefile for a module. LOCAL_MODULE is the target name for a module

Try Out! $ make modules $ cd dalvik/dalvikvm $ vi Android.mk

Source Tree abi: C/C++ Application Binary Interface bionic: Android’s C library bootable: Things related to booting (bootloader, installer, etc.) build: Build tools and makefiles cts: Compatibility Test Suite dalvik: Dalvik VM developers: Code samples

Source Tree development: Tools, scripts, files related to development (e.g., emulator, ndk, & sdk) device: Device-specific files docs: source.android.com docs external: various tools/libraries from external sources (other open source projects) frameworks: the Android framework Especially, base & base/core (android.* & com.google.*)

Source Tree hardware: Hardware support libraries, e.g., Wi-Fi, framebuffers, etc. libcore: Core Java libraries (java.*) mostly from Apache Harmony VM libnativehelper: Helper functions written in C/C++ ndk: Native Development Kit packages: Essential APKs that gets installed, e.g., Browser, Phone, ContactsProvider, etc. pdk: Platform Development Kit

Source Tree prebuilts: Prebuilt tools for compiling (mainly for cross-compiling) sdk: Software Development Kit system: Core system tools and libraries, e.g., adb, fastboot, sh, init, logcat, wlan, liblog, & libcutils. tools: Other external tools vendor: Vendor-specific files

File System Structure /boot: kernel image and ramdisk /system: the Android system /recovery: recovery image & space for the recovery mode /data: user data, e.g., apps (/data/app & /data/data/ ), contacts, etc. /cache: space for caching (apps can also use this space.) /misc: space for system settings /sdcard: internal SD card (symlinked to /mnt/sdcard)

Other Pseudo File Systems cgroup: “Control Group” for kernel parameters /proc/cgroups procfs: kernel live data, e.g., parameters, processes... /proc sysfs: kernel objects, e.g., devices, FSes, modules,… /sys tmpfs: devices available /dev

Try Out! $ adb shell df

Architecture Apps System Services Activity Manager Location Manager… Java Libraries android.* java.* Dalvik, Zygote, Android Rumtime APIs JNI Native LibrariesDaemonsHALTools Linux Kernel with Android Extensions (Wakelocks, Binder, lowmem, etc.)

Daemons adbd: adb daemon vold: volume manager daemon rild: radio interface layer daemon app_process: Zygote servicemanager: manager for all services

Kernel Extensions wakelocks lowmem handler Binder ashmem (Anonymous Shared Memory) Logger