关于 Cannot install platform packages to user storage

 Cannot install platform packages to user storage 

这是由于android2.3.7上 限制用户安装有platform签名的apk包  

源码在

 ANDROID/frameworks/base/services/java/com/android/server/PackageManagerService.java

        if (!pkg.applicationInfo.sourceDir.startsWith(Environment.getRootDirectory().getPath()) &&
                !pkg.applicationInfo.sourceDir.startsWith("/vendor")) {
            Object obj = mSettings.getUserIdLP(1000);
            Signature[] s1 = null;
            if (obj instanceof SharedUserSetting) {
                s1 = ((SharedUserSetting)obj).signatures.mSignatures;
            }
            if ((checkSignaturesLP(pkg.mSignatures, s1) == PackageManager.SIGNATURE_MATCH)) {
                Slog.w(TAG, "Cannot install platform packages to user storage");
                mLastScanError = PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION;
                return null;
            }
        }


你可能感兴趣的:(关于 Cannot install platform packages to user storage)