41
1/41 SamSung Electronics CTO SAIT Graphics&OS Group Linux Tech Part Lim,GeunSik ([email protected] or [email protected] ) 2008.11.10(Mon) Android Internals & Target Porting 2nd Korea Android Seminar

2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

  • Upload
    lamkien

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

1/41

SamSung Electronics CTO SAIT Graphics&OS Group Linux Tech Part– – – –Lim,GeunSik ([email protected] or [email protected] )

2008.11.10(Mon)

Android Internals & Target Porting

2nd Korea Android Seminar

Page 2: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Presentation Time : 14:00 ~ 14:50

1. Android Overview2. Android OS (Linux)3. Android Native Libraries4. Android Run-time5. Android Application Framework6. Android Start-up & Layer Interaction of Platform Stack

2/41

1st         Android Internals  

Page 3: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Overview – Mobile History

First, to be an excellent mobile platform on its merits, Second, to be open and open source

3/41

Page 4: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Overview – TimeLine 1/2

Date Description2005.08 Google acquired Android Inc.

(Adny Rubin - http://carmen.sourceforge.net/ )

2005.11 Google Bought Skia 2D Graphic Solution.

2007.10 Google acquired Jaiku Inc.

2007.11 Open Handset Alliance (OHA) appointed open standard development abou t Mobile Device.

2007.11.12 Android SDK(Software Development Kit) Release � http://code.google.com/p/android/downloads/list Linux 2.6.23

2008.01.24 United States 700 MHz FCC wireless spectrum (5Blocks) auction

2008.01.28 Google extended the deadline for the first round in the Android Developer Challenge to April 14 2008

GPL

4/41

Page 5: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Overview – TimeLine 2/2

Android Based first mobile Phone (G1 Phone by T-mobile ) http://www.android.com/market/

2008.11.22

Date Description

2008.02.13 Android SDK Updated to m5-rc14

2008.03.05 Android SDK Updated to m5-rc15

2008.04.14 Android Developer Challenge I Deadline

2008.05.28 Google I/O (A two day developer gathering in San Francisco.)

2008.11.23 Apache License based Full Open Source http://source.android.com Linux 2.6.25

2009. 2Q~3Q Unveild 2nd product, Android, an open source mobile device platform based on the Linux.(Plan)

5/41

Page 6: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Open Devices

Open ApplicationsOpen 

Services

Open Networks

700Mhz

Reseller

T-Mobile

Open Access

Android Overview – Open access model

6/41

Page 7: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Linux Kernel (2.6.23/25)

Misc Middleware

Java Virtual Machine (Register-based Dalvik VM)

Misc Applications

QEMU Based Emulator

Fedoar 9 (Host)X86

ARM &

X86

ARMCode

Linux Kernel (2.6.23/25)

Misc Middleware

Java Virtual Machine(Register-based Dalvik VM)

Misc Applications

Handset Hardware (i.MX 31L , PXA 310)

Real Target

Target(ARM)

ARMCode

JavaCode

WebBrowserGoogleMAPMail ・・・

bionicWebkitSQLite

openGL ・・・

ARM CPUEmulator

Goldfish(Virtual H/W)Hardware Emulator

Android Overview - Emulator(SDK) VS. RealTarget

JavaCode

Emulator(SDK)/tools/lib/images/skins (-skin)

7/41

Page 8: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

8/18

Android Overview - Android Layer

Android Debug Bridge(ADB)

Android Development Tool (ADT)

Dalvik Debug Monitor Service(DDMS) )

AndroidAsset Packaging Tool

Mksdcard

Android Interface efinition Language(AIDL)

Class File Convertor

Emulator(QEMU, GoldFish)

Linux Distribution(X86)

Home Contacts Phone Browser GoogleMap

Applications

Activity Manager

Windows Manager

Content Providers

ViewSystem

Notification Manager

Package Manager

Telephony Manager

Resource Manager

Location Manager

XMPP Service

Applications Framework

System Libraries

Surface manager

Media Framework

SQLite OpenGL/ES

FreeType Webkit SGL SSL Bionic Libc(53 pthread)

Core Libraries

Dalvik VM

http://source.android.com

. . . .

DisplayDriver BluetoothDriver Flash Driver

Binder Driver USB Driver Keypad Driver

CameraDriver

WiFi Driver Audio Driver

Power M/MC

C/C++

Java

Java

Linux (2.6.23/25)

HAL(Hardware Abstraction Layer)

Graphics

Android Runtime

X86 Linux Desktop

Audio Radio(RIL)G P SCamera BlueTooth WiFi . . . . .

IM Photo Album Calculator Clock Media Player Calendar

(Functional libraries)

8/41

Page 9: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Linux Dalvik

Qemu

Openbinder

Ant

BSD Libc(=bionic)

OpenGL

OpenGL

SDL

KHTML

Expat

Python

Sqlite3

OpenSSL

zlib Openbinder System

OpenSource License

Linux Kernel GPL2

YAFFS2 GPL

QEMU GPL

QEMU Accelerator GPL2

Dalvik (JVM) Apache

OpenBinder (Core) GPL2

SQLite GPL2

Python Python

ant Apache

SDL LGPL

OpenGL SGI OpenGL (BSD/MPL)

Bionic C Library BSD

Webkit BSD (including LGPL)

WebCore LGPL

KJS LGPL

KHTML GPL+BSD

DBUS GPL2

Expat MIT

SGL Apache

• Currently, Android Platform is open source completely. The Android mobile OS will

be released under Apache License . • This means that anyone can customize the android platform and then keep it

proprietary.

Android Overview – License Issues

Yaffs2

D-BUS

9/41

Page 10: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

init ramfs source ( Run /init - Exectuable Liking Format )

Kernel Features Requirement

ARM EABI ( ARM Embedded Application Binary Interface ) O

Frame Buffer (Device Driver) - /dev/fb0 or /dev/graphics/fb0 O

Keypad Device drivers - /dev/input/event0 △

Touch-Screen Device drivers - /dev/input/event1 △

Emulator GoldFish (Virtual Machine for QEMU based Emulator ) O

O

Android Kernel - Kernel Features 1/2

10/41

Page 11: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android timed GPIO driver

Ashmem (Android Shared Memory for Memory Manager)

Android Paranoid Network (Only allow certain groups to create sockets)

△Android Alarm Driver

△Android Log Driver (To display log messages like logcat)- /dev/log/{main:log:event}

O

-PMEM ( Process’s Memory Allocator – map,unmap, getsize,gettotalsize, allocate, etc ) - Deprecated

△Kernel Debugger ( Using kdbg structure + sysrq )

OBinder For IPC - /dev/binder (251~253 or 10~11)

△Android Power Management (for PM of goldfish)- /dev/android_power

Kernel Features Requirement

A

N

D

R

O

I

D

Low Memory Killer ( To Kill process When Memory is low) O

Android USB Gadget ( Gadget based Android USB Driver ) - /dev/usb △

