实例演示
关闭和启动init.rc中的console 服务
service console /system/bin/sh
class core
console
disabled
user shell
group log
代码实现
shell :
setprop ctl.start service_name
setprop ctl.stop service_name
JNI:
property_set("ctl.start", service_name);
property_set("ctl.stop", service_name);
权限
uid == AID_SYSTEM || uid == AID_ROOT
参见 system/core/init/property_service.c中check_control_perms函数
原文链接:https://blog.csdn.net/aeolia_zhang/article/details/20126031
原文:https://www.cnblogs.com/aspirs/p/12488905.html