SlideShare a Scribd company logo
How to Customize Android Framework&System
Noritsuna Imamura
noritsuna@siprop.org

©SIProp Project, 2006-2008

1
Agenda
How to Customize Android Framework&System
Add Own API to Android Framework&System
Make Own SDK

©SIProp Project, 2006-2008

2
About Android
Android Framework has 3 Layer Stack for
SmartPhone & Tablet PC.
Application Framework Layer (Java)
Library Layer (Linux C/C++)
Kernel/Driver Layer (Linux Kernel C/ASM)

©SIProp Project, 2006-2008

3
Structure of out dir
target/common/obj/
APPS
APK

JAVA_LIBRARIES
API

PACKAGING
Files Nothing...

target/product/flo/
boot.img
kernel
ramdisk.img
root

ramdisk-recovery.img
recovery.img
recovery

system.img
system

userdata.img
data

cache.img
cache

©SIProp Project, 2006-2008

4
What’s Fastboot?
Fastboot is ROM Manager for eMMC.
eMMC is managed by Address in Low Lovel.
When you write your Kernel, you MUST point kernel address.
If you mistake kernel address, your system is broken…

Separated by
Address

©SIProp Project, 2006-2008

5
About Android Source Code
packages
App for Android

frameworks
Lib for Android Apps

system
Sys Lib for Framework

docs
Java Doc for Android

developers
Sample, Demos

build
Tool for Android Build

prebuilts
Toolchain

sdk
Android SDK

ndk
Native SDK

pdk
for 3rd Party SDK

cts
Compatibility Test

tools
Tools for External 2006-2008
©SIProp Project,

6
About Android Source Code
external
Linux Lib

libcore
Lib for Android

bionic
libc for Android

device
Diff for Devices

hardware
Drivers

bootable
BootLoader

libnativehelper
Helper for JNI

abi
Application Binary Interface

dalvik
Java VM

art
Next Generation VM

©SIProp Project, 2006-2008

7
Customized Android System(ROM)

©SIProp Project, 2006-2008

8
What’s Nexus7?
Target
Tablet
Nexus7(2013)
http://www.google.com/
nexus/7/

OS
JCROM
With Build Manual
https://sites.google.com/
site/jcromproject/

©SIProp Project, 2006-2008

9
Customized UI/UX
Modify Android System
View
Animation
SystemUI
Home
Widget
Notification
Settings
etc…

©SIProp Project, 2006-2008

10
Application Framework Layer
APIs
App Components
User Interface
App Resources
Animation and
Graphics
Computation
Media and Camera
Location and Sensors
Connectivity
Text and Input

Data Storage
Administration
Web Apps
Best Practices

©SIProp Project, 2006-2008

11
How to Develop?
ADT
Standard Android
Application
Only Java on Application
Framework Layer

Advantage
Use All Android Tools
Many Docs from Google
Developer Site & Blogs

Call Stack
APK File(Your Application)
(Java)
Call as Java API

Application Framework
Layer (Java)
Call as JNI(C/C++)

