I Tried Operating Real Cloud Devices and Emulators from My Local adb with Device Connect, a New Feature of AWS Device Farm #AWSreInvent

I Tried Operating Real Cloud Devices and Emulators from My Local adb with Device Connect, a New Feature of AWS Device Farm #AWSreInvent

I tried AWS Device Farm's Device Connect, announced at re:Invent 2026, to control real Android devices and emulators in the cloud from my local adb.
2026.12.01

This page has been translated by machine translation. View original

Hello, I'm Shunta Toda from the Retail App Co-creation Department.

At the re:Invent 2026 session "DVT316: What's new in web and mobile app development on AWS," four new features added to AWS Device Farm were introduced.

Device Farm has existed since 2015, but with these additions you can now use real devices in the cloud from your local adb, and test quickly with emulators / simulators. In this article, I'll go through the four new features based on the talk and the official documentation. Then I'll share the results of actually trying Device Connect and virtual devices from the console and adb.

Four new features added to Device Farm

What's new in AWS Device Farm

In the talk, four new features were introduced along the mobile development loop (develop → test early → understand results → fix).

Step New feature In a nutshell
Develop Device Connect Use real devices in the cloud from your local adb or Android Studio
Test early Virtual devices Use Android emulators and iOS simulators with the same API as real devices
Understand Test Insights See the root cause, video, and duration for each test
Fix Troubleshooting skill An AI agent diagnoses failed tests and proposes fixes

As the text at the bottom of the slide says, "one fleet · one set of APIs · real and virtual devices," real and virtual devices can be handled through a single API.

Why Device Farm now?

In the first half of the talk, a problem was raised: "Writing code with AI agents has gotten faster, but Verify (waiting for builds and tests) has become the new bottleneck." The more PRs there are, the longer the wait for tests on real devices. The four new features were introduced as the answer to this bottleneck.

Device Connect: use real cloud devices from your local adb

Device Connect is a feature that lets you use an Android real device borrowed in a Device Farm remote access session from adb, as if it were a device plugged into your local PC via USB (documentation added on 2026/11/19).

Until now, remote access was basically about operating the screen in a browser. With Device Connect, you can work with real devices in a flow close to your usual local development. The documentation introduces uses such as the following.

  • Install a built app with adb install
  • Run Espresso tests with adb shell am instrument
  • Run and debug the app from Android Studio

How it works

adb works with three components: the client (the adb command or Android Studio), the adb server on the PC (port 5037), and adbd on the device.

The devicefarm-connect command of Device Connect starts a "bridge" that acts as a replacement for the adb server on the PC.

Device Connect architecture

  • The bridge listens on 127.0.0.1:5037, so adb and Android Studio connect without any changes
  • Requests such as adb shell and adb install are relayed over an encrypted WebSocket to the adb server next to the device in the cloud
  • Authentication uses the AWS credentials of the shell that started the bridge, and the session endpoint is also updated automatically

Steps to get started

To summarize the steps in the documentation, there are the following four steps.

The following are required as prerequisites.

  • An AWS account that can use Device Farm, and your local AWS credentials (Device Farm is available only in us-west-2)
  • IAM permissions: Device Connect itself works with only devicefarm:GetRemoteAccessSession. To create and stop sessions, you also need devicefarm:CreateRemoteAccessSession and devicefarm:StopRemoteAccessSession
  • A Device Farm project (sessions are created inside a project)
  • adb 1.0.41 (Android SDK Platform-Tools 29.0.0 or later) and the AWS CLI

1. Install devicefarm-connect
On macOS / Linux, you can install it with the following command. There is also a PowerShell script for Windows. If you want to check the contents of the script first, you can download it and then run it.

curl -fsSL https://github.com/aws/device-connect-devicefarm/releases/latest/download/install.sh | sh
devicefarm-connect --version

2. Create a remote access session
Create a session from the console or the AWS CLI. With the CLI, it looks like the following. The output includes the session ARN.

aws devicefarm create-remote-access-session \
  --project-arn "<プロジェクト ARN>" \
  --device-arn "<デバイス ARN>" \
  --region us-west-2

When I started an Android session in the console, "Session ARN" and "ADB session" appeared in the menu on the left of the device screen. Opening "ADB session" displays the command for connecting to this session, with the session ARN already filled in. You can just copy it and paste it into the terminal, so there's no need to hunt for the ARN (the ARN part of the image is masked).

