init: cannot setexeccon(‘u:r:logd:s0‘): Invalid argument

2023-12-07 23:19

本文主要是介绍init: cannot setexeccon(‘u:r:logd:s0‘): Invalid argument,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

android 8.0添加新的sepolicy权限后,烧boot.img,system.img到手机里面,发现服务无法起来:
init: cannot setexeccon('u:r:logd:s0'): Invalid argument
service logcatserive /system/bin/logcat -v threadtime  -b radio -r 1024 - -n 10 -f /data/logcat-radio-log
class late_start
user root
group system
disabled
seclabel u:r:logcat:s0
一般这样的报错有两种原因:
1、要seclable的文件不存在,例如上面的service,/system/bin/logcat不存在,就要查看手机里面改文件是否存在,对应的权限是否正确;
2、Android 8.0上面,Sepolicy权限发生了变化, device/XXX/YYY/sepolicy 存储在vendor.img中,假设修改的权限再该目录中,就要同时刷入vendor.img到手机中,
否则会报该错误,cannot setexeccon;
Android 8.0权限相关资料:
Policy placement
In Android 7.0, partners could add policy to BOARD_SEPOLICY_DIRS, including policy meant
to augment AOSP policy across different device types. In Android 8.0, adding a policy to
BOARD_SEPOLICY_DIRS places the policy only in the vendor image.
In Android 8.0 AOSP, policy exists in the following locations:
● system/sepolicy/public. Includes policy exported for use in vendor-specific policy.
Everything goes into the Android 8.0 compatibility infrastructure, and vendors include
it as part of their policy so it can be relied upon (leading to restrictions on the type of
policy that can be placed here). Consider this the platform’s exported policy API:
Anything that deals with the interface between /system and /vendor should be here.
● system/sepolicy/private. Includes policy necessary for the functioning of the system
image, but of which vendor image policy should have no knowledge.
● system/sepolicy/vendor. Includes policy for components that go in /vendor but exist
in the core platform tree (not device-specific directories). This is an artifact of build
system’s distinction between devices and global components; conceptually this is a
part of the device-specific policy described below.
● device/XXX/YYY/sepolicy. Includes device-specific policy. Also includes device
customizations to policy, which in Android 8.0 now corresponds to policy for
components on the vendor image
 

这篇关于init: cannot setexeccon(‘u:r:logd:s0‘): Invalid argument的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/467687

相关文章

ImportError: cannot import name ‘print_log‘ from ‘logging‘

mmcv升级到2.+后删除了很多 解决 查FAQ文档,找到 添加到mmcv.utils下即可

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef‘ of undefined“

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef’ of undefined” 最近用vue做的一个界面,引入了一个子组件,在父组件中调用子组件的方法时,报错提示: [Vue warn]: Error in v-on handler: “TypeError: Cannot read property ‘methods

Unstructured cannot write mode RGBA as JPEG 错误解决

Unstructured cannot write mode RGBA as JPEG 错误解决 0. 错误详细1. 解决方法 0. 错误详细 Image Extraction Error: Skipping the failed imageTraceback (most recent call last):File "/root/miniconda3/envs/learn-y

Cannot read property ‘length‘ of null while opening vscode terminal

同一问题地址:Cannot read property ‘length’ of null while opening vscode terminal 问题描述 One day, 我在ubuntu 18.04下用vscode打开一个项目,并想和往常一样在vscode使用终端,发现报错Cannot read property 'length' of null。 解决 打开setting.jso

The import com.google cannot be resolved

The import com.google cannot be resolved,报错: 第一感觉就是缺少jar包,因为项目用maven管理,所以在pom.xml中添加: <dependency>  <groupId>com.google.code.gson</groupId>  <artifactId>gson</artifactId>  <version>2.3.1</ver

error while loading shared libraries: libnuma.so.1: cannot open shared object file:

腾讯云CentOS,安装Mysql时: 1.yum remove libnuma.so.1 2.yum install numactl.x86_64

【NodeJS】Error: Cannot find module 'ms'

转载自:http://blog.csdn.net/echo_ae/article/details/75097004 问题: Error: Cannot find module 'ms'at Function.Module._resolveFilename (module.js:469:15)at Function.Module._load (module.js:417:25)at Module

iOS项目发布提交出现invalid code signing entitlements错误。

1、进入开发者账号,选择App IDs,找到自己项目对应的AppId,点击进去编辑, 2、看下错误提示出现  --Specifically, value "CVYZ6723728.*" for key "com.apple.developer.ubiquity-container-identifiers" in XX is not supported.-- 这样的错误提示 将ubiquity

4.15 版本内核调用 init_timer()函数出错

linux/include/linux/timer.h4.15 之前版本struct timer_list {14 /*15 * All fields that change during normal runtime grouped to the16 * same cacheline17 */18 struct hl

SVN Cornerstone 报错信息 xcodeproj cannot be opened because the project file cannot be parsed.

svn点击update 之后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened because the project file cannot be parsed. 发现项目中代码全没了。只有一个空的工程名字,因为xcodeproj工程文件冲突了,然后就是svn强制给你更新了,内部的文件冲突了,你们改了同样的地方的一段代码,可能是你们只是多加