Library Layer
(C/C++)
Call as SysCall(C/ASM
Kernel/Driver Layer
(C/ASM)Project, 2006-2008
©SIProp

12
How to Develop?
NDK w/ADT
Standard Android
Application for C/C++
Java on Application
Framework Layer
C/C++ on Limited Library
Layer

Call Stack
APK File(Your Application)
(Java & C/C++)
Call as Java API

Application Framework
Layer (Java)
Call as JNI(C/C++)

Advantage
Use Java&C/C++

Dis-Advantage
Must Use UI Framework
on Java Layer

Library Layer
(C/C++)
Call as SysCall(C/ASM
Kernel/Driver Layer
(C/ASM)Project, 2006-2008
©SIProp

13
How to Add New APIs

©SIProp Project, 2006-2008

14
Application Framework Layer
Packages by Android Framework
android.accessibilityservice
android.accounts
android.animation
android.app
android.app.admin
android.app.backup
android.appwidget
android.bluetooth
android.content
android.content.pm
android.content.res
android.database
android.database.sqlite
android.drm
android.gesture
android.graphics
android.graphics.drawable
android.graphics.drawable.shapes
android.graphics.pdf
android.hardware
android.hardware.display
android.hardware.input
android.hardware.location
android.hardware.usb
android.inputmethodservice
android.location
android.media
android.media.audiofx
android.media.effect
android.mtp
android.net

android.net
android.net.http
android.net.nsd
android.net.rtp
android.net.sip
android.net.wifi
android.net.wifi.p2p
android.net.wifi.p2p.nsd
android.nfc
android.nfc.cardemulation
android.nfc.tech
android.opengl
android.os
android.os.storage
android.preference
android.print
android.print.pdf
android.printservice
android.provider
android.renderscript
android.sax
android.security
android.service.dreams
android.service.notification
android.service.textservice
android.service.wallpaper

android.speech
android.text
android.speech.tts
android.text.format
android.support.v13.app
android.text.method
android.support.v4.accessibilityservice android.text.style
android.support.v4.app
android.text.util
android.support.v4.content
android.transition
android.support.v4.content.pm
android.util
android.support.v4.database
android.view
android.support.v4.graphics.drawable android.view.accessibility
android.support.v4.hardware.display
android.view.animation
android.support.v4.media
android.view.inputmethod
android.support.v4.net
android.view.textservice
android.support.v4.os
android.webkit
android.support.v4.print
android.widget
android.support.v4.text
dalvik.bytecode
android.support.v4.util
dalvik.system
android.support.v4.view
android.support.v4.view.accessibility
android.support.v4.widget
android.support.v7.app
android.support.v7.appcompat
android.support.v7.gridlayout
android.support.v7.media
android.support.v7.mediarouter
android.support.v7.view
android.support.v7.widget
android.support.v8.renderscript
android.telephony
android.telephony.cdma
android.telephony.gsm
android.test
android.test.mock
15
©SIProp Project, 2006-2008
android.test.suitebuilder
Goal
Add “Calculator” API into Android System
Package Name: itri.lecture
Class Name: Cal
Method
int add(int, int)
int sub(int, int)

Android System
Nexus7
AOSP based Android 4.3.1

©SIProp Project, 2006-2008

16
Source Code of MyAPI
Java
itri.lecture.Cal.java
Main Program
1. package itri.lecture;
2. public class Cal {
3.
public Cal() {}
4.
public static int add(int a, int b) {return a+b;}
5.
public
int sub(int a, int b) {return a-b;}
6. }

package.html, package-info.java
Appoint about Build Target Dir
1. <HTML><BODY>
2. MyAPI Test Class.
3. </BODY></HTML>
4. package itri.lecture;
©SIProp Project, 2006-2008

17
Makefile of MyAPI
Android.mk
Makefile for Android
BUILD_JAVA_LIBRARY => Make .jar Package
BUILD_SHARED_LIBRARY => Make .so Package
BUILD_STATIC_LIBRARY => Make .a file
BUILD_EXECUTABLE => Make ELF file (Executable file)
BUILD_DROIDDOC => Make JavaDoc
›

LOCAL_PATH := $(call my-dir)

›

include $(CLEAR_VARS)

›
›
›
›
›

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core framework
LOCAL_JAVACFLAGS := $(local_javac_flags)
LOCAL_MODULE := myapi

›

include $(BUILD_JAVA_LIBRARY)

©SIProp Project, 2006-2008

18
Makefile of MyAPI
Common.mk
Used by Other .mk file besides MyAPI’s .mk .
Ex. Framework Base’s Android.mk
›
›
›
›

# List of source to build into the myapi
#
core-myapi-files := 
src/itri/lecture/Cal.java

›
›
›
›
›
›

# List of junit javadoc source files for Android public API
#
# $(1): directory for search (to support use from frameworks/base)
define myapi_to_document
$(core-myapi-files)
endef

CleanSpec.mk
Newer Clean steps must be at the end of the list.
©SIProp Project, 2006-2008

19
build/envsetup.sh
Helper Command Lib for Android Build
m

jgrep
Build from Top Dir

mm
Build from Current Dir

mmm [Target Dir]
Build from Target Dir

croot
Change Top Dir

Grep for Java Source
Code

resgrep
Grep for XML Source
Code

lunch
Choose Target Build

cgrep
Grep for C/C++ Source Code

©SIProp Project, 2006-2008

20
Setup Source Code of MyAPI
Copy to “framework” Directory

“framework/base” Directory

“framework/base/core” Directory

©SIProp Project, 2006-2008

21
Application Framework Layer
Packages by Android Framework
android.accessibilityservice
android.accounts
android.animation
android.app
android.app.admin
android.app.backup
android.appwidget
android.bluetooth
android.content
android.content.pm
android.content.res
android.database
android.database.sqlite
android.drm
android.gesture
android.graphics
android.graphics.drawable
android.graphics.drawable.shapes
android.graphics.pdf
android.hardware
android.hardware.display
android.hardware.input
android.hardware.location
android.hardware.usb
android.inputmethodservice
android.location
android.media
android.media.audiofx
android.media.effect
android.mtp
android.net

android.net
android.net.http
android.net.nsd
android.net.rtp
android.net.sip
android.net.wifi
android.net.wifi.p2p
android.net.wifi.p2p.nsd
android.nfc
android.nfc.cardemulation
android.nfc.tech
android.opengl
android.os
android.os.storage
android.preference
android.print
android.print.pdf
android.printservice
android.provider
android.renderscript
android.sax
android.security
android.service.dreams
android.service.notification
android.service.textservice
android.service.wallpaper

android.speech
android.text
android.speech.tts
android.text.format
android.support.v13.app
android.text.method
android.support.v4.accessibilityservice android.text.style
android.support.v4.app
android.text.util
android.support.v4.content
android.transition
android.support.v4.content.pm
android.util
android.support.v4.database
android.view
android.support.v4.graphics.drawable android.view.accessibility
android.support.v4.hardware.display
android.view.animation
android.support.v4.media
android.view.inputmethod
android.support.v4.net
android.view.textservice
android.support.v4.os
android.webkit
android.support.v4.print
android.widget
android.support.v4.text
dalvik.bytecode
android.support.v4.util
dalvik.system
android.support.v4.view
android.support.v4.view.accessibility
android.support.v4.widget
android.support.v7.app
android.support.v7.appcompat
android.support.v7.gridlayout
android.support.v7.media
android.support.v7.mediarouter
android.support.v7.view
android.support.v7.widget
android.support.v8.renderscript
android.telephony
android.telephony.cdma
android.telephony.gsm
android.test
android.test.mock
22
©SIProp Project, 2006-2008
android.test.suitebuilder
Add MyAPI’s Source Code Path
frameworks/base/Android.mk
Base System for Framework(API)
›
›
›
›
›
›

# Common sources for doc check and api check
common_src_files := 
$(call find-other-html-files, $(html_dirs)) 
$(addprefix ../../libcore/, $(call libcore_to_document,
$(LOCAL_PATH)/../../libcore)) 
$(addprefix ../../external/junit/, $(call junit_to_document,
$(LOCAL_PATH)/../../external/junit)) 
$(addprefix ../../frameworks/myapi/, $(call myapi_to_document,
$(LOCAL_PATH)/../../frameworks/myapi))

›
›

# include definition of junit_to_document
include external/junit/Common.mk

›
›

# include definition of myapi_to_document
include frameworks/myapi/Common.mk
©SIProp Project, 2006-2008

23
Set Target Product
build/target/product/mini.mk
build/target/product/core.mk
1. # Base modules (will move elsewhere,
previously user tagged)
2. PRODUCT_PACKAGES += 
3.
20-dns.conf 
4.
95-configured 
5.
am 
6.
myapi 

©SIProp Project, 2006-2008

24
Set Class Path
system/core/rootdir/init.rc
1.

export BOOTCLASSPATH
/system/framework/core.jar:/system/framework/corejunit.jar:/system/framework/bouncycastle.jar:/system/fram
ework/ext.jar:/system/framework/framework.jar:/system/fr
amework/telephony-common.jar:/system/framework/voipcommon.jar:/system/framework/mmscommon.jar:/system/framework/android.policy.jar:/system/
framework/services.jar:/system/framework/apachexml.jar:/system/framework/myapi.jar

build/core/dex_preopt.mk
1.
2.

# TODO: replace it with device's BOOTCLASSPATH
DEXPREOPT_BOOT_JARS := core:corejunit:bouncycastle:ext:myapi:framework:
©SIProp Project, 2006-2008

25
Make OTA image
Make OTA image
This OTA image is update image for Android.

›
›
›
›

cd ~/nexus_work/android/
source build/envsetup.sh
lunch aosp_flo-user
make otapackage

This file name is
aosp_flo-ota-eng.[your Linux’s User name].zip

©SIProp Project, 2006-2008

26
What’s Android OTA-Package
Android OTA-Package has ROM images.
boot.img
Kernel, Init, Minimam Linux

recovery.img
Recovery Manager Program

system.img
Android System

userdata.img
User Data

Separated by
Address
©SIProp Project, 2006-2008

27
How to Use New APIs

©SIProp Project, 2006-2008

28
No API on SDK…

©SIProp Project, 2006-2008

29
Setup API Version for MyAPI 1/2
development/sdk/api-versions.xml
1.
2.
3.
4.
5.

<class name="itri/lecture/Cal"
since="18">
<method name="&lt;init>()V" />
<method name="add(II)I" />
<method name="sub(II)I" />
</class>

©SIProp Project, 2006-2008

30
Setup API Version for MyAPI 2/2
prebuilts/sdk/api/18.txt
1. package itri.lecture {
2. public class Cal {
3.
ctor public Cal();
4.
method public int add(int, int);
5.
method public static int sub(int, int);
6. }
7. }

©SIProp Project, 2006-2008

31
Setup JavaDoc
build/core/droiddoc.mk
1.
2.
3.
4.

5.
6.
7.
8.
9.

10.

ifneq ($(LOCAL_SDK_VERSION),)
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
# Use android_stubs_current if LOCAL_SDK_VERSION is current and no
TARGET_BUILD_APPS.
LOCAL_JAVA_LIBRARIES := android_stubs_current
$(LOCAL_JAVA_LIBRARIES)
else
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION)
$(LOCAL_JAVA_LIBRARIES)
endif
else
LOCAL_JAVA_LIBRARIES := core ext framework myapi
$(LOCAL_JAVA_LIBRARIES)
endif # LOCAL_SDK_VERSION

