概述
pm 可以执行程序
1|m891a:/ # which pm
/system/bin/pm
m891a:/ # cat /system/bin/pm
#!/system/bin/sh
cmd package "$@"
m891a:/ #
源码位置:AOSP/frameworks/base/cmds/*
cmd文件位置:AOSP/frameworks/native/cmds/cmd/cmd.cpp
if ((argc == 2) && (strcmp(argv[1], "-l") == 0)) {
Vector<String16> services = sm->listServices();
services.sort(sort_func);
aout << "Currently running services:" << endl;
for (size_t i=0; i<services.size(); i++) {
sp<IBinder> service = sm->checkService(services[i]);
if (service != NULL) {
aout << " " << services[i] << endl;
}
}
return 0;
}
可以使用cmd -l
列出所有服务
接下来会调用Package manager (package) commands
127|m891a:/ # cmd package
Package manager (package) commands:
help
Print this help text.
path [--user USER_ID] PACKAGE
Print the path to the .apk of the given PACKAGE.
dump PACKAGE
Print various system state associated with the given PACKAGE.
list features
Prints all features of the system.
......
最后
以上就是合适长颈鹿为你收集整理的Android 9 pm命令执行流程调查的全部内容,希望文章能够帮你解决Android 9 pm命令执行流程调查所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复