1. Check out our companion app, Forums for Android! Download from Google Play

regarding android CTS test on Device

Discussion in 'Android Lounge' started by abhilashpujari, Jun 24, 2010.

  1. abhilashpujari

    abhilashpujari New Member
    Thread Starter

    Jun 24, 2010
    i am working on android CTS test, i am getting API check time out error whenever i start test plan CTS, i followed the below steps for CTS test and also i mentioned my doubts.

    CTS test steps :

    1. Please download and install the Android 1.6 SDK on your machine.

    2. Your phone should be running a user build (Android 1.6 and later) from

    3. Please refer to this link on the Android developer site and set up your device

    4. Make sure that your device has been flashed with a user build (Android 1.6 and
    later) before you run CTS.

    5. You need to download the TTS files via Settings > Speech synthesis > Install
    voice data before running CTS tests. (Note that this assumes you have Android
    Market installed on the device, if not you will need to install the files manually via

    6. It is advisable to log in to the device with a test Google account, not an account
    that you actually use.

    7. Make sure the device has a SD card plugged in and the card is empty. Warning:
    CTS may modify/erase data on the SD card plugged in to the device.

    8. Do a factory data reset on the device (Settings > SD Card & phone storage >
    Factory data reset). Warning: This will erase all user data from the phone.

    9. Make sure no lock pattern is set on the device (Settings > Security & location >
    Require Pattern should be unchecked.
    Google Confidential

    10. Make sure the "Screen Timeout" is set to "Never Timeout" (Settings > Sound &
    Display > Screen Timeout should be set to "Never Timeout".

    11. Make sure the "Stay Awake" development option is checked (Settings >
    Applications > Development > Stay awake).

    12. Make sure Settings > Application > Development > Allow mock locations is set
    to true.

    13. Make sure the device is at the home screen at the start of CTS (Press the home

    14. While a device is running tests, it must not be used for any other tasks.

    15. Do not press any keys on the device while CTS is running. Pressing keys or
    touching the screen of a test device will interfere with the running tests and may
    lead to test failures.

    doubts :

    1) is it necessary to follow all the steps ?
    2) for step 5, i copied the voice data to the SD card and if i follow step 8 it will erase all contents of SD card so how can i follow both step 5 and step 8 at a time...?

    error message while doing CTS test on Device :

    pvteam@pvteam-desktop:~/Desktop/android-cts/tools$ ./startcts
    Android CTS version 2.1_pre_r1
    Device(HT9A4LV00787) connected
    cts_host > start --plan CTS
    cts_host > There are 3 existing session(s) for plan CTS.
    Create a new session or choose an existing one?
    Create a new session [0]
    Choose a session [1]
    install met failure [install_failed_older_sdk]
    start test plan CTS
    install met failure [install_failed_older_sdk]

    CTS_INFO >>> Checking API...

    CTS_INFO >>> This might take several minutes, please be patient...
    uninstall met failure
    API Check TIMEOUT.

    CTS_INFO >>> Max ADB operations reached. Restarting ADB...

    CTS_INFO >>> Restarting device ...

    the Device restart took place three times then i stoped the CTS test, please give suggestions on this issue.



  2. Morton Zheng

    Morton Zheng Member

    Sep 22, 2010
    1.It is advisable to follow all steps
    2.You can do step 8 before step 5
    3.Before running cts,you have to install a apk file(CtsDelegatingAccessibilityService.apk)
    4.You can edit max adb operation counts in host_config.xml
    5.You'd best to update your SDK and cts to 2.2
    Good luck!
  3. swamireddy

    swamireddy New Member

    Nov 17, 2010
    Hi Abbhilash,

    Is the below timeout issue resolved?? If yes, could you plz let me know the steps to avoid the same.

  4. Robin Xu

    Robin Xu New Member

    Nov 25, 2010
    As Morton suggested, please change the maxTestCount value to "0" in host_config.xml in folder repository just as below. With this change, testing will be launced successfully and ongoing smoothly.

    <IntValue name="maxTestCount" value="0" />
  5. confusedwithCTS

    confusedwithCTS New Member

    Dec 14, 2010
    Dear helper,

    I am new to CTS, could you please tell me how to do steps 5 and 6 here? I don't have market installed on my device. I have android-sdk 1.7 and CTS 2.2 installed,

    even if AppSecurity test are all passed, I always get a CTS_ERROR "failed to execute shell command am instrument -w -e bundle true android.tests.devicesetup/android.tests.getinfo.DeviceInfoInsrument on device
    com.android.ddmlib.AdbCommandRejectedExceptin: closed.

    Also, I got some fails and Timeouts when doing other tests such as Android or CTS.

    your help is highly appreciated.

  6. kimo422

    kimo422 New Member

    Feb 8, 2011

    DId the issue get resolved?
    I am also facing the same issue?

Share This Page