1.添加自定义服务
可参考该文章:http://processors.wiki.ti.com/index.php/Android-Adding_SystemService
非常清晰
2.添加服务后出现的问题
1)出现”add_service(‘privacy’,1c) uid=1000 - PERMISSION DENIED”这种问题,该问题就是不让你添加自己的服务,为什么呢?因为自从android4.0以后引入了MAC机制,selinux不允许你添加不符合规范的服务.
如何解决呢?
在自定义服务的名称前面加上现有服务名称作为前缀就可以了(通过大量的google).
试试吧
喜欢看英文的可以该贴:http://forum.xda-developers.com/xposed/devs-how-to-selinux-restrictions-t2775101/page8
3.编译指令
Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:
lunch: lunch <product_name>-<build_variant>
tapas: tapas [<App1> <App2> ...] [arm|x86|mips|armv5] [eng|userdebug|user]
croot: Changes directory to the top of the tree.
m: Makes from the top of the tree.
mm: Builds all of the modules in the current directory, but not their dependencies.
mmm: Builds all of the modules in the supplied directories, but not their dependencies.
To limit the modules being built use the syntax: mmm dir/:target1,target2.
mma: Builds all of the modules in the current directory, and their dependencies.
mmma: Builds all of the modules in the supplied directories, and their dependencies.
cgrep: Greps on all local C/C++ files.
jgrep: Greps on all local Java files.
resgrep: Greps on all local res/*.xml files.
godir: Go to the directory containing a file.