©SIProp Project, 2006-2008

32
Make MySDK
Make MySDK
›
›
›
›

cd ~/nexus_work/android/
source build/envsetup.sh
lunch sdk-eng
make sdk

This file name is
android-sdk_eng.[your Linux’s User name]_linux-x86.zip

©SIProp Project, 2006-2008

33
How to Use New APIs

©SIProp Project, 2006-2008

34
Copy SDK to your Environment
“sdk/platforms/android-4.3.1”
to your “sdk/platforms/”

©SIProp Project, 2006-2008

35

More Related Content

What's hot

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
zeelpatel0504
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
Emertxe Information Technologies Pvt Ltd
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
Opersys inc.
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
Zafar Shahid, PhD
 
Android Internals
Android InternalsAndroid Internals
Android Internals
Opersys inc.
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
Gary Bisson
 
Low Level View of Android System Architecture
Low Level View of Android System ArchitectureLow Level View of Android System Architecture
Low Level View of Android System Architecture
National Cheng Kung University
 
History and development of Android OS
History and development of Android OSHistory and development of Android OS
History and development of Android OS
usernameleon
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
Emertxe Information Technologies Pvt Ltd
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
Opersys inc.
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
Jimmy Software
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
Naresh Chintalcheru
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
Emertxe Information Technologies Pvt Ltd
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
Nanik Tolaram
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
Emertxe Information Technologies Pvt Ltd
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentationconnectshilpa
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
Emertxe Information Technologies Pvt Ltd
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
Yi-Hsiang Huang
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
Opersys inc.
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
Opersys inc.
 

