Connecting the devices FAQs

Note

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

1. Self-inspection

Turn off the mobile assistant software

Please make sure that no third-party mobile assistant software is running at the moment. If there’s any, exit it completely (and make sure to check the task manager to verify there are no remaining related processes there). Then try again.

Device compatibility

We’ve run compatibility tests for most phone models in the market. Please check List of compatible phone models to see if your phone is compatible.

If you can’t find your phone model in the above list, please report your phone model, error log and issue description here . If you found your phone model in the above list but encountered issues, please keep reading for troubleshooting.

Make sure if ADB can connect to phone properly

On Windows: Connect your phone via USB. Open AirtestIDE folder (by default under AirtestIDE/airtest/core/android/static/adb/windows), hold SHIFT + right click to open a command line terminal and input adb.exe devices.

On MacOS: Unzip the dmg file, then follow the prompt to install the app under Application/ folder. Then you can move into Application/AirtestIDE.app/Contents/MacOS/airtest/core/android/static/adb/mac directory using CD command and run ./adb devices .

Normally, you will get a return like this:

>adb.exe devices
List of devices attached
JTJ4C15A30048654 (Serial number) device

If not, then check the following:

  • If you cannot find the line Serial number device , you should check if you have installed the official device driver for this specific phone model, otherwise the system can’t detect the device. Please download and install the official device driver via the official website of the phone brand.
  • Because the USB ports on the front of the computer case may not be so stable, it is recommended to use the ones on the back.
  • Verify you enabled Developer Options and USB Debugging on your phone; then, confirm Allow PC to debug the device. Otherwise the status will show as unauthorized and the phone cannot connect.
  • Please double check that all mobile assistant software on PC are turned off and process exited completely (in most cases, users have to terminate the process manually in the task manager to exit completely)

ADB is the official Android debugging tool provided by Google. Since both AirtestIDE and the related libraries rely on ADB to function, if you can’t find your device through adb devices, you will not be able to continue to use AirtestIDE. Please make sure your phone is connected to the PC properly.

2. Issues with specific devices

Below lists settings for special phone models. Please check it to see if you need to enable certain specific options for your particular phone model.

Xiaomi

Please enable Install via USB and USB Debugging (Security settings) settings under Developer Options, otherwise connection to Xiaomi phones may fail. For older devices, you might need to also enable Allow simulated click location. Note that you may need to log into a MIUI account to enable certain options.

../_images/xiaomi_settings.png

Samsung

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

    ../_images/samsung_phone.png
  2. Enable Unknown sources under security and disable App permission monitor under Developer Options.

Huawei

  • Disable Secure input under Language & input
  • Under Developer Options-> disable Monitor apps installed by ADB and enable Allow ADB debugging in charge only mode
  • Enable Permission monitor->Settings->Auto deploy permissions

vivo

  • Disable Secure keyboard
  • For certain devices, it is required to activate Security permissions under Developer Options, otherwise you might see an error when initializing poco:
../_images/vivo_settings.png

OPPO

  • Click Developer Options, scroll down to the bottom and check Forbid monitor permissions
  • Some OPPO devices may require a password every time you install an APK, so far there’s no way around it.

3. Other common issues

Keyevent failures might occur for the following devices

  • For some devices, buttons like “Return”, “Home page”, “Menu” may not work properly.

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

    For more information, please see Device compatibility .

  • Scripts might exit abnormally on some devices when you input texts, due to model’s system customization:

    • vivo Y55A

    Please catch these errors manually in the script or use poco(“xxx”).set_text(“input”) to input text.

Passwords cannot be entered in the password box using the text() interface

Some manufacturers (such as huawei, VIVO, etc.) have restricted the input of the password box in certain models so the system keyboard must be used when entering the password. This can be changed in devices Security settings.

Duplicated entries for one device displayed

When the IDE is refreshed, it shows two identical devices: one in state device and the other offline. Usually this problem is caused by the mobile assistant. Turn it off and refresh again.

Device emulator-5554 is found when emulator is not running

Reason: After the simulator opens port 5554, every time adb detects that the port is open, it assumes the device exists.

For reference

Take Windows 7 as an example:

  1. Go to AirtestIDE/airtest/core/android/static/adb/windows folder
    Press SHIFT+Right click to open the command window and execute adb.exe devices If you see emulator-5554 error message, proceed to step 2
  2. Perform the following steps:
    • Click Windows+R
    • Type services.msc
    • Stop BlueStacks Android Service

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

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

Device is connected, but the image is wrongly rotated

../_images/phone_ori_wrong.png

Please check Use ADB orientation, then click connect.

../_images/phone_use_adb_ori_init.png

Device is connected, but screen is inoperable

If you are using Xiaomi device, please enable Allow simulated click location under Developer Options and try again.

If the device can be connected to AirtestIDE, but the screen is not responding to clicks and a the “minitouch initialization failed” appears, please disconnect the phone first and check ‘Use ADB touch’ in the drop-down list of the action menu of the device.

../_images/phone_use_adb_touch.png

Then click Connect button to connect the device. The problem should be fixed by now and you can operate on the screen using the mouse.

Support issues for other smart devices

For smart devices such as TV boxes, the screen may not display properly or becomes inoperable when it is connected to AirtestIDE. You can refer to the solutions above: check Use ADB touch and Use ADB orientation. If it still fails, please contact our dev team for support.