Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidScreencast works on Android TV, but not with HDMI sources or actual TV channels on screen #60

Open
nestukh opened this issue Jan 5, 2020 · 2 comments

Comments

@nestukh
Copy link

nestukh commented Jan 5, 2020

first, awesome program! Perfect for fixing common android problems for relatives far away (with a nx server on a computer of theirs and a usb cable).

A relative of mine has got an Android TV, it works there as well! But only on android apps or menus (VLC, Youtube, Aptoide TV, android settings, tv settings, etc): the moment you switch to the so called "TV Vision" app (normal tv channels) or to a kodi box (via HDMI), AndroidScreencast hangs and the following message appears, multiple times:

java.io.IOException: EOF
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:944)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:917)
        at com.android.ddmlib.AdbHelper.getFrameBuffer(AdbHelper.java:303)
        at com.android.ddmlib.Device.getScreenshot(Device.java:522)
        at com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable.getScreenshot(ScreenCaptureRunnable.java:75)
        at com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable.run(ScreenCaptureRunnable.java:54)
        at java.base/java.lang.Thread.run(Thread.java:834)
18:37:14 [Screen Capturer]     INFO  ScreenCaptureRunnable - Failed to get device screenshot.
18:37:15 [Screen Capturer]     WARN  ScreenCaptureRunnable - IO Exception happened while getting device screenshot. Will try again in 100 ms.

Oddly enough:

  • screencap via adb shell produces an empty png file (literally 0 bytes) in any case with anything on screen.
  • I can send other commands, like adb shell input keyevent 25 (volume down), and they work in any case with anything on screen.

TV is a Philips 43pus7304/12 with Android Pie (adb shell getprop ro.build.version.sdk: 28).
I'm using last version of AndroidScreencast, 0.0.16s, last version of adb via wifi on a computer with debian buster in the local network.

I'm not sure how to debug this, but I can run tests if necessary.

@xSAVIKx
Copy link
Owner

xSAVIKx commented Jan 6, 2020

Hello @nestukh!

Thanks for reaching me out. First of all, it's just a great example of app usage!

The screencap utility actually reads the image stream from framebuffer and the same does AndroidScreencast. Most probably, when you cannot get a screenshot with screencap you won't be able to use the app either.

Also, it may be possible, that the TV uses a different buffer for non-apps, e.g. for TV channels, because it may be a security restriction required by TV providers (so that you'd not be able to stream TV content directly).

@nestukh
Copy link
Author

nestukh commented Jan 6, 2020

yes it's most likely as you said. I think that solving this will require some niche android skills (HDMI/TV and low level OS)... sigh, it's a long way.
Anyway, thank you for the fast reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants