Info

Linux kernel Linux kernel - Linux device driver -

Android library > Android application A Android

^lf^'li^^KTf^lt^l side effects

Android

http://source.android.com/download ) :

1. curl http://android.git.kernel.org/repo > repo

3. ./repo init -u git://android.git.kernel.org/platform/manifest.git -b cdma-import

1. Device driver

2. Android library - Android application A Android

1 Linux device driver

device driver °

Linux kernel ' Android

S'J LCD ' Android f^ Double Framebuffer '

& Framebuffer driver Framebuffer '

1. Double Framebuffer

2. LCD4SM

4.4.1.1 Double Framebuffer

— Embedded Linux System T^^^ Framebuffer ö^if'J^^f'J LCD tf#® ' LCD Framebuffer ' Framebuffer f^t

Xresolution x Yresolution x_BtL ^ Bits = FramebufferSize (4.1)

Pixel Byte

Android ^ffl Double Framebuffer ' LCD

fi ' Äflt ^^fi^f Ä - pre-draw ö^f'J - Swap Framebuffer ' Framebuffer fatÄ^^fflt^A ' m«

Double Framebuffer ' M

^ Framebuffer ^ 320x240x16^8B = 153600B = 0.15MB ^^tÄ ' ^ffl Double Framebuffer 0.3MB ^^t® ' 2006-2007

4ffLCD^Android^5fi£T&^lS^i®^M ' Framebuffer Driver

Linux fö ' T J # ^ Android Emulator ^ ^ ffl 6 Framebuffer Driver : linux-2.6.25-android-1.0_r1/drivers/video/goldfishfb.c ° 6 Framebuffer driver^linux-2.6.25-android-1.0_r1/drivers/video/pxafb.c ( P##B) °

MM« ' ft£*^M.&M&S&Framebuffer drivert6LCCR0(##^)

^ Framebuffer driver linux-2.6.25-androi d- 1.0_r1/ drivers/video/pxafb.c ( P#I£B ) o

4.4.2 Keypad keypad

1. keypad driver ' keypa d driver linux-2.6.25-android-1.0_r1/drivers/input/keyboard/pxa27x_k eypad.c °

keypad ttllf^'liffe Iffe polling f^Kt^^fe^^Altl^i ° keypad t&l^

' f keypad ttM ' afl# polling l^Ml^t&afl polling l^^^^i^afl^^l keypad driver linux-2.6.25-android-1.0_r1/driver s/input/keyboard/android_keypad.c

4.4.3 Touch

S&afl^ftffll touch driver Linux kernel ^^tfAH

Linux kernel tl touch driver ^«ifl^'tftf touch driver £ Android lttT^^tft^^l'aflftffl HTC Dream afl#i touch driver

2. Connect to input subsystem

4. ^fitlfti aflft^ printk touch driver touch event

^touch driver' Android applicationftouchi^^^^nB 4-8 ' ^^a^^^touch^^^^i ' (0 ' 0) ' ^a fl&^touch events

1. touch driver ' Android application?

2. Android application ' Y)?

H^m&#^Android^#touch^Mfm ' Y) ^fAAf^ff f ' ' ^^^^touch^tefatef. '

Android^#®l,^&^^tilJ(0 ' 0) ° Android ^source code^ 2GBi&^UML Diagram ' S^baW£^^:&16Actags17^^itAndroid^^f ° Android

& # ^ # m 4 t i'J & touch ^ i # f m ' ^ $ £ f m a frameworks/base/services/java/com/android/server/KeyInputQueue.java^^^ Android ° atl^^t&^ttouch^tefatef > ♦ ©It^&M«] (0 ' 0) ^S^Android application^WfTLCD^l (ON/OFF) iltouch event ( LCD MH^f^^if touch event) ' faLCD^^lX^^^Battery (ffli^^ftfilf)" ®^am«^£&^Battery deviceA Battery driver '^aAndroid^^#^Battery^^ifm>a^Android^^fT^

15 Linux kernel ^^^ linux/include/linux/input.h °

Androidt^%#T& (X ' Y) % ( 0 ' 0) > «^i&atfl^ttouchH^iS' Android

S'Mi^&side effect) > $.t$^BatteryService&#.t^At&fm#At ' atf1?It£&t«S^t>^SAM^BatteryServicet ' $.#Android&&#

