À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release
au lieu de aosp-main
pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
États des appareils dans Tradefed
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Appareils Android
Les appareils Android dans Tradefed peuvent passer par plusieurs états disponibles via le Gestionnaire d'appareils. Il existe deux grandes catégories d'états pour les appareils Android : l'état d'allocation et l'état en ligne.
Tous ces états peuvent être vérifiés dans la console Tradefed à l'aide de l d
ou 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
États d'allocation
Les états d'allocation sont des états spécifiques à Tradefed qui permettent de surveiller l'utilisation des appareils. Ils sont décrits par DeviceAllocationState et peuvent être l'un des suivants:
- UNKNOWN: état intermédiaire utilisé lors des transitions pour déterminer si l'appareil doit être supprimé de la liste de suivi. Cela se produit lorsqu'un appareil est dissocié de
adb
.
- IGNORÉ: L'appareil ne peut pas être sélectionné pour la session TF, car il a été filtré. Il est probable que TF ait été lancé avec
ANDROID_SERIAL
exporté, ce qui limite la portée des appareils pouvant être sélectionnés.
- DISPONIBLE: l'appareil est prêt à être sélectionné pour un test.
- INDISPONIBLE: l'appareil est connecté, mais n'est pas prêt à exécuter des tests. Il s'affiche généralement sous la forme
offline
dans adb
.
- ALLOCATED: l'appareil exécute actuellement un test et ne peut pas être sélectionné.
- CHECKING_AVAILABILITY: l'appareil vient d'être connecté, et le TF vérifie s'il est correctement en ligne et s'il peut être mis à disposition. Dans le cas contraire, il sera rendu indisponible.
États en ligne
Les états en ligne représentent l'état réel de l'appareil tel que vu par adb devices
.
Elles sont décrites par TestDeviceState et peuvent être:
- FASTBOOT
- EN LIGNE
- RÉCUPÉRATION
- NOT_AVAILABLE
Les états en ligne de Tradefed sont liés à la bibliothèque adb
sous-jacente que nous utilisons, ddmlib
. Il décrit les états avec DeviceState.
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (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)."]]