常见的PKMS问题分析

在Android设备从早期版本更新到6.0时,遇到预装应用如Google Play服务或商店反复崩溃的问题,导致设备无法使用。问题出现在OTA更新过程中删除系统映像中的应用或更改其包名。在`DefaultPermissionGrantPolicy.java`中,针对系统组件和持久平台签名的私有应用的检查存在潜在错误,修复方案是检查`sysPkg.pkg`是否为null。
摘要由CSDN通过智能技术生成
1.Steps to reproduce the problem:
Device updates from an earlier version to any version of Android 6.0.
Symptom of the problem:
Preloaded apps (e.g. Google Play services or Google Play Store) crash repeatedly, leaving the device in an
unusable state.


Preconditions of when the problem would be reproduced:
If an app is removed from the system image or its package name is renamed during the OTA update
process.


frameworks/base / services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
    private boolean isSysComponentOrPersistentPlatformSignedPrivAppLPr(PackageParser.Package pkg) {
        if (UserHandle.getAppId(pkg.applicationInfo.uid) < FIRST_APPLICATION_UID) {
            return true;
        }
        if (!pkg.isPrivilegedApp()) {
            return false;
        }
        PackageSetting sysPkg = mService.mSettings.getDisabledSyst
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值