■^LCD^fift ' S^a^#^hardware/libhardware/power/power.c ' t (AndroidMM4#t^f'J»&ft^At£) ' $.#touchT«

& i ' B 4-11 % Android & BatteryService Ait ' B 4-12 % Android & PowerManagerServiceAt ' B 4-11AB 4-12%B 4-10&fe^At°

linux-2.6.25-android-1.0_r1/drivers/input/touchscreen/ucb1 400_ts.c - mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_ BatteryService.cpp - mydroid/cdma-import/hardware/libhardware/power/power.c °

B 4-8 Android M touch

E/EventHub( 1589): could not get driver version for /dev/input/mouseO I/EventHub( 1539): New device: path=/dev/input/eventO name=android-ke I/SystemServer( 1589): Starting Bluetooth Service.

I/EventHub( 1589): New keyboard: publicID=65537 device->id=65537 devn I/SystemServer( 1589): Starting Status Bar Service.

E/EventHub( 1589): could not get driver version for /dev/input/mice, I/KeyInputQueue( 1589): Device added: id=0x0, name=android-keypad, cl I/KeylnputQueue( 1589): Device added: id=OxlOOOO, name=null, classes=

I/KeylnputQueue( 1589): X: min=0 max=92Q flat=0 fuzz=0_

I/KeyInputQueue 158 9 : Y: min=0 max=950 flat=0 fuzz=0 I/KeylnputQueue( 158 9): Pressure: min=0 max=l flat=0 fuzz=0 I/KeylnputQueue( 1589): Size: unknown values

I/KeyInputQueue( 158 9): absX=com.android.server.InputDevice $Absolutel I/KeylnputQueue( 1589): absY=com.android.server.InputDeviceÎAbsolutel I/KeyInputQueue( 158 9): absPrèssure=com.android.server.InputDevice $Ab I/KeyInputQueue( 1589): absSize=null I/foo ( 1589): ***** HAVE TOUCHSCREEN!

I/WindowManager( 1589): Input configuration changed: { scale=1.0 imsi D/dalvikvm( 1589): GC freed 11328 objects / 708880 bytes in 162ms I/SysteraServer ( 1589): Starting Hardware Service. I/SystemServer( 1589): Starting NetStat Service. I/SystemServer( 1589): Starting Connectivity Service.

B 4-9 Android PXA270

B 4-10 £ Android ftT'tAff^f^fglli

B 4-11 AAndroidlBatteryService^f ° £Androidlf^#ili£lft '

Af^l^t- user space$.fflT7']^®&Linux device drivenf^'^f#Tf#-

Af^l^M^S^#^com_android_server_BatteryService

/sys/class/power_supply/ac/online

/sys/class/power_supply/usb/online

/sys/class/power_supply/battery/status

/sys/class/power_supply/battery/health

/sys/class/power_supply/battery/present

/sys/class/power_supply/battery/capacity

/sys/class/power_supply/battery/batt_vol

/sys/class/power_supply/battery/batt_temp

/sys/class/power_supply/battery/technology

AcOnlinc UsbOnline BatteryPresent Battery Level BatteryVoltage Batter/Temperature Battery Status BatteryHealth

B 4-11 Android & BatteryService At

B 4-12% Android & PowerManagerService At ° Android^ff^Linux kerneUo^t#-fg&^t ' ^^i^^^^^linux-2.6.25-android-1.0_r1/drivers/androidT ' user space^^T^^®^Linux device

/sys/android_power/acquire_partial_wake_lock /sys/android_power/acquire_full_wake_lock /sys/android_power/release_wake_lock /sys/android_power/request_state jtb^h ' Android Linux device driver :

/sys/class/leds/lcd-backlight/brightness

/sys/class/leds/button-backlight/brightness

/sys/class/leds/keyboard-backlight/brightness

AcOnlinc UsbOnline BatteryPresent Battery Level BatteryVoltage Batter/Temperature Battery Status BatteryHealth

H 4-12 Android $ PowerManagerService ¿fii!

4.4.4 Android

' kernel A Android ' ^#Linux kernelT^##4.3.3 'faAndroid$^#' Android^i^JDK[29] 6[24] ^T^JDK 5 (http://java.sun.com/javase/downloads/index_jdk5.jsp) ' >

atflS^MsystemAdata^[email protected]@i£^^f Android

Qualcomm

^ Linux kernel / device driver A Android i^HS^t0

4.5.1 Linux kernel / device driver

Android l^ft ' iffi Linux kernel / device driver linux-2.6.25-android-1.0_r1/kernel/printk.c linux-2.6.25-android-1.0_r1/kernel/irq/autoprobe.c linux-2.6.25-android-1.0_r1/init/main.c linux-2.6.25-android-1.0_r1/drivers/serial/pxa.c linux-2.6.25-android-1.0_r1/drivers/android/binder.c linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/pxa27x.c linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/generic.h linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/generic.c linux-2.6.25-android-1.0_r1/arch/arm/kernel/setup.c linux-2.6.25-android-1.0_r1/Makefile ( P#i£G)

linux-2.6.25-android-1.0_r 1/arch/arm/Makefile ( P#i£H)

linux-2.6.25-android-1.0_r1/arch/arm/configs/android_pxa270_defconfig ( P##I) linux-2.6.25-android-1.0_r1/arch/arm/kernel/head.S ( P#i£J) linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/clock.c ( P##K) linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/irq.c ( P##L) linux-2.6.25-android-1.0_r1/drivers/android/binder.c

18 Aflftffl(svn) diff ^^^tf&^lit linux-2.6.25-android-1.0_r1/drivers/cpufreq/Kconfig ( P##M)

linux-2.6.25-android-1.0_r1/drivers/i2c/chips/Makefile ( P#i£N)

linux-2.6.25-android-1.0_r1/drivers/i2c/chips/rtc8564.c19

linux-2.6.25-android-1.0_r1/drivers/i2c/chips/rtc8564.h19

linux-2.6.25-android-1.0_r1/drivers/input/keyboard/Kconfig ( P##O )

linux-2.6.25-android-1.0_r1/drivers/input/keyboard/Makefile ( P##P )

linux-2.6.25-android-1.0_r1/drivers/input/touchscreen/ucb1400_ts.c ( P##E)

linux-2.6.25-android-1.0_r1/drivers/net/smc91x.c linux-2.6.25-android-1.0_r1/drivers/video/pxafb.c ( P##B )

linux-2.6.25-android-1.0_r1/drivers/video/pxafb.h ( IW^C)

linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/pxa-regs.h linux-2.6.25-android-1.0_r1/include/linux/config.h ( P##Q)

linux-2.6.25-android-1.0_r1/arch/arm/boot/compressed/Makefile linux-2.6.25-android-1.0_r1/arch/arm/boot/compressed/head-creator-pxa270.S

linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/Kconfig linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/Makefile linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/creator-pxa270-core.c linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/creator-pxa270-irq.c linux-2.6.25-android-1.0_r1/arch/arm/mach-pxa/mach-creator-pxa270.c linux-2.6.25-android-1.0_r1/arch/arm/tools/mach-types linux-2.6.25-android-1.0_r1/drivers/i2c/chips/Kconfig linux-2.6.25-android-1.0_r1/ drivers/ide/Kconfig linux-2.6.25-android-1.0_r1/drivers/ide/arm/Makefile linux-2.6.25-android-1.0_r1/drivers/mtd/chips/jedec_probe.c linux-2.6.25-android-1.0_r1/drivers/mtd/maps/Kconfig linux-2.6.25-android-1.0_r1/drivers/mtd/maps/Makefile linux-2.6.25-android-1.0_r1/drivers/mtd/maps/creator-pxa270-flash.c linux-2.6.25-android-1.0_r1/drivers/pcmcia/Makefile linux-2.6.25-android-1.0_r1/drivers/pcmcia/pxa2xx-creator-pxa270.c linux-2.6.25-android-1.0_r1/drivers/video/Kconfig linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/creator-pxa270.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/creator-regs.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/hardware.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/irqs.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/creator_pxa270_addr.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/creator_pxa270_core.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/creator_pxa270_usb.h

19 fêfîTft Driver for system3's EPSON RTC 8564 chip linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/def.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/genfont8_8.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Ata.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Common.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Hal4ata.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Hal4d12.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Hal4sys.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/Isr.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/basictyp.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/chap_9.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/kthread.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/rbc.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/rbccmd.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/syscnfg.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/tpbulk.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/usb-storage.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/usb.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/lib/usb/usb100.h linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/pxa-regs.h linux-2.6.25-android-1.0_r1/drivers/input/keyboard/android_keypad.c ( IW^D )

linux-2.6.25-android-1.0_r1/include/asm-arm/arch-pxa/android_keypad.h

4.5.2 Android

Android &^tt ' Linux kernel / device driver ' mydroid/cdma-import/build/core/api/current.xml mydroid/cdma-import/frameworks/base/core/java/android/app/Activity.java mydroid/cdma-import/frameworks/base/core/java/android/app/ActivityThread.java mydroid/cdma-import/frameworks/base/core/java/android/app/ApplicationContext.java mydroid/cdma-import/frameworks/base/core/java/android/text/method/touch.java mydroid/cdma-import/frameworks/base/core/java/android/util/Log.java mydroid/cdma-import/frameworks/base/core/java/android/view/MotionEvent.java mydroid/cdma-import/frameworks/base/core/java/android/view/touchDelegate.java mydroid/cdma-import/frameworks/base/core/java/android/view/View.java mydroid/cdma-import/frameworks/base/core/java/android/view/ViewGroup.java mydroid/cdma-import/frameworks/base/core/java/com/android/internal/widget/LinearL

ayoutWithDefaulttouchRecepient.java mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_KeyInput Queue.cpp mydroid/cdma-import/frameworks/base/libs/surfaceflinger/DisplayHardware/DisplayH ardwareBase.cpp mydroid/cdma-import/frameworks/base/libs/surfaceflinger/RFBServer.cpp mydroid/cdma-import/frameworks/base/libs/ui/EventHub.cpp mydroid/cdma-import/frameworks/base/services/java/com/android/server/InputDevice.j ava mydroid/cdma-import/frameworks/base/services/java/com/android/server/KeyInputQue ue.java mydroid/cdma-import/frameworks/base/services/java/com/android/server/PowerManag erServicejava mydroid/cdma-import/frameworks/base/services/java/com/android/server/WindowMana gerService.java mydroid/cdma-import/system/core/init/init.c mydroid/cdma-import/system/core/sh/input.c mydroid/cdma-import/build/core/definitions.mk (P##R) mydroid/cdma-import/external/sqlite/dist/Android.mk (P##S)

mydroid/cdma-import/frameworks/base/core/jni/server/com_android_server_BatterySer vice.cpp (P#ifT)

mydroid/cdma-import/hardware/libhardware/power/power.c ( P##U)

0 0

Post a comment