Android RAM Buffer Console ( for goldfish's audio ) △

Product(Porting)

-

-

Android Kernel - Kernel Features 2/2

☞ Surface flinger uses double-buffering using page-flips.

11/41

Page 12: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Google’s Android ToolChain 1/2

Opensource Toolchain for EABI• Definition: It sets the standard for the interoperation between relocated files,

as well as executable files, for embedded architectures.

• Usability: the standard makes it possible to combine object files built using different toolchains if both their compilers use EABI((Embedded Application Binary Interface).

• More Efficient Syscall Convention

• GCC : CS-2005Q3 release is a modified version of gcc-3.4.4 from gcc-4.1.0. The commercial ARM Realview C/C++ compiler was the first to support EABI (GCC4.1)

• Kernel: EABI is supported in the ARM Linux kernel from version 2.6.16.

• Glibc : Earlier glibc (2.3.3) support EABI userspace but had old-style syscalls to work with older kernels (2.6.0 ~ 2.6.15).

12/41

- http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0036a/ ARM Information Center

Page 13: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Google’s Android ToolChain 2/2

• GCC Version : 4.2.1 (GPL2)

• Download Sources: http://android.git.kernel.org/pub/android-toolchain-20081019.tar.bz2 (70M)

• Architecture: ARMV5te

• Target: arm-eabi

• ABI Convention: EABI , AAPCS

• Supported Language: C, C++

• Floating Point : Soft Floting Point ( --with-float=soft --with-fpu=vfp )

• Thread Model: Single (--enable-threads)

Android Toolchain Information

13/41

Ref: GCC 4.2.2+ -> GPL3 Glibc 2.6.1+ -> GPL3/LGPL3

http://gplv3.fsf.org

Page 14: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Development using OpenSource

14/41

설계

Process

Tech HumanResource

Software 개발요소

freshmeat.netsourceforge.net

OpenSource

Requirement

Analysis

Design

Implementation

Test

Page 15: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Vanilla Kernel’s Maintenance for Android 1/5

http://gitstat.sourceforge.net/ 15/41

● Linux = Vanilla Kernel = Linus Tovalds’s Trademark

Page 16: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Vanilla Kernel’s Maintenance for Android 2/5

16/41

Page 17: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Vanilla Kernel’s Maintenance for Android 3/5

17/41

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Page 18: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Vanilla Kernel’s Maintenance for Android 4/5

18/41

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Page 19: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Vanilla Kernel’s Maintenance for Android 5/5

19/41

Code Monitoring

Page 20: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Kernel’s WebServer

1. OS : Linux Apache/2.2.9 (Fedora 9) 2. Last Changed: 03-Nov-2008 12:38:39 GMT 3. IP Address: 130.239.17.124. DNS Admin: [email protected] 5. Netblock Owner: Umea University, Sweden

android.git.kernel.org

source.android.com1. OS : Linux ( GFE/1.3 WebServer ) 2. Last Changed: 24-Oct-2008 07:25:02 GMT 3. IP Address: 74.125.47.121 / 66.249.91.121 4. Netblock Owner: Google Inc.

☞ GFE: Front End

20/41

Page 21: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Coffee Break

21/41

14:50 ~ 15:10

Page 22: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Presentation Time: 15:10 ~ 16:00

Android Porting on Real Target (Target Device Prototyping)- zaurus c1000/c3200 , armadillo-500 , HTC P4550 Kaiser, OMAP2EVM, Nokia 810 , WS007SH , and so on

22/41

2nd     Android Porting       

Page 23: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

1. uncompress ramdisk.img$cd ./android/tools/lib/images/ramdisk.img$ gzip -cd ramdisk.img > ramdisk$ cpio -iv -F ramdisk

2. open the emulator$ ./emulator &

3. enter into android shell and remount rootfs(Since rootfs is mounted as read only, you need to remount.)

$ ./adb shell# mount -o remount,rw rootfs /# mkdir /tmp

4. push busybox in the tmp folder$ ./adb push busybox /tmp

5. open a android shell command window$ ./adb shell

How to get android *.img file

6. change the busybox mode to 555# chmod 555 /tmp/busybox

7. create the tarball for /system and /data:# ./busybox tar cvf /tmp/system.tar /system# ./busybox tar cvf /tmp/data.tar /data# ./busybox tar cvf /tmp/dev.tar /dev

8. pull the tarball file from the google android emulator$ ./adb pull /tmp/system.tar .$ ./adb pull /tmp/data.tar .$ ./adb pull /tmp/dev.tar .

9. how to get boot log of the emulator.# mkdir /tmp# /system/bin/dumpstate# exit$ ./adb pull /tmp/state state.log$ more state.log

•Extract google's android file system image from android 1.0 SDK Release 1.

$ Fedora Desktop Prompt# Android Platform Prompt 23/41

Page 24: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

Android Project Layout

2) External projects: The Android Open Source Project makes use of many other open source projects. ( aes, apache-http, asm, bluez, ccache, clearsilver, dbus, dhcpcd, dropbear, eclipse, elfcopy, elfutils, embunit, emma, esd, expat, fdlibm, flex, freetype, gdata, diflib, googleclient, icu4c, iptables, jdiff, jfreechart, jpeg, kxml2, libffi, an so on)

 ☞ Info : http://source.android.com/projects 

24/41

The Android platform consists of several projects already in progress. These projects can be divided into three categories. ( Core Projects, External Projects, Packages )

1) Core projects: These projects make up the foundation of the Android platform. ( bionic, bootloader/legacy, build , dalvik, development, frameworks/base , hardware<libhardware/ril> , kernel , prebuild , recovery, system<bluetooth,coe,extras,ti-wlan )