What's hot (20)

Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Low Level View of Android System Architecture
Low Level View of Android System ArchitectureLow Level View of Android System Architecture
Low Level View of Android System Architecture
 
History and development of Android OS
History and development of Android OSHistory and development of Android OS
History and development of Android OS
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 

Similar to How to Customize Android Framework&System

Android
Android Android
Android
Nishant Jain
 
Business management application
Business management applicationBusiness management application
Business management application
Pritam Tirpude
 
Andriod
Andriod Andriod
Andriod
Chayan Upadhyay
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
letuan9999
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
Konstantin Rybas
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
Bhavya Siddappa
 
Android
AndroidAndroid
Android
aktash12
 
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
ijafrc
 
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
Amit Sheth
 
Software training report
Software training reportSoftware training report
Software training report
Natasha Bains
 
1 introduction of android
1 introduction of android1 introduction of android
1 introduction of android
akila_mano
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
amitgb
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principlesHenk Laracker
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
BigData_Europe
 
Android : Architecture & Components
Android : Architecture & ComponentsAndroid : Architecture & Components
Android : Architecture & Components
Akash Bisariya
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10
Windows Developer
 
Android architecture
Android architectureAndroid architecture
Android architecture
Saurabh Kukreja
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
pundiramit
 

Similar to How to Customize Android Framework&System (20)

Android
Android Android
Android
 
Business management application
Business management applicationBusiness management application
Business management application
 
Android apps
Android appsAndroid apps
Android apps
 
Andriod
Andriod Andriod
Andriod
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android
AndroidAndroid
Android
 
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
 
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantica...
 
Software training report
Software training reportSoftware training report
Software training report
 
1 introduction of android
1 introduction of android1 introduction of android
1 introduction of android
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principles
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architecture
 
Android : Architecture & Components
Android : Architecture & ComponentsAndroid : Architecture & Components
Android : Architecture & Components
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 

More from Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)

