9.0 ota user版本升级失败,debug升级成功

公司自己做的ota升级apk,下载升级包升级时,提示package compatibility verification failed;
不同的ota apk报的错可能不一样,log应该都是一样的;9.0对权限的管理比较严格。
avc: denied { read } for name=“config.gz” dev=“proc” ino=4026532109 scontext=u:r:system_app:s0 tcontext=u:object_r:config_gz:s0 tclass=file permissive=0

报的权限问题基本是一样的,但是object_r:config_gz ;config_gz 名称,还有 tclass=file的类型;scontext=u:r:system_app: 这个是需要在哪里加权限;上面这个是缺少read权限。
网上查看是在device/XXX/sepolicy/basic/non_plat/system_app.te 中;有些权限可以在这里加,但是上面config_gz和 selinuxfs可能是私有的,不能在device下面定义;

正确是 在system/sepolicy/private/system_app.te
+allow system_app config_gz:file { read open };
+allow system_app selinuxfs:file { read open };

下面是报错的log

09-17 09:42:12.229  1352  1352 W View    : requestLayout() improperly called by android.widget.TextView{d12a5a7 V.ED..... ......ID 861,-198-1059,-155 #7f0a0354 app:id/system_year_day} during second layout pass: posting in next frame
09-17 09:42:12.236  2510  2839 E libvintf: Could not open /proc/config.gz: 13
09-17 09:42:12.236  2510  2839 W libvintf: Cannot fetch or parse /proc/config.gz: Permission denied
09-17 09:42:12.229  2510  2510 W RxCachedThreadS: type=1400 audit(0.0:258): avc: denied { read } for name="config.gz" dev="proc" ino=4026532109 scontext=u:r:system_app:s0 tcontext=u:object_r:config_gz:s0 tclass=file permissive=0
09-17 09:42:12.236  2510  2839 W libvintf: Cannot fetch or parse kernel sepolicy version: Operation not permitted
09-17 09:42:12.233  2510  2510 W RxCachedThreadS: type=1400 audit(0.0:259): avc: denied { read } for name="policyvers" dev="selinuxfs" ino=10 scontext=u:r:system_app:s0 tcontext=u:object_r:selinuxfs:s0 tclass=file permissive=0
09-17 09:42:12.240  2510  2839 W VintfObject: VintfObject.verify() returns 1: Runtime info and framework compatibility matrix are incompatible: kernelSepolicyVersion = 0 but required >= 30
09-17 09:42:12.241  2510  2839 W System.err: java.security.SignatureException: package compatibility verification failed
09-17 09:42:12.241  2510  2839 W System.err: 	at android.os.RecoverySystem.verifyPackage(RecoverySystem.java:352)
09-17 09:42:12.241  2510  2839 W System.err: 	at com.neostra.systemsettiing.ui.service.DownloadService.verify(DownloadService.java:181)
09-17 09:42:12.241  2510  2839 W System.err: 	at com.neostra.systemsettiing.ui.service.DownloadService.access$1100(DownloadService.java:50)
09-17 09:42:12.241  2510  2839 W System.err: 	at com.neostra.systemsettiing.ui.service.DownloadService$5.accept(DownloadService.java:237)
09-17 09:42:12.241  2510  2839 W System.err: 	at com.neostra.systemsettiing.ui.service.DownloadService$5.accept(DownloadService.java:231)
09-17 09:42:12.241  2510  2839 W System.err: 	at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:62)
09-17 09:42:12.241  2510  2839 W System.err: 	at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:400)
09-17 09:42:12.241  2510  2839 W System.err: 	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
09-17 09:42:12.241  2510  2839 W System.err: 	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
09-17 09:42:12.241  2510  2839 W System.err: 	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
09-17 09:42:12.241  2510  2839 W System.err: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
09-17 09:42:12.241  2510  2839 W System.err: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
09-17 09:42:12.241  2510  2839 W System.err: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-17 09:42:12.241  2510  2839 W System.err: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-17 09:42:12.241  2510  2839 W System.err: 	at java.lang.Thread.run(Thread.java:764)
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

心有纤纤结

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值