android recovery设置selinux为permissive
我们在调试开发阶段,经常需要把selinux关闭,则我们修通过设置uboot env来设置为允许状态:setenv EnableSelinux permissive;save
我们如果需要一直设置为permissive模式,不需要通过uboot env去控制,可以这样修改(android 9.0上面验证):
system/core/init下面打patch:
diff --git a/init/selinux.cpp b/init/selinux.cpp
index 0ba5c4a..ab457d5
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -392,7 +392,7 @@ void SelinuxInitialize() {bool kernel_enforcing = (security_getenforce() == 1);bool is_enforcing = IsEnforcing();if (kernel_enforcing != is_enforcing) {
- if (security_setenforce(is_enforcing)) {
+ if (security_setenforce(0)) {PLOG(FATAL) << "security_setenforce(%s) failed" << (is_enforcing ? "true" : "false");}}
android recovery设置selinux为permissive相关推荐
- android+关闭selinux权限问题,快速解决Android中的selinux权限问题【转】
在Android开发的过程中,遇到关于selinux相关的东西,当时还一下子看不懂,现在好像有点眉目了. 比如,内核打印这个提示 type=1400 audit(32.939:25): avc: de ...
- Android ADB关闭Selinux ( adb shell setenforce 0 )
adb shell setenforce 0 setenforce 0 :设置SELinux 成为permissive模式 临时关闭selinux的 在eng/userdebug版本中 使用seten ...
- android系统user/userdebug版本设置selinux到SELINUX_PERMISSIVE模式
不是针对消费电子,像工控特殊行业应用,有时需要将android的selinux强行打开. 方法如下: 1.system\core\init\Android.mk --- a/system/core/i ...
- Android 系统添加SELinux权限
CPU:RK3288 系统:Android 5.1 SELinux 主要由美国国家安全局开发.2.6 及以上版本的 Linux 内核都已经集成了 SELinux 模块. 通过虚拟文件系统 proc 来 ...
- Android recovery支持adb shell
Android recovery支持adb shell 最近开发过程注意到recovery不支持adb shell,为了便于调试方便,决定增加此功能. 刚开始我们采用的是user版本系统,进入reco ...
- android返回后屏幕旋转了,Android recovery 模式下屏幕显示旋转
Android recovery 模式下屏幕显示旋转 大家在网上搜索 Android屏幕旋转,成千上万的文章,但是没有几个是写recovery 模式的.难道你们只旋转正常模式下的屏幕方向,不管reco ...
- MTK 驱动(66)---Android recovery UI实现分析
Android recovery UI实现分析 Android recovery模式为何物? 关于这个问题, baidu上已经有无数的答案,不理解的朋友先补习一下.从纯技术角度来讲, recovery ...
- android recovery 和reboot
android recovery 和reboot recovery工作的是要bootloader支持的,因为bootloader要选择启动哪个kernel和ramdisk. 设置模块中进行恢复出厂设 ...
- 又一篇Android Recovery的文章
TOP: uboot里会读取 环境 变量类似的东西,判断是否进入RECOVERY 进入则load recovery.img 不进则load kernel.img 进入recovery: kernel ...
最新文章
- sum除以count 和avg 的区别_EXCEL函数之计数COUNT系列
- SpringCloud-使用路由网关统一访问接口(附代码下载)
- leetcode 557. 反转字符串中的单词 III(Java版)
- myeclipse查询mysql出来的汉字是乱码
- 【Spring Cloud】网关-gateway(2.x)
- HTML网页设计结课作业——19张精美网页!
- Linux Command hping3 测试网络安全工具
- 2012 r2 万能网卡驱动_MultiBeast | 黑苹果的驱动精灵简单使用解读
- 第073封“情书”:小目标20181022Using UV Layout ForGeometryPacking<Entagma>Houdini 2018
- HDU 6287 口算训练
- 机动车尾气排放模型综述
- Simulink数据保存提取和示波器显示
- LibreOffice/Calc:单元格设置下拉菜单
- VUE+VSCODE(新建一个项目)
- HTML超链接怎么设置下拉菜单,html超链接怎么设置
- kubernetes(k8s)全面介绍
- 基于stm32Cubemx的矩阵键盘配置
- 数据结构与计算机网络,如何把计算机原理,操作系统,数据结构和计算机网络结合起来...
- C# 超级简单的Telnet (TcpClient)客户端
- PMP证书的含金量高吗?值得考吗?