0

I'm new to AWS EC2 instance, any help would be highly appreciated.

In our org we have set up an AWS linux ec2 instance, and we need to run our mobile automation on a physical device, but when we run the command adb devices on ec2 instance it's showing:

No connected devices

I also added device details in udev rules under /etc/udev/rules.d but still it's not working. Can you please help here?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Uday Kumar
  • 59
  • 1

2 Answers2

0

IF Devices are not listing on ubuntu EC2 instance

If the connected devices are not listing on an Ubuntu EC2 instance, there could be a few reasons and troubleshooting,

Check device connection: Ensure that the devices are properly connected to the Ubuntu EC2 instance. For example, if you are using USB devices, make sure they are securely connected to the instance.

Install required packages: Verify that the necessary packages are installed on the Ubuntu EC2 instance to detect and manage connected devices. You may need to install packages like usbutils or lsusb using the package manager (apt or apt-get) if they are not already installed. Run the following command to install the usbutils package:

sudo apt-get install usbutils

Check device visibility: Run the following command to check if the connected devices are recognized by the Ubuntu EC2 instance:

lsusb

The connected USB devices should be listed by this command. There may be a problem with the device drivers or compatibility if the command does not output anything or if the devices are not mentioned.

Restart the instance: In certain circumstances, device detection issues with the Ubuntu EC2 instance can be resolved by just restarting it. Check to see if the instance can be restarted, then see if the associated devices are recognized.

==================================================================== Your Android phone cannot be connected to an EC2 instance.

It is impossible to use devices through Device Farm https://aws.amazon.com/device-farm/ if you are using physical means. You cannot connect a physical device to an EC2 instance because it is a virtual machine.

0

That is not possible.

An Amazon EC2 instance is a virtual machine running in a data center. You cannot connect a physical device to the instance.

If you are wanting to test Android devices, you might be interested in using AWS Device Farm:

Device Farm is an app testing service that you can use to test and interact with your Android, iOS, and web apps on real, physical phones and tablets that are hosted by Amazon Web Services (AWS).

There are two main ways to use Device Farm:

  • Automated testing of apps using a variety of testing frameworks.
  • Remote access of devices onto which you can load, run, and interact with apps in real time.

Alternatively, you might be able to install software that permits remote connection of USB devices such as USB Redirector for Linux - USB over IP - USB over Network - Incentives Pro

See also: Using a remote host's USB port as local USB (Linux and Windows) - Stack Overflow

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470