1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Alpha Android Screen Grabber

Discussion in 'Development' started by abrenoch, 16 February 2018.

  1. Joe23

    Joe23 New Member

    Messages:
    7
    Hardware:
    RPi3
    just tested this app. normally just used the kodi add on.

    is there a way to set it up it only shows leds if something is playing in the background? like the addon?

    this way i have the leds on even if im just in the menu

    the rest works like a charm on my shield
     
  2. astertz

    astertz New Member

    Messages:
    1
    Hardware:
    RPi3
    Does Netflix and Amazon still not work?
    Is there any kind of workaround available?
     
  3. AlexBar

    AlexBar New Member

    Messages:
    1
    Hardware:
    RPi3, 32/64bit
    Any change to make it working on zidoo build-in mediaplayer? Ambilight with 3rd party players and Kodi (ZDMC) works fine on the exact same files. Any workarounds with root?
     
  4. ameel

    ameel New Member

    Messages:
    8
    Hardware:
    RPi1/Zero, RPi3
  5. ameel

    ameel New Member

    Messages:
    8
    Hardware:
    RPi1/Zero, RPi3
    Hello. I also have a Sony Android TV. I installed Kodi and the netflix plugin. I disabled the 2 'hardware acceleration' settings, but this is preventing even 1080p video from playing from netflix (there is sound, but no image). Can you tell me how you configured kodi please?
     
  6. ameel

    ameel New Member

    Messages:
    8
    Hardware:
    RPi1/Zero, RPi3
    Tested this, but unfortunately the video stream itself is black whereas everything else is visible (menu, subtitles, etc)
     
  7. ameel

    ameel New Member

    Messages:
    8
    Hardware:
    RPi1/Zero, RPi3
    Hi all,

    So I managed to get Netflix and Amazon Prime to work through a convoluted way, as follows (on up to Android 8. This will not work on Android 9)

    1. Download the following Android apks on your android device/tv:
    a. VirtualXposed (https://vxposed.com/)
    b. Netflix
    c. Amazon Prime Video

    2. Install VirtualXposed
    3. In VirtualXposed, install Netflix and Prime Video. Make sure you grant permissions.
    4. In VirtualXposed, launch Xposed Installer.
    5. In Xposed Installer, go to 'Download' and search for "BlockSecureFlag". Go to versions, download and install latest version. Go to 'Modules' in Xposed Installer settings, and tick 'BlackSecureFlag'.
    6. Launch BlockSecureFlag from VirtualXposed. Tick both Netflix and Prime Video, and click on the save icon.
    7. Go back to VirtualXposed, go to settings menu and select reboot.
    8. Launch either Netflix or Prime Videos and profit $$$

    edit:
    The android screen grabber works with Netflix App for phone but not Netflix App for TV.
     
    Last edited: 24 April 2019
  8. heikomat

    heikomat New Member

    Messages:
    3
    Hardware:
    RPi3
    Hey,

    @abrenoch
    First of all, great work on the app. Tested it on my XF9005 (X900F in America), and it works great out of the box.
    The only thing i'm struggling with is 4k content. It *works* with 4k content, but the playback starts to stutter if the grabber is active.

    As a developer, i startet debugging the app, to see where the performance is lost (and why). The app itself doesn't use many resources, but it seems that the tv struggles to render the 4k video to the virtual display fast enough.

    I tried different things to determine the cause (not sending the picture to hyperion, not attaching an ImageAvailableListener, rendering to a surface provided by a MediaCodec instead of an ImageReader), but the only thing that seems to improve performance is to not provide the virtual display with a surface.

    Is there anything in the works regarding performance?
    Could an external android TV Box possibly be fast enough to not struggle with 4k + grabber active?
    Or am i out of luck, and i need to buy something like the lightberry hdmi 2.0 kit to enjoy 4k content with the lighting?
     
  9. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    94
    Hardware:
    RPi1/Zero, RPi2
    Hey @heikomat

    To be totally honest, I'm not sure how much more performance I personally would be able to squeeze out of it. I'm not sure I have enough knowledge of the internal workings of the surfaces & image buffers to form a concise plan for improving things. I would be more than happy to look at any ideas people may have though. Request for flatbuffer support

    What you could try is the Alpha #4 build from github. That version still has the old grabber that I started with included, which leverages openGL. In testing we didn't see any real benefit to using it on the hardware we had, so opted to remove it since keeping it around effectively meant double the work for new features.

    Give that version a whirl and see if there is any better performance. There are probably some random bugs left in that build, but should be usable enough to test it!
     
  10. heikomat

    heikomat New Member

    Messages:
    3
    Hardware:
    RPi3
    Thanks for the reply and the info about the opengl version. will definitely give that a try someday this week :)
    For now i made it possible to pause and resume the virtual display from the outside, and made a button send the appropriate adb command. This way, i just need to press a button to disable/enable it, when i start/stop watching 4k content ( https://github.com/heikomat/hyperion-android-grabber/commit/6395a1b9d4c9ed84602f10da37de049bca9443a6 )
     
    • Like Like x 1
  11. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    94
    Hardware:
    RPi1/Zero, RPi2
    Nice work, but I believe this should be possible already with this adb command:
    `adb shell am start com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.common.ToggleActivity`

    I should maybe document that somewhere; I forget it exists!

    Cheers!
     
  12. heikomat

    heikomat New Member

    Messages:
    3
    Hardware:
    RPi3
    oh, i didn't find that. Will try that one out later today. My command currently looks like this:
    `adb shell am startservice -a com.abrenoch.hyperiongrabber.service.ACTION_TOGGLE com.abrenoch.hyperiongrabber/.common.HyperionScreenService`
     
  13. ralf000

    ralf000 New Member

    Messages:
    5
    Hardware:
    32/64bit, +Arduino
    Hi all! Could you tell me whether the android grabber grabs events while watching videos in the kodi like it does the framegrabber in the librelec (xbmcVideoChecker) or led lights turns always on? Thanks.
     
  14. FaserF

    FaserF New Member

    Messages:
    8
    Hardware:
    RPi1/Zero, +Arduino
    On my Android TV I get "failed to parse the package", so I can't use it. (Xiaomi Mi Box S)

    On my smartphone the app force closes
     
  15. sgaluf

    sgaluf New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Hi, is it possible to start Android screen grabber remotely from another computer or device, maybe via MQTT or some other service?
     
  16. thommy86

    thommy86 Member

    Messages:
    62
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +PhilipsHue
    Afaik you could send an adb command. Otherwise you will need to install a mqtt broker on your android device to communicate.

    What is the application?
     
  17. neek0la

    neek0la New Member

    Messages:
    1
    Hardware:
    RPi3
    Hi All,
    Is there a way to edit any of the settings. I have it working with my shield although the colors are on the wrong side. For instance if i have a blue image on the left (TV) the blue leds will be on the right.

    Also when the color rotation happens my leds light up anticlockwise
     
  18. sgaluf

    sgaluf New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    My wish is to start grabber from Home Assistant, which is running on another computer.
    @neek0la: check the settings in your hyperion.config.json file. alternatively you could still manually flip the order of the leds behind your TV :)
     
    • Like Like x 1
  19. thommy86

    thommy86 Member

    Messages:
    62
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +PhilipsHue
  20. sgaluf

    sgaluf New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    I've managed to setupo adb, it works now. But if I run "adb shell am startservice -a com.abrenoch.hyperiongrabber.service.ACTION_TOGGLE com.abrenoch.hyperiongrabber/.common.HyperionScreenService", I get the following error:

    Starting service: Intent { act=com.abrenoch.hyperiongrabber.service.ACTION_TOGGLE cmp=com.abrenoch.hyperiongrabber/.common.HyperionScreenService }
    Error: Requires permission not exported from uid 10087

    However, if I run this:
    adb shell am start com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.common.ToggleActivity

    I get the following error:

    Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.common.ToggleActivity }
    Error type 3
    Error: Activity class {com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.common.ToggleActivity} does not exist.

    What is the correct command to start screen grabber in background?