1、源码路径关于selinux的资料可以查阅:http://blog.csdn.net/innost/article/details/19299937
system/core/init/init.cpp
2、源码方法名 -> selinux_is_enforcing
static bool selinux_is_enforcing(void) { if (ALLOW_PERMISSIVE_SELINUX) { return selinux_status_from_cmdline() == SELINUX_ENFORCING; } return true; }3、修改
static bool selinux_is_enforcing(void) { //zjp update return false; }二、默认开启开发者选项 1、修改开发者选项的显示
源码路径:packagesappsSettingssrccomandroidsettingsSettingsActivity.java源码
final boolean showDev = mDevelopmentPreferences.getBoolean( DevelopmentSettings.PREF_SHOW, android.os.Build.TYPE.equals("eng")) && !um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES);*/
修改
//zjp update final boolean showDev = true;2、修改开发者选项的开关
源码路径:build/make/core/main.mk源码
else # !enable_target_debugging # Target is less debuggable and adbd is off by default ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 endif # !enable_target_debugging
修改
else # !enable_target_debugging # zjp update # Target is less debuggable and adbd is off by default ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 endif # !enable_target_debugging
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)