3) Packages: These projects are standard Android applications and services3.1) Application Project: alarmclock, browser, calculator, calendar, camera, Contacts, email, googlesearch, html viewer,IM , Launcher, MMS, Music, an so on

3.2) Provider Project: CalendarProvider, ContactsProvider, DownloadProvider,DrmProvider, GoogleContactsProvider, GoogleSubscribedFeedsProvider, ImProvider,MediaProvider,SettingsProvider, SubscribedFeedsProvider, TelephonyProvider

Page 25: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

Android Full Source 1/2

① bionic.git - modified BSD(Open/Net/Free) C library ② bootloader - legacy.git bootloader ③ build.git - build script ④ dalvik.git - stacked based java virtual machine ⑤ development.git - files for development ⑥ external ( 37 ) - aes.git , dropbear.git ,fdlibm.git ,iptables.git , libpng.git , openssl.git , safe-iop.git , tagsoup.git , apache-http.git , elfcopy.git , freetype.git , jdiff.git , oprofile.git , skia.git , tcpdump.git ,bluez.git , elfutils.git , gdata.git , jhead.git , netcat.git , ping.git , sonivox.git , tinyxml.git , clearsilver.git , emma.git ,giflib.git , jpeg.git , netperf.git , ppp.git , sqlite.git , tremor.git , dbus.git ,esd.git , libxml2.git , googleclient.git , libffi.git , neven.git , protobuf.git ,srec.git , webkit.git , dhcpcd.git , expat.git , icu4c.git , libpcap.git , opencore.git , qemu.git , strace.git

./.repo/projects/

☞ Info : http://www.kandroid.org/board/board.php?board=androidsource&command=body&no=6

25/41

Fedora 9 - With yumUbuntu 8.X - With apt-get

Page 26: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

Android Full Source 2/3

01) http://android.git.kernel.org/pub/bluez-%version%.tar.gz 02) http://android.git.kernel.org/pub/clearsilver-%version%.tar.gz 03) http://android.git.kernel.org/pub/dbus-1.0.2.tar.gz 04) http://android.git.kernel.org/pub/dropbear-%version%.tar.gz 05) http://android.git.kernel.org/pub/emma-%version%-src.zip 06) http://android.git.kernel.org/pub/expat-%version%.tar.gz 07) http://android.git.kernel.org/pub/freetype-%version%.tar.bz2 08) http://android.git.kernel.org/pub/giflib-%version%.tar.gz 09) http://android.git.kernel.org/pub/icu4c-%version%-src.tgz 10) http://android.git.kernel.org/pub/iptables-%version%.tar.bz2 11) http://android.git.kernel.org/pub/jpegsrc.v%version%.tar.gz 12) http://android.git.kernel.org/pub/libpcap-%version%.tar.gz 13) http://android.git.kernel.org/pub/libpng-%version%.tar.gz 14) http://android.git.kernel.org/pub/libxml2-sources-%version%.tar.gz 15) http://android.git.kernel.org/pub/nc%version%.tgz

./.repo/manifests/default.xml 26/41

Page 27: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

Android Full Source 3/3

16) http://android.git.kernel.org/pub/netperf-%version%.tar.gz 17) http://android.git.kernel.org/pub/openssl-%version%.tar.gz 18) http://android.git.kernel.org/pub/oprofile-%version%.tar.gz 19) http://android.git.kernel.org/pub/ppp-%version%.tar.gz 20) http://android.git.kernel.org/pub/qemu-%version%.tar.gz 21) http://android.git.kernel.org/pub/safe-iop-%version%.tgz 22) http://android.git.kernel.org/pub/sqlite-amalgamation-%version%.tar.gz 23) http://android.git.kernel.org/pub/strace-%version%.tar.bz2 24) http://android.git.kernel.org/pub/tagsoup-%version%-src.zip 25) http://android.git.kernel.org/pub/tcpdump-%version%.tar.gz 26) http://android.git.kernel.org/pub/tinyxml_%version%.tar.gz 27) http://android.git.kernel.org/pub/wpa_supplicant-%version%.tar.gz 28) http://android.git.kernel.org/pub/zlib-%version%.tar.bz2 29) http://builds.nightly.webkit.org/files/trunk/src/WebKit-%version%.tar.bz2

