关于CTS的testPackageSignatures()

07-19 16:13:32.729 I/TestRunner(  720):
junit.framework.AssertionFailedError: These packages should not be
signed with a well known key: [com.android.soundrecorder,
com.android.voicedialer, com.android.defcontainer,
com.android.launcher, com.android.quicksearchbox,
com.android.contacts, com.android.inputmethod.latin,
com.android.phone, com.qualcomm.wiper, com.android.calculator2,
com.android.htmlviewer, com.android.globaltime,
com.android.MultiplePdpTest, com.android.bluetooth,
com.android.providers.calendar, com.android.calendar,
com.android.browser, com.android.music, com.cooliris.media,
com.android.stk, com.android.qualcomm,
com.android.providers.downloads.ui, com.android.globaltimetests,
com.android.providers.userdictionary, android.tts, com.android.mms,
com.android.provision, com.android.providers.media,
com.android.certinstaller, com.qualcomm.location.qvtester,
com.qualcomm.permission.locapi, com.quicinc.CrashLogger,
touchscreen.test, android, com.quicinc.fmradio, com.android.settings,
com.android.providers.contacts, com.qualcomm.qx.neocore,
com.android.protips, com.qualcomm.alerter,
com.android.providers.applications, com.qualcomm.wifi.softap,
com.android.providers.drm, com.android.musicvis, com.android.term,
com.android.systemui, com.android.wallpaper.livepicker,
com.android.speechrecorder, com.android.development,
com.android.packageinstaller, com.android.wallpaper,
com.android.providers.telephony,
com.android.providers.subscribedfeeds, com.svox.pico,
com.android.camera, com.android.email, com.qualcomm.cabl,
com.android.spare_parts, com.android.deskclock,
com.android.magicsmoke, com.android.providers.settings,
com.android.preflight.media, com.android.providers.downloads,
com.qualcomm.privinit, com.android.server.vpn]

 

See code snippet under ./tests/tests/
security/src/android/security/cts/PackageSignatureTest.java

        for (PackageInfo packageInfo : allPackageInfos) {
            String packageName = packageInfo.packageName;
            if (packageName != null && !
isWhitelistedPackage(packageName)) {
                for (Signature signature : packageInfo.signatures) {
                    if (wellKnownSignatures.contains(signature)) {

badPackages.add(packageInfo.packageName);                    }
                }
            }
        }

        assertTrue("These packages should not be signed with a well
known key: " + badPackages,
                badPackages.isEmpty());

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值