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?
2
Answers
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:
Check device visibility: Run the following command to check if the connected devices are recognized by the Ubuntu EC2 instance:
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.
Check for device compatibility: Make that the connected devices are compliant and supported by the version of the Ubuntu operating system that is currently executing on the EC2 instance. To verify compatibility, see the manufacturer’s documentation or online sources.
Ensure that device drivers are installed: On the Ubuntu EC2 instance, certain devices might need particular drivers to be installed. Check to see if the necessary drivers are installed and current. The right drivers might need to be downloaded and installed from the manufacturer’s website.
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.
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.
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:
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