Connecting the devices FAQs

Note

If the following does not solve your problems, visit the AirtestIDE issues page and submit the bug report providing the information about the phone model, error log and the problem description. We will fix it as soon as possible.

Device did not appear in devices list after it has been connected. What should I do?

Check whether the device driver is properly installed and check the output from command line as follows:

macOS:

$ adb devices
List of devices attached
FA69J0305903    device
0a33789f        device

Windows OS:

  1. locate the adb executable, the default path is: AirtestIDE\airtest\core\android\static\adb\windows\adb.exe
  2. run adb.exe devices and check if devices can be properly listed

If you can’t see any output from the commands above, check the following

  • official device driver is installed on your computer (otherwise the system can’t detect the device)
  • make sure the Developer Options are enabled on your device and USB debugging option is turned on
  • when connecting phone to the computer, confirm Allow PC to debug the device, otherwise the status will show unauthorized
  • it is recommended to use the USB port on the back of the chassis
  • make sure that all mobile assistant software on your computer is turned off and process exited completely

ADB is an Android debugging tool provided by Google. Since both AirtestIDE and related libraries need to rely on ADB operations, if you cannot see your device through adb devices , you cannot continue to use AirtestIDE. Please make sure that the phone is connected to the PC correctly.

Check whether current ADB port is not occupied by other programs such as some handset assistants, etc. How to check whether ADB port is occupied by other software

If the device is listed when executing command above but it does not appear in the IDE, feel free to contact us and report the problem.

Device is properly displayed by AirtestIDE but it can’t be used. What should I do?

If you can see your device in the returned results of the adb devices command, but it cannot be use in AirtestIDE, check the following:

  • when the device is connected to the IDE for initialization, an application RotationWatcher.apk is installed on the mobile phone as well (it is used to detect whether the screen of the mobile phone is rotated or not), there might be a popup window on the device screen and manual click is required to install this apk
  • some models of mobile phones block ADB’s permission to install apks by default, please open the the developer options and change the settings, otherwise you cannot install the necessary apks
  • if the phone is rooted, the local folder permissions may have been modified and it can result that Airtest does not have the permission to put the relevant files into the phone, please check the phone /data/local/tmp folder for write permission
  • if the STF has been already ever installed on the devices, there might be problems that screen cannot be normally displayed, you can try to clear the original STF-related files (by execution of the command adb shell rm /data/local/tmp/mini*) and try to reconnect the device and restart AirtestIDE

If the device number information is correctly displayed after entering adb devices, but the mobile phone screen still cannot be connected and operated correctly in Airtest IDE, please submit the bug report including the information about phone model number, error log, and problem description.

Is iOS supported?

iOS emulators are not yet supported. Connecting directly to the emulator may cause the screen to display a black screen.

iOS device support is under development.

Error ‘emulator-5554’ is raised when connecting device. What should I do?

In Windows OS:

  1. Navigate to AirtestIDE\airtest\airtest\adb\windows

To enter the command line, press Shift+right mouse click and type adb.exe devices

If you see emulator-5554 error message, proceed to step 2

  1. Perform following steps:
  1. Pres hot key Windows + R
  2. Type services.msc
  3. Stop BlueStacks Android Service

Root cause:After the simulator opens the 5554 port, adb detects that the port has been opened and assumes that device already exists. For more details, refer to answer on stackoverflow.

Duplicated entries for one device displayed. How to resolve it?

Description:
When the IDE is refreshed, it finds two identical devices: One in state “device” and the second one in state “offline”.
Solution:
Usually this problem caused by the handset assistant (such as 360 handset assistants, etc.), turn off the assistant and refresh again.

Device became inoperable after it has been connected. What I should do?

On device, turn on Allow Simulated Click Location option in the device Developers Options.

Known issues with specific devices (Xiaomi, Samsung, Vivo)

1. Xiaomi devices

For Xiaomi devices, it is recommended to turn on Allow Simulated Click Location, USB Install and USB Debug (Security Settings) in Developers Options

2. Samsung devices

If the on-screen display is not fully displayed, set the Screen Resolution to WQHD in Settings- Display

../_images/samsung_phone.png

3. Keyevent failures might occur for following devices

  • Vivo Y55A
  • Vivo Y67
  • Vivo X20 Plus(screen fingerprint version)
  • Redmi 3X
  • Xiaomi 5C

4. The passwords cannot be entered to the password box using the text() interface

Some mobile device models restrict the password input box so the system keyboard must be used. This can be changed in devices Security settings.

How can I connect the device remotely?

ADB allows to connect devices remotely, however it is difficult to ensure the stability of the adb connection in the wireless network. It is recommended to use USB cable to connect the mobile devices.

I have troubles to connect the mobile device after upgrade to Android 8. What should I do?

Check this document for more info.

Command adb.exe has stopped working. What should I do?

Usually, the problem is caused that the phone assistant programs occupy the adb port. Close the mobile assistant and make sure that mobile assistant processes do not run in the background and try again.

Are other smart devices supported?

Some smart devices such as TV boxes may have problems displaying horizontal and vertical screen when connected to AirtestIDE. For now, AirtestIDE supports mobile devices only, while the support for smart devices is still experimental.