What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
半導体製造(TinyTapeout)に挑戦しよう!
半導体製造(TinyTapeout)に挑戦しよう!半導体製造(TinyTapeout)に挑戦しよう!
Introduction of ISHI-KAI with OpenMPW
Introduction of ISHI-KAI with OpenMPWIntroduction of ISHI-KAI with OpenMPW
Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPiPrinciple Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
The easiest way of setup QuTiP on Windows
The easiest way of setup QuTiP on WindowsThe easiest way of setup QuTiP on Windows
GNU Radio Study for Super beginner
GNU Radio Study for Super beginnerGNU Radio Study for Super beginner
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
衛星追尾用パラボラアンテナ建設記
衛星追尾用パラボラアンテナ建設記衛星追尾用パラボラアンテナ建設記
All list of the measuring machines for microwave
All list of the measuring machines for microwaveAll list of the measuring machines for microwave
5000円で誰でも作れる新世代衛星地上局
5000円で誰でも作れる新世代衛星地上局5000円で誰でも作れる新世代衛星地上局
5000円で誰でも作れる新世代衛星地上局
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Radiation Test -Raspberry PI Zero-
Radiation Test -Raspberry PI Zero-Radiation Test -Raspberry PI Zero-
將DNA在廚房抽出的程序
將DNA在廚房抽出的程序將DNA在廚房抽出的程序
Protocol of the DNA Extraction in Kitchen
Protocol of the DNA Extraction in KitchenProtocol of the DNA Extraction in Kitchen
How to Build & Use OpenCL on Android Studio
How to Build & Use OpenCL on Android StudioHow to Build & Use OpenCL on Android Studio
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard

More from Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院) (20)

What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?
 
半導体製造(TinyTapeout)に挑戦しよう!
半導体製造(TinyTapeout)に挑戦しよう!半導体製造(TinyTapeout)に挑戦しよう!
半導体製造(TinyTapeout)に挑戦しよう!
 
Introduction of ISHI-KAI with OpenMPW
Introduction of ISHI-KAI with OpenMPWIntroduction of ISHI-KAI with OpenMPW
Introduction of ISHI-KAI with OpenMPW
 
Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会
 
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPiPrinciple Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
 
Microwaveguquantum
MicrowaveguquantumMicrowaveguquantum
Microwaveguquantum
 
The easiest way of setup QuTiP on Windows
The easiest way of setup QuTiP on WindowsThe easiest way of setup QuTiP on Windows
The easiest way of setup QuTiP on Windows
 
GNU Radio Study for Super beginner
GNU Radio Study for Super beginnerGNU Radio Study for Super beginner
GNU Radio Study for Super beginner
 
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
 
Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3
 
衛星追尾用パラボラアンテナ建設記
衛星追尾用パラボラアンテナ建設記衛星追尾用パラボラアンテナ建設記
衛星追尾用パラボラアンテナ建設記
 
All list of the measuring machines for microwave
All list of the measuring machines for microwaveAll list of the measuring machines for microwave
All list of the measuring machines for microwave
 
5000円で誰でも作れる新世代衛星地上局
5000円で誰でも作れる新世代衛星地上局5000円で誰でも作れる新世代衛星地上局
5000円で誰でも作れる新世代衛星地上局
 
How to setup mastodon in chinese
How to setup mastodon in chineseHow to setup mastodon in chinese
How to setup mastodon in chinese
 
Radiation Test -Raspberry PI Zero-
Radiation Test -Raspberry PI Zero-Radiation Test -Raspberry PI Zero-
Radiation Test -Raspberry PI Zero-
 
將DNA在廚房抽出的程序
將DNA在廚房抽出的程序將DNA在廚房抽出的程序
將DNA在廚房抽出的程序
 
Protocol of the DNA Extraction in Kitchen
Protocol of the DNA Extraction in KitchenProtocol of the DNA Extraction in Kitchen
Protocol of the DNA Extraction in Kitchen
 
How to Build & Use OpenCL on Android Studio
How to Build & Use OpenCL on Android StudioHow to Build & Use OpenCL on Android Studio
How to Build & Use OpenCL on Android Studio
 
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
OpenCV acceleration battle:OpenCL on Firefly-RK3288(MALI-T764) vs. FPGA on Ze...
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on Zedboard
 

Recently uploaded

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

