Wednesday, August 22, 2012


What to do if CTS tool is not detecting the android device but adb is detecting a device?

Sometimes if we have done any changes not compliant to android, then this problem will happen.

1) if the CTS tool is not detecting the andorid device, we need to check the
platform/tools/tradefederation source code. This is having DeviceStateMonitor module.

2) By running cts-tradefed, it will saves the logs in tmp/log_xxx.txt. we can check error logs
from here and match the platform/tools/tradefederation source code.

running cts-tradefed,
we will get CTS prompt.

cts-tf>list devices

list devices will give device and its state.

Device states are available,Unavailable and allocated.

Allocated state -Allocated state device is currently running tests.
Available state- Device is available CTS is able to detect the device
Unavailable state- Device can be

    To check "available" state, waitForDeviceAvailable() will be called from DeviceStateMonitor.java.

WaitForDeviceAvailable()
{
// A device is currently considered "available" if and only if three events are true:
        // 1. Device is online aka visible via DDMS/adb
        // 2. Device's package manager is responsive
        // 3. Device's external storage is mounted
        //

}

 waitForDeviceAvailable() function will be varying for every android version.

0 Comments:

Post a Comment

<< Home