./.repo/manifests/default.xml 27/41

Page 28: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

.

Android Help Book

After “#>repo sync”

./development/pdk/docs/index.html Porting Guide 0.3(2008-Jun-09)14

./development/tools/eclipse/sites/internal/index.html Update Site for Android Dev Toolkit13

./development/tools/eclipse/sites/external/index.htmlUpdate Site for Android Dev Toolkit12

./development/samples/NotePad/_index.html Note Pad Program11

./development/samples/LunarLander/_index.htmlLunar Lander Program10

./development/samples/ApiDemos/_index.htmlAPI Demo9

./external/dropbear/libtommath/logs/index.htmlAddition and Subtraction8

./external/fdlibm/index.Fdlibm (Network Library)7

./external/tremor/Tremor/doc/index.html(http://www.xiph.org/vorbis/)

Tremioor DOcumentation6

./external/tinyxml/docs/index.html TinyXML 2.4.05

./external/skia/sgl_doxygen/html/index.htmlSGL Doc by doxygen 1.4.04

./external/webkit/WebKitSite/index.htmlWebkit Open Source Project3

./external/webkit/BugsSite/docs/html/index.htmlBugzilla GUide 2.20.12

./out/target/common/docs/framework/index.htmlSDK , Dev Guide , Reference , Publish , Etc

1

LocationSubjectNo

28/41

Page 29: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

How do you do Thouble Shooting?

3. IRC(Internet Relay Chatting)irc.freenode.net (#android)

1. Google Groupshttp://groups.google.com/group/android-developers

2. Korea Android Websitehttp://www.kandroid.org

29/41

Page 30: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

30/18

Android /init Running Sequence

Environment Variables Settingexport PATH=/sbin:/system/sbin:/system/bin:$PATHexport LD_LIBRARY_PATH=/system/libexport ANDROID_ROOT=/systemexport ANDROID_ASSETS=/system/appexport ANDROID_DATA=/dataexport EXTERNAL_STORAGE=/sdcardexport DRM_CONTENT=/data/drm/content

Create Temp FStarget#> umask 000target#> /bin/chmod -R a+rw /tmp/

System Property’s Permissiontarget#> /bin/chmod -R a+rw /data/ /database/

Mount FIleSYstemtarget#> mount -t tmpfs tmpfs /tmptarget#> mount -t proc proc /proctarget#> mount -t sysfs sysfs /sys

Log Sub System (Device Node)target#> /bin/rm -r /dev/logtarget#> cd /devtarget#> /bin/ln -s /var/tmp/log logtarget#> /bin/rm -f log/*target#> /bin/touch log/maintarget#> /bin/touch log/eventstarget#> /bin/touch log/radiotarget#> cd /

Loading OpenBinder Moduletarget#> insmod binderdev.kotarget#> lsmodModule Size Used by Not taintedBinderdev 63152 0 - Live 0xbf000000target#> mknod /dev/binder c 10 0target#> /bin/chmod -R a+rw /dev/binder

Run Zygote Processtarget#> /system/bin/app_process -Xzygote /system/bin --zygote &target#> strace -ff -F -tt -s 200 -o /tmp/log/zygote \/system/bin/app_process -Xzygote /system/bin --zygote &

Start D-bus Daemonarget#> /system/bin/dbus-daemon --system --nofork &

Start Runtime Processtarget#> /system/bin/runtime target#> strace -f -ff -tt -s 200 -o /tmp/runtimetrace /system/bin/runtime

Network Setting#!/system/bin/shexport PATH=/sbin:/bin:/usr/bin:/system/binLOCALIP=`192.168.1.21`DNS1=`208.67.222.222`DNS2=`208.67.220.222`GATEWAY=`192.168.1.1`ifconfig eth0 $LOCALIP netmask 255.255.255.0 uproute add default gw $GATEWAY dev eth0/system/bin/setprop net.eth0.dns1 $DNS1/system/bin/setprop net.eth0.dns2 $DNS2/system/bin/setprop net.gprs.local-ip $LOCALIP/system/bin/setprop ro.radio.use-ppp no

/system/bin/setprop ro.config.nocheckin yes

#> chroot /root/androidrootfs /strace(or /ltrace ) -f -ff -tt -s 200 /init

30/41

Page 31: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Analysis of Booting Sequence

☞ Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process

www.bootchart.org 31/41

Page 32: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 1– HTC Kaiser

* Architecture: QualComm MSM7200A* CPU Core : ARM9 (modem processor) & ARM11 (application processor)400 MHz Qualcomm 7200 (Duall CPU, and integrates Imageon hardware 2D/3D)* Manufacturer: HTC TYTNII P4550 Kaiser* Type: Smartphone / PDA* OS: Windows Mobile 6.1 (Linux 2.6.X)* Board Type: HTCVOGUE* Camera(s): 3.0(2048x1536) MP still/video camera with autofocus. * Memory: 128 MB RAM, 256 MB ROM* Memory card: SDIO, microSD, microSDHC[9][10] 4GB and up, TransFlash* Screen: 240x320, 2.8" (42 x 57 mm) TFT-LCD* Weight: 190g* Size: 112mm (L) x 59mm (W) x 19mm (T)

32/41

Page 33: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 2– Zaurus C1000

* Architecture: ARM Xscale (ARMv5t-le)* CPU Core : 416MHz Intel PXA270 processor* BoardType: HTCVOGUE* Manufacturer: Sharp Zaurus* Type: PDA* OS: Lineo Solutions uLinux (Linux 2.6.23)* Memory: 128 MB Flash RAM, 64 MB ROM* External Memory: SD/MMC cards , CompactFlash cards* Screen: VGA touchscreen (640 x 480) - 65K* Weight: 190g* Size: 112mm (L) x 59mm (W) x 19mm (T)* Additional I/O: IrDA, USB, and LAN ports* Weights: 10 oz (278 grams)

33/41

Page 34: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 3– Zaurus C3200

* Architecture: ARM Xscale (ARMv5t-le)* CPU Core : 416MHz Intel PXA270 processor* BoardType: HTCVOGUE* Manufacturer: Sharp Zaurus* Type: PDA / Personnel Mobile Tool* OS: Lineo Solutions uLinux (Linux 2.6.23)* Memory: 128 MB Flash RAM, 64 MB ROM* External Memory: SD/MMC cards , CompactFlash cards* HDD: 6Gb ( User Area : 5.9Gb )* Screen: VGA touchscreen (640 x 480) - 65K* Weight: 298g* Size: 124mm (L) x 87mm (W) x 25mm (T)* Additional I/O: IrDA, USB, and LAN ports* Weights: 10 oz (278 grams)

34/41

Page 35: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 4– Nokia N810

* Architecture: ARM V6 * CPU Core : ARM 1136JF-S ( by TI’s OMAP 2420) 400Mhz* Manufacturer: Nokia * Type: Internet Tablet OS: * OS: maemo (Linux 2.6 based OS2008) * Memory: DDR RAM 128MB , Flash 256MB * External Memory: miniSD , microSD * Internal Storage: 2Gb * Weights: 10 oz (278 grams) * Battery: Nokia Maps BP-4L* Screen: 4.13" WVGA display (800 x 480 pixels) with up to 65,000 colors* Size: 124mm (L) x 87mm (W) x 25mm (T)* Additional I/O: IrDA, USB, and LAN ports* WLAN standard: IEEE 802.11b/g* Bluetooth specification v. 2.0. +EDR

35/41

Page 36: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 5– OMAP2EVM

* Architecture: ARM V6* CPU Core : ARM 1136JF-S (400Mhz) * Manufacturer: www.mistralsolutions.com* Model: OMAP 2530 TI’s OMAP 2430 Minior Version* Type: Target Board for development * OS: Linux 2.6.19 , 2.6.21* Memory: 64 MB Mobile DDR SDRAM , 128 MB NAND Flash* Board Dimensions: 4.25’’ x 7’’* External Memory: 4-bit SD/MMC* Screen: Dual mode (640x480/320x240) LCD Display with Touch screen interface* Additional I/O: USB 2.0 OTG based on Philips ISP1504 transceiver, and LAN ports , Keypad* Components : Pre-programmed binaries for XLoader, uBoot, Linux Kernel and JFFS2 File system.

36/41

Page 37: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 6– Armadillo/500

* Architecture: ARM V6* CPU Core : ARM 1136JF-S (400Mhz , 128kb level two cache) * Manufacturer: Atmark Techno Company (Japan)* Model: i.MX31L * Type: Target Board for development * OS: Linux 2.6.18 & 2.6.26* Memory: 64 MB DDR SDRAM , 16MB Nor Flash , 256MB Nand Flash* External Memory: 4-bit SD/MMC* Screen: CRT Screen(VGA) interface* Additional I/O: USB , CF , SD/MMC , Audio in/out , Serial x2 , 30Bit GPIO* Components : GNU cross development tools and Atmark Techno Development(ATDE) with Vmwar Player. * Weight : 120G

37/41

Preparation for External Storages

Page 38: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 7– WS007SH

* Architecture: ARM Xscale (ARMv5)* CPU Core : 32bit Intel PXA 270 (CPU Clock : 416Mhz)* Manufacturer: Sharp (http://llwm.xii.jp/wiki/wiki.cgi?page=Download) * Model: W-Zero3[ES] WS007SH (sha_pon007)* Type: Mobile Phone * OS: Windows Mobile Edition 5.0 for PocketPC ( Linux 2.6.23-24 )* Memory: 64 MB DDR SDRAM , 128MB Flash * External Memory: MiniSD* Screen: 2.8 Inch Screen (480X640 ) 65K* Dimensions: 56 x 135 x 21* Additional I/O: 1.3 Mega Pixel Cam , USB Mini A-B* Components : HRET(HandSet Reverse Engineering Tool)* W-SIM : RX420AL/RX420IN* Weight: 175G

38/41

Page 39: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android Porting 8– Zoom OMAP34x MDK

* Architecture: ARM V7* CPU Core : ARM Cortex-A8 (CPU Clock : 600Mhz) – TI OMAP 3430* Manufacturer: www.logicpd.com* Model: Zoom™ OMAP34x Mobile Development Kit (MDK)* Type: Zoom Mobile Development Kit * OS: Windows Mobile Edition 5.0 for PocketPC Linux 2.6.X* Memory: 64 MB DDR SDRAM , 128MB Flash * External Memory: MicroSD* Screen: 3.7” TFT VGA Portrait LCD* Dimensions: 96.5 x 160.8 x 24.3 mm * Additional I/O: 3.1 Mega Pixel Cam , Jtag Connector, USB OTG Mini A-B Port* Battery: 1100 mAhr Li-Ion battery

Plan

39/41

Page 40: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Android 1st Phone T-MObile G1

☞ Howto Unlock

- http://www.unlock-tmobileg1.com/EN/unlock-code-G1.php ($22.99) - http://g1unlockcodes.com/ ($23.99) - http://G1SIMUnlock.com ($29.99) - Use T-Mobile SIM Card of your friend http://www.kandroid.org/board/board.php?board=HTCDream&command=body&no=14

40/41

528Mhz Qualcomm 7201 processor (ARM1136EJ-S)

☞ Android DotPhone (Shopping Mall)

-Price: 3,850.00RMB-Email: [email protected]: 8610-13439626749-Sellers: Android DotPhone-Website: http://auction1.taobao.com/auction/item_detail-0db2-190294b8479059423e8f07641cddc142.jhtml

☞ Ebay (Shopping Mall)

Page 41: 2nd Korea Android Seminar Android Internals & Target · PDF fileAndroid Overview – Mobile History First, to be an excellent mobile platform on its merits, Second, to be open and

Thanks

41/41