NEXUS 5 added services to drive hardware abstraction layer

Then the above article, this is to add services to the abstraction layer, the same Luo code.
Define the hardware access service interface, as shown in FIG.
NEXUS 5 added services to drive hardware abstraction layer
Add configuration items.
NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer

Initialize the environment.

source build/envsetup.sh
export PATH=/home/haidragon/Desktop/java-7-openjdk-amd64/bin/:$PATH
lunch 

Then compile the service interface.

mmm ./frameworks/base/

NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
View framework.jar
NEXUS 5 added services to drive hardware abstraction layer
hardware access services, where the path is not the same but we will probably look quite know where the good. Meanwhile Luo also gave tips. He has given more than a source book catalog also SystemServer.java up and the corresponding source code, in fact, is to tell us and his in the same directory.
To put it here.
NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
However, he compiled in.

mmm ./frameworks/base/services/core/

NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
But the ultimate goal is to pack again to services.jar all inputs:

mmm ./frameworks/base/services/

NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
JNI method now implements hardware access services.
NEXUS 5 added services to drive hardware abstraction layer

Modify onload.cpp
NEXUS 5 added services to drive hardware abstraction layer
modify the configuration
NEXUS 5 added services to drive hardware abstraction layer
compiled :( layers of compiling it has android.mk directory, do not be lazy)

mmm ./frameworks/base/services/core/jni/
mmm ./frameworks/base/services/core/
mmm ./frameworks/base/services/
mmm ./frameworks/base/

Also have to modify the source code with the addition of A
NEXUS 5 added services to drive hardware abstraction layer
NEXUS 5 added services to drive hardware abstraction layer
check
NEXUS 5 added services to drive hardware abstraction layer
last update system.img

make snod

NEXUS 5 added services to drive hardware abstraction layer
Brush into the phone line.

Guess you like

Origin blog.51cto.com/haidragon/2409664