The ADB session opened

3. Connect the device and use adb
Once the session status becomes RUNNING, connect the device. If it doesn't work, devicefarm-connect doctor --session-arn ... shows the cause and how to fix it.

devicefarm-connect device add --session-arn "<セッション ARN>"
adb devices
adb shell getprop ro.build.version.release

4. Clean up

devicefarm-connect device remove
devicefarm-connect bridge stop
aws devicefarm stop-remote-access-session --arn "<セッション ARN>" --region us-west-2

Trying it out

I installed devicefarm-connect v1.0.0 on macOS (adb 1.0.41) and tried it with two devices: a Pixel 10 Emulator and a Samsung Galaxy S21 (real device).

When you run device add, the bridge starts and the device is connected.

$ devicefarm-connect device add --session-arn "$SESSION_ARN"
* bridge not running; starting it now
* stopped the adb server on 127.0.0.1:5037 (via 'adb kill-server')
* bridge started (PID 45770); log file: ...
devicefarm-connect listening on port 5037 with connected device: Samsung Galaxy S21 (OS 12)

$ adb devices
List of devices attached
R5CRXXXXXXX	device

$ adb shell getprop ro.product.model
SM-G991U1

Just like a real device connected via USB, it shows up in adb devices with a serial number. The response to adb shell echo ok took about 0.2 seconds, and it didn't feel like waiting even over the cloud.

When I sent an intent to open a URL from adb as a test, the device screen shown in the console switched.

adb shell am start -a android.intent.action.VIEW -d https://aws.amazon.com/device-farm/

The page opened from adb is displayed on the device screen in the console

You can also save the real device's screen locally with adb.

adb exec-out screencap -p > screen.png

The next image is the Galaxy S21 screen captured with this command.

Galaxy S21 screen captured with adb

The documentation doesn't explicitly mention virtual devices, but the "ADB session" menu also appeared for the Pixel 10 Emulator, and it connected as emulator-5554 using the same steps.

On the other hand, the diagnostic command adb shell dumpsys battery, which shows the battery state, returned "This diagnostic command is not permitted on AWS Device Farm" and could not be used. The documentation also states that Android Studio device mirroring, forwarding to localabstract: sockets, some commands such as adb reboot, and attaching multiple devices at the same time are not supported. adb reverse can be used only when --allow-adb-reverse is specified.

Notes

Billing continues until you stop the session
There is no additional charge for Device Connect itself, but remote access sessions are billed per device-minute until you stop them. device remove and bridge stop do not stop the session, so be sure to stop the session at the end. The device time used in this test was about 3 minutes 40 seconds for the virtual device and about 3 minutes for the real device.

According to the documentation, only Android public devices are supported
At present, only metered public devices on Android 9 or later are supported. Private devices, unmetered device slots, and iOS are not supported.

Match the version of your local adb
The adb server beyond the bridge is 1.0.41, so match your local adb to 1.0.41 (Platform-Tools 29.0.0 or later) as well.

Your local adb server will be stopped
The bridge uses port 5037, so it stops your local adb server when it starts. If you want to use a real device plugged in via USB at the same time, you can start the bridge on a different port ("Using a different port" in the documentation).

Virtual devices: emulators and simulators with the same API as real devices

Android emulators and iOS simulators

Android emulators and iOS simulators can now be used in Device Farm (hereafter, virtual devices).

The slides recommended using them differently by pipeline stage, as follows.

  • Pull request / Code merge / Smoke test: virtual devices (speed and volume)
  • Regression / Release: real devices (high reproducibility)

The slides listed the following three points.

  • < 15s: Virtual devices with the latest OS become ready to use within 15 seconds
  • 1 change: Just select a virtual device, and your existing tests can be used as is
  • Same: The API, test types, and pricing model are the same as real devices (however, iOS simulators are metered only)

The documentation explains that virtual devices are listed in the same public device list as real devices, with names ending in "Emulator" or "Simulator" and the Device type shown as "Virtual." The startup time is described more modestly than in the slides: "usually under 30 seconds for the latest OS, and about 1 minute for other OSes."

When I actually filtered "Public Devices" in the console by "Virtual," the following three models (7 entries in total across OS versions) were displayed (as of 2026/11/30).

