CTS

make cts -j4

1.进入CTS测试的命令行模式

./android-cts/tools/cts-tradefed

2.启动CTS测试,测试CTS的全部测试计划

run cts --plan cts --disable-reboot

3.启动CTS测试,CTS的单项测试

run cts -p [packageName]

4.--help查询包名
public static final String FEATURE_TELEPHONY = "android.hardware.telephony";
public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";
private static final Intent PHONE_INTENT = new Intent(Intent.ACTION_DIAL);


private boolean isPhoneVisible() {
        PackageManager pm = mContext.getPackageManager();
        return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)
                && pm.resolveActivity(PHONE_INTENT, 0) != null;
    }

PackageManagerService.java


etc/permissions/


if (!TestUtils.shouldTestTelecom(mContext)) {
            return;
        }

android.telecom

/**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device has a telephony radio with data
     * communication support.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TELEPHONY = "android.hardware.telephony";

/**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The Connection Service API is enabled on the device.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";


handheld_core_hardware.xml


$adb shell
$cd etc/permissions/

5.罗列所有包名

l packages


out/host/linux-x86/cts/android-cts/repository/testcases/CtsTelephonyTestCases.apk

如果平板不支持拨号功能,导致在测试CTS测试失败failed。需要修改配置 /etc/×.xml





你可能感兴趣的:(CTS)