Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Device states in Tradefed
Stay organized with collections
Save and categorize content based on your preferences.
Android devices
Android devices in Tradefed can go through several states made available through
the Device Manager. There are two main categories of states for Android devices:
Allocation state and Online State.
All of these states can be checked in the
Tradefed Console using
l d
or list devices
.
tf >l d
Serial State Allocation Product Variant Build Battery
84TX0081B ONLINE Available blueline blueline MASTER 100
HT6550300002 ONLINE Available sailfish sailfish MASTER 94
876X00GNG UNAUTHORIZED Unavailable unknown unknown unknown unknown
HT6570300047 UNAUTHORIZED Unavailable unknown unknown unknown unknown
Allocation states
Allocation states are Tradefed-specific states to monitor device use. They
are described by
DeviceAllocationState
and can be any of:
- UNKNOWN: An intermediate state used during transitions to decide if the
device should be removed from the tracking list. This would happen when a
device is disconnected from
adb
.
- IGNORED: Device cannot be selected for the TF session because it was
filtered out. Most likely TF was started with
ANDROID_SERIAL
exported, so
it limits the scope of devices that can be picked.
- AVAILABLE: Device is ready to be selected for a test.
- UNAVAILABLE: Device is connected but not ready to run tests. It usually
shows as
offline
in adb
.
- ALLOCATED: Device is currently running a test and cannot be selected.
- CHECKING_AVAILABILITY: Device was just connected, and TF checks whether it
is properly online and can be made available. If not, it will be made
unavailable.
Online states
Online states represent the actual state of the device as seen by adb devices
.
They are described by
TestDeviceState
and can be:
- FASTBOOT
- ONLINE
- RECOVERY
- NOT_AVAILABLE
Tradefed online states are linked to the underlying adb
library we use,
ddmlib
. It describes the states with
DeviceState.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-18 UTC."],[],[],null,["# Device states in Tradefed\n\nAndroid devices\n---------------\n\nAndroid devices in Tradefed can go through several states made available through\nthe Device Manager. There are two main categories of states for Android devices:\nAllocation state and Online State.\n\nAll of these states can be checked in the\n[Tradefed Console](/docs/core/tests/tradefed/fundamentals/console) using\n`l d` or `list devices`. \n\n tf \u003el d\n Serial State Allocation Product Variant Build Battery\n 84TX0081B ONLINE Available blueline blueline MASTER 100\n HT6550300002 ONLINE Available sailfish sailfish MASTER 94\n 876X00GNG UNAUTHORIZED Unavailable unknown unknown unknown unknown\n HT6570300047 UNAUTHORIZED Unavailable unknown unknown unknown unknown\n\n### Allocation states\n\nAllocation states are Tradefed-specific states to monitor device use. They\nare described by\n[DeviceAllocationState](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/remote/src/com/android/tradefed/device/DeviceAllocationState.java)\nand can be any of:\n\n- UNKNOWN: An intermediate state used during transitions to decide if the device should be removed from the tracking list. This would happen when a device is disconnected from `adb`.\n- IGNORED: Device cannot be selected for the TF session because it was filtered out. Most likely TF was started with `ANDROID_SERIAL` exported, so it limits the scope of devices that can be picked.\n- AVAILABLE: Device is ready to be selected for a test.\n- UNAVAILABLE: Device is connected but not ready to run tests. It usually shows as `offline` in `adb`.\n- ALLOCATED: Device is currently running a test and cannot be selected.\n- CHECKING_AVAILABILITY: Device was just connected, and TF checks whether it is properly online and can be made available. If not, it will be made unavailable.\n\n### Online states\n\nOnline states represent the actual state of the device as seen by `adb devices`.\nThey are described by\n[TestDeviceState](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/device_build_interfaces/com/android/tradefed/device/TestDeviceState.java)\nand can be:\n\n- FASTBOOT\n- ONLINE\n- RECOVERY\n- NOT_AVAILABLE\n\nTradefed online states are linked to the underlying `adb` library we use,\n`ddmlib`. It describes the states with\n[DeviceState](https://android.googlesource.com/platform/tools/base/+/refs/heads/android16-release/ddmlib/src/main/java/com/android/ddmlib/IDevice.java)."]]