Public Devices filtered by Virtual

Device OS
Apple iPhone 16 Simulator iOS 18.6 / 26.3.1 / 27.0
Google Pixel 10 Emulator Android 15 / 16 / 17
Google Pixel Tablet Emulator Android 17

On the remote access session creation screen as well, real devices (Physical) and virtual devices (Virtual) are listed in the same list. The "1 change" on the slide refers to changing which device you select from this list.

Remote access session creation screen. Real devices and virtual devices are listed in the same list

When I actually created a remote access session with the Pixel 10 Emulator (Android 17), it became "Connected" about 18 seconds after I pressed "Confirm and start session." Since this figure includes screen transition time, it's roughly in line with the "within 15 seconds" on the slide.

Remote access session of the Pixel 10 Emulator

On the other hand, for the real device Samsung Galaxy S21, it took about 80 seconds from creating the session with the AWS CLI until it became RUNNING. The measurement methods differ, so treat this as a rough guide.

Virtual devices can be used for both manual testing (remote access) and automated testing (I only tried manual this time). However, virtual devices do not support VPC endpoint connections, and iOS simulators are metered only.

Test Insights and Troubleshooting skill: understand the cause of failures and fix them

Test Insights and the troubleshooting skill

The remaining two features help with "understanding the cause" and "fixing" after a test fails. I didn't run automated tests this time, so I'll introduce them based on the documentation and the talk.

The flow on the slide is "run tests → check the cause, video, and duration in Test Insights → an AI agent diagnoses with the Troubleshooting skill → fix proposals go back into the code."

Test Insights

Test Insights is a report that breaks down test run results by test and by device. Features have been added incrementally since 2026/08.

  • Counts of passed, failed, skipped, and errored tests (per job, per run)
  • Test output with timestamps and stack traces
  • Test and job execution times
  • Per-test videos (added on 2026/11/20; playable from the test report in the console)

Test Insights is enabled by default if you use a supported framework (Appium Java / Node.js / Python, Android Instrumentation, XCTest UI, etc.) in a custom test environment. There is no additional charge.

Troubleshooting skill

The Troubleshooting skill was introduced as a skill for coding agents to diagnose failed tests. What was emphasized on the slide was that it reduces the tokens the agent uses when searching for the root cause, and that it works within the scope of existing APIs and incurs no additional charge.

I'll add details such as how to obtain it once I learn them.

Impressions after using it

Device Connect is a feature that "brings real devices to your local machine"
Since cloud devices show up in adb devices, it looks like the shell scripts you normally use will work as is. I haven't tried it from CI this time.

The console's "ADB session" shows the connection command
Since the connection command is displayed with the session ARN filled in, it took just a few minutes from starting a session to connecting with adb.

Virtual devices are well suited to per-PR testing
Real devices are limited in number and involve waiting, so running everything on real devices for every PR was not realistic. If you can switch to virtual devices with the same API, it becomes easy to use virtual devices for PRs and real devices before release.

Summary

Four new features have been added to AWS Device Farm: Device Connect, virtual devices, Test Insights, and the Troubleshooting skill. In the talk, all of them were introduced as features that "let testing and verification keep up with the speed of writing code with AI agents."

In particular, Device Connect lets you use real cloud devices, which until now could only be accessed through a browser, directly from your usual adb and Android Studio. If you're using Device Farm for real-device testing of mobile apps, please give it a try!

References

https://docs.aws.amazon.com/devicefarm/latest/developerguide/device-connect.html

https://docs.aws.amazon.com/devicefarm/latest/developerguide/device-connect-getting-started.html

https://docs.aws.amazon.com/devicefarm/latest/developerguide/virtual-devices.html

https://docs.aws.amazon.com/devicefarm/latest/developerguide/reports.html#reports-test-insights

https://aws.amazon.com/about-aws/whats-new/2026/11/device-farm-test-insights/

https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html


AWS re:Invent 2026まとめ情報

クラスメソッドは2026/11/30〜12/4にラスベガスで開催されるAWSカンファレンスイベント「re:Invent」を今年も特集しました。ぜひ一度ご覧ください。 re:Invent 2026ポータルサイトを見るAWS re:Invent公式サイトはこちら

Share this article