AndroidScreencast: Failed to get device screenshot - Pixel 2 XL

Hi there.

First off, I absolutely love this project. I really appreciate the work you’ve put into it.

I was using it on a Pixel XL (updated to 8.0) up until yesterday, and it was working fine. Then, however, I switched to a Pixel 2 XL, and the following happens…

If I set the screensize manually (to ), I get:

14:04:12 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 02:04:13 E/Screenshot: Unsupported protocol: 2 14:04:13 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:04:14 [AWT-EventQueue-0] INFO AndroidScreencastApplication - Stopping application 14:04:14 [Screen Capturer] WARN ScreenCaptureRunnable - IO Exception happened while getting device screenshot. Will try again in 100 ms. 14:04:14 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:04:14 [Screen Capturer] INFO ScreenCaptureRunnable - Stopping screen capturing 14:04:15 [Thread-1] INFO AndroidScreencastApplication - Stopping application

If I leave the screen size undefined (not set in app.properties) I get:

14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:29 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:29 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms. 14:05:30 [Screen Capturer] INFO ScreenCaptureRunnable - Failed to get device screenshot 14:05:30 [Screen Capturer] WARN ScreenCaptureRunnable - ADB Command was rejected. Will try again in 100 ms.

Controls via buttons still work…it’s just the screenshot capability which isn’t.

Any ideas how to fix?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (9 by maintainers)

Most upvoted comments

Thank you for solution guys. I had the same issue. It’s fixed now. To help others: One can download the entire 26 sdk with ddmlib-26.0.0-dev.jar included here: https://chromium.googlesource.com/android_tools/+archive/HEAD/sdk.tar.gz As for now max available version of Android SDK Tools in android repo is 25.2.5 When version 26.0.0 gets available, problem will gone naturally.