SlideShare a Scribd company logo
1 of 35
Download to read offline
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

Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with PieOpersys inc.
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGLSuhan Lee
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 

What's hot (20)

Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
Aidl service
Aidl serviceAidl service
Aidl service
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
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)
 
Android ipm 20110409
Android ipm 20110409Android ipm 20110409
Android ipm 20110409
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
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
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGL
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 

Similar to How to Customize Android Framework&System

Business management application
Business management applicationBusiness management application
Business management applicationPritam Tirpude
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01letuan9999
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesKonstantin Rybas
 
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 reportNatasha Bains
 
1 introduction of android
1 introduction of android1 introduction of android
1 introduction of androidakila_mano
 
Getting started with android
Getting started with androidGetting started with android
Getting started with androidamitgb
 
Android basic principles
Android basic principlesAndroid basic principles
Android basic principlesHenk Laracker
 
Release webinar architecture
Release webinar   architectureRelease webinar   architecture
Release webinar architectureBigData_Europe
 
Android : Architecture & Components
Android : Architecture & ComponentsAndroid : Architecture & Components
Android : Architecture & ComponentsAkash Bisariya
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Windows Developer
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 

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
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 

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

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

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Recently uploaded (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

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