How to Customize Android Framework&System

  • 1. How to Customize Android Framework&System Noritsuna Imamura noritsuna@siprop.org ©SIProp Project, 2006-2008 1
  • 2. Agenda How to Customize Android Framework&System Add Own API to Android Framework&System Make Own SDK ©SIProp Project, 2006-2008 2
  • 3. About Android Android Framework has 3 Layer Stack for SmartPhone & Tablet PC. Application Framework Layer (Java) Library Layer (Linux C/C++) Kernel/Driver Layer (Linux Kernel C/ASM) ©SIProp Project, 2006-2008 3
  • 4. Structure of out dir target/common/obj/ APPS APK JAVA_LIBRARIES API PACKAGING Files Nothing... target/product/flo/ boot.img kernel ramdisk.img root ramdisk-recovery.img recovery.img recovery system.img system userdata.img data cache.img cache ©SIProp Project, 2006-2008 4
  • 5. What’s Fastboot? Fastboot is ROM Manager for eMMC. eMMC is managed by Address in Low Lovel. When you write your Kernel, you MUST point kernel address. If you mistake kernel address, your system is broken… Separated by Address ©SIProp Project, 2006-2008 5
  • 6. About Android Source Code packages App for Android frameworks Lib for Android Apps system Sys Lib for Framework docs Java Doc for Android developers Sample, Demos build Tool for Android Build prebuilts Toolchain sdk Android SDK ndk Native SDK pdk for 3rd Party SDK cts Compatibility Test tools Tools for External 2006-2008 ©SIProp Project, 6
  • 7. About Android Source Code external Linux Lib libcore Lib for Android bionic libc for Android device Diff for Devices hardware Drivers bootable BootLoader libnativehelper Helper for JNI abi Application Binary Interface dalvik Java VM art Next Generation VM ©SIProp Project, 2006-2008 7
  • 9. What’s Nexus7? Target Tablet Nexus7(2013) http://www.google.com/ nexus/7/ OS JCROM With Build Manual https://sites.google.com/ site/jcromproject/ ©SIProp Project, 2006-2008 9
  • 10. Customized UI/UX Modify Android System View Animation SystemUI Home Widget Notification Settings etc… ©SIProp Project, 2006-2008 10
  • 11. Application Framework Layer APIs App Components User Interface App Resources Animation and Graphics Computation Media and Camera Location and Sensors Connectivity Text and Input Data Storage Administration Web Apps Best Practices ©SIProp Project, 2006-2008 11
  • 12. How to Develop? ADT Standard Android Application Only Java on Application Framework Layer Advantage Use All Android Tools Many Docs from Google Developer Site & Blogs Call Stack APK File(Your Application) (Java) Call as Java API Application Framework Layer (Java) Call as JNI(C/C++) Library Layer (C/C++) Call as SysCall(C/ASM Kernel/Driver Layer (C/ASM)Project, 2006-2008 ©SIProp 12
  • 13. How to Develop? NDK w/ADT Standard Android Application for C/C++ Java on Application Framework Layer C/C++ on Limited Library Layer Call Stack APK File(Your Application) (Java & C/C++) Call as Java API Application Framework Layer (Java) Call as JNI(C/C++) Advantage Use Java&C/C++ Dis-Advantage Must Use UI Framework on Java Layer Library Layer (C/C++) Call as SysCall(C/ASM Kernel/Driver Layer (C/ASM)Project, 2006-2008 ©SIProp 13
  • 14. How to Add New APIs ©SIProp Project, 2006-2008 14
  • 15. Application Framework Layer Packages by Android Framework android.accessibilityservice android.accounts android.animation android.app android.app.admin android.app.backup android.appwidget android.bluetooth android.content android.content.pm android.content.res android.database android.database.sqlite android.drm android.gesture android.graphics android.graphics.drawable android.graphics.drawable.shapes android.graphics.pdf android.hardware android.hardware.display android.hardware.input android.hardware.location android.hardware.usb android.inputmethodservice android.location android.media android.media.audiofx android.media.effect android.mtp android.net android.net android.net.http android.net.nsd android.net.rtp android.net.sip android.net.wifi android.net.wifi.p2p android.net.wifi.p2p.nsd android.nfc android.nfc.cardemulation android.nfc.tech android.opengl android.os android.os.storage android.preference android.print android.print.pdf android.printservice android.provider android.renderscript android.sax android.security android.service.dreams android.service.notification android.service.textservice android.service.wallpaper android.speech android.text android.speech.tts android.text.format android.support.v13.app android.text.method android.support.v4.accessibilityservice android.text.style android.support.v4.app android.text.util android.support.v4.content android.transition android.support.v4.content.pm android.util android.support.v4.database android.view android.support.v4.graphics.drawable android.view.accessibility android.support.v4.hardware.display android.view.animation android.support.v4.media android.view.inputmethod android.support.v4.net android.view.textservice android.support.v4.os android.webkit android.support.v4.print android.widget android.support.v4.text dalvik.bytecode android.support.v4.util dalvik.system android.support.v4.view android.support.v4.view.accessibility android.support.v4.widget android.support.v7.app android.support.v7.appcompat android.support.v7.gridlayout android.support.v7.media android.support.v7.mediarouter android.support.v7.view android.support.v7.widget android.support.v8.renderscript android.telephony android.telephony.cdma android.telephony.gsm android.test android.test.mock 15 ©SIProp Project, 2006-2008 android.test.suitebuilder
  • 16. Goal Add “Calculator” API into Android System Package Name: itri.lecture Class Name: Cal Method int add(int, int) int sub(int, int) Android System Nexus7 AOSP based Android 4.3.1 ©SIProp Project, 2006-2008 16
  • 17. Source Code of MyAPI Java itri.lecture.Cal.java Main Program 1. package itri.lecture; 2. public class Cal { 3. public Cal() {} 4. public static int add(int a, int b) {return a+b;} 5. public int sub(int a, int b) {return a-b;} 6. } package.html, package-info.java Appoint about Build Target Dir 1. <HTML><BODY> 2. MyAPI Test Class. 3. </BODY></HTML> 4. package itri.lecture; ©SIProp Project, 2006-2008 17
  • 18. Makefile of MyAPI Android.mk Makefile for Android BUILD_JAVA_LIBRARY => Make .jar Package BUILD_SHARED_LIBRARY => Make .so Package BUILD_STATIC_LIBRARY => Make .a file BUILD_EXECUTABLE => Make ELF file (Executable file) BUILD_DROIDDOC => Make JavaDoc › LOCAL_PATH := $(call my-dir) › include $(CLEAR_VARS) › › › › › LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_NO_STANDARD_LIBRARIES := true LOCAL_JAVA_LIBRARIES := core framework LOCAL_JAVACFLAGS := $(local_javac_flags) LOCAL_MODULE := myapi › include $(BUILD_JAVA_LIBRARY) ©SIProp Project, 2006-2008 18
  • 19. Makefile of MyAPI Common.mk Used by Other .mk file besides MyAPI’s .mk . Ex. Framework Base’s Android.mk › › › › # List of source to build into the myapi # core-myapi-files := src/itri/lecture/Cal.java › › › › › › # List of junit javadoc source files for Android public API # # $(1): directory for search (to support use from frameworks/base) define myapi_to_document $(core-myapi-files) endef CleanSpec.mk Newer Clean steps must be at the end of the list. ©SIProp Project, 2006-2008 19
  • 20. build/envsetup.sh Helper Command Lib for Android Build m jgrep Build from Top Dir mm Build from Current Dir mmm [Target Dir] Build from Target Dir croot Change Top Dir Grep for Java Source Code resgrep Grep for XML Source Code lunch Choose Target Build cgrep Grep for C/C++ Source Code ©SIProp Project, 2006-2008 20
  • 21. Setup Source Code of MyAPI Copy to “framework” Directory “framework/base” Directory “framework/base/core” Directory ©SIProp Project, 2006-2008 21
  • 22. Application Framework Layer Packages by Android Framework android.accessibilityservice android.accounts android.animation android.app android.app.admin android.app.backup android.appwidget android.bluetooth android.content android.content.pm android.content.res android.database android.database.sqlite android.drm android.gesture android.graphics android.graphics.drawable android.graphics.drawable.shapes android.graphics.pdf android.hardware android.hardware.display android.hardware.input android.hardware.location android.hardware.usb android.inputmethodservice android.location android.media android.media.audiofx android.media.effect android.mtp android.net android.net android.net.http android.net.nsd android.net.rtp android.net.sip android.net.wifi android.net.wifi.p2p android.net.wifi.p2p.nsd android.nfc android.nfc.cardemulation android.nfc.tech android.opengl android.os android.os.storage android.preference android.print android.print.pdf android.printservice android.provider android.renderscript android.sax android.security android.service.dreams android.service.notification android.service.textservice android.service.wallpaper android.speech android.text android.speech.tts android.text.format android.support.v13.app android.text.method android.support.v4.accessibilityservice android.text.style android.support.v4.app android.text.util android.support.v4.content android.transition android.support.v4.content.pm android.util android.support.v4.database android.view android.support.v4.graphics.drawable android.view.accessibility android.support.v4.hardware.display android.view.animation android.support.v4.media android.view.inputmethod android.support.v4.net android.view.textservice android.support.v4.os android.webkit android.support.v4.print android.widget android.support.v4.text dalvik.bytecode android.support.v4.util dalvik.system android.support.v4.view android.support.v4.view.accessibility android.support.v4.widget android.support.v7.app android.support.v7.appcompat android.support.v7.gridlayout android.support.v7.media android.support.v7.mediarouter android.support.v7.view android.support.v7.widget android.support.v8.renderscript android.telephony android.telephony.cdma android.telephony.gsm android.test android.test.mock 22 ©SIProp Project, 2006-2008 android.test.suitebuilder
  • 23. Add MyAPI’s Source Code Path frameworks/base/Android.mk Base System for Framework(API) › › › › › › # Common sources for doc check and api check common_src_files := $(call find-other-html-files, $(html_dirs)) $(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore)) $(addprefix ../../external/junit/, $(call junit_to_document, $(LOCAL_PATH)/../../external/junit)) $(addprefix ../../frameworks/myapi/, $(call myapi_to_document, $(LOCAL_PATH)/../../frameworks/myapi)) › › # include definition of junit_to_document include external/junit/Common.mk › › # include definition of myapi_to_document include frameworks/myapi/Common.mk ©SIProp Project, 2006-2008 23
  • 24. Set Target Product build/target/product/mini.mk build/target/product/core.mk 1. # Base modules (will move elsewhere, previously user tagged) 2. PRODUCT_PACKAGES += 3. 20-dns.conf 4. 95-configured 5. am 6. myapi ©SIProp Project, 2006-2008 24
  • 25. Set Class Path system/core/rootdir/init.rc 1. export BOOTCLASSPATH /system/framework/core.jar:/system/framework/corejunit.jar:/system/framework/bouncycastle.jar:/system/fram ework/ext.jar:/system/framework/framework.jar:/system/fr amework/telephony-common.jar:/system/framework/voipcommon.jar:/system/framework/mmscommon.jar:/system/framework/android.policy.jar:/system/ framework/services.jar:/system/framework/apachexml.jar:/system/framework/myapi.jar build/core/dex_preopt.mk 1. 2. # TODO: replace it with device's BOOTCLASSPATH DEXPREOPT_BOOT_JARS := core:corejunit:bouncycastle:ext:myapi:framework: ©SIProp Project, 2006-2008 25
  • 26. Make OTA image Make OTA image This OTA image is update image for Android. › › › › cd ~/nexus_work/android/ source build/envsetup.sh lunch aosp_flo-user make otapackage This file name is aosp_flo-ota-eng.[your Linux’s User name].zip ©SIProp Project, 2006-2008 26
  • 27. What’s Android OTA-Package Android OTA-Package has ROM images. boot.img Kernel, Init, Minimam Linux recovery.img Recovery Manager Program system.img Android System userdata.img User Data Separated by Address ©SIProp Project, 2006-2008 27
  • 28. How to Use New APIs ©SIProp Project, 2006-2008 28
  • 29. No API on SDK… ©SIProp Project, 2006-2008 29
  • 30. Setup API Version for MyAPI 1/2 development/sdk/api-versions.xml 1. 2. 3. 4. 5. <class name="itri/lecture/Cal" since="18"> <method name="&lt;init>()V" /> <method name="add(II)I" /> <method name="sub(II)I" /> </class> ©SIProp Project, 2006-2008 30
  • 31. Setup API Version for MyAPI 2/2 prebuilts/sdk/api/18.txt 1. package itri.lecture { 2. public class Cal { 3. ctor public Cal(); 4. method public int add(int, int); 5. method public static int sub(int, int); 6. } 7. } ©SIProp Project, 2006-2008 31
  • 32. Setup JavaDoc build/core/droiddoc.mk 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. ifneq ($(LOCAL_SDK_VERSION),) ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current) # Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS. LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES) else LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES) endif else LOCAL_JAVA_LIBRARIES := core ext framework myapi $(LOCAL_JAVA_LIBRARIES) endif # LOCAL_SDK_VERSION ©SIProp Project, 2006-2008 32
  • 33. Make MySDK Make MySDK › › › › cd ~/nexus_work/android/ source build/envsetup.sh lunch sdk-eng make sdk This file name is android-sdk_eng.[your Linux’s User name]_linux-x86.zip ©SIProp Project, 2006-2008 33
  • 34. How to Use New APIs ©SIProp Project, 2006-2008 34
  • 35. Copy SDK to your Environment “sdk/platforms/android-4.3.1” to your “sdk/platforms/” ©SIProp Project, 2006-2008 35