大纲:
1. Android剖析
Linux内核本地库(Native Libraries)Android运行时(Android Runtime)应用框架
2. Android运行机制
启动流程层间交互(Layer Interaction)
一、 Android剖析
如下图所示为Android的架构图

1. Linux内核
Android系统基于Linux内核,但是Android不是Linux。没有本地的窗口系统。没有glibc库的支持。不包括完整的标准Linux工具集。标准的Linux 2.6.24内核。内核增强补丁来支持Android。







|
1
2
3
4
5
6
7
8 |
// must be provided by each Acme hardware implementationtypedef struct {int (*foo)( void
);char (*bar)( void
);…} AcmeFunctions;const
AcmeFunctions *Acme_Init(const
struct Env *env, int
argc, char**argv); |
|
1
2
3
4
5
6 |
dlHandle = dlopen(“/system/lib/libacme.so”, RTLD_NOW);...acmeInit = (const
AcmeFunctions *(*)(const
struct Env *, int, char
**))dlsym(dlHandle, ”Acme_Init);...acmeFuncs = acmeInit(&env, argc, argv); |


|
1 |
LocationManager lm = (LocationManager)Context.getSystemService(Context.LOCATION_SERVICE); |























原文:http://www.cnblogs.com/CaptainLin/p/3589998.html