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. VTHokie

    VTHokie New Member

    Messages:
    1
    Hardware:
    RPi1/Zero, RPi3
    Great work!! I’m really impressed how smooth it works on my shield TV. It works decently on my Bravia as well. Is it possible to send the grabber data to multiple Hyperion servers? My setup has two RPi’s controlling LED strips.
     
  2. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    Sounds like a DRM thing, unfortunately I don't have a way to make those play nice (at least right now). You may be able to try rooting and installing something like magisk but I don't have any confirmation this actually works.
     
  3. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    New version available everyone - see the first reply in this thread for changes!

    Will have a full release ready soon!
     
  4. besthd

    besthd New Member

    Messages:
    1
    Hi, ijust found today in my shield the grabber and was so exited to get it to work.

    But iwas tryin for 4 hours without success.
    Iam using already a setup with a usb video grabber. So ican grab all ambilight from my shield to my av receiver to my tv.

    Ithought ijust install the app connect via network and the capture should be done. But nothin is happening.
    Do i need to create a complete new hyperion setup? Could it be that the existing hyperion setup with the usb grabber is forcing the app not to work.

    Could you please help me or wrote an how to, what to do if you habe already a setup with a usb grabber.
    It would be cool if idont need the usb grabber anymore cause iwant my 4k tv with ambilight finaly.
     
  5. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    Hey bud, couple of things:
    Are you able to control your lights via the hyperion remote? https://play.google.com/store/apps/details?id=nl.hyperion.hyperionpro&hl=en_US

    Are you using the setup wizard, and is it finding your hyperion instance correctly? If so, do the LEDs light up? Do they light up when testing in the settings activity?

    If yes to the above, do the LEDs light up in the menus, is it a specific thing/app that isn't working?
    Here is a copy of my config (if it helps): http://paste.debian.net/plain/1048635

    Double check the 'priority' values in your config, I believe if they are set lower than the priority value in the grabber app's settings then it may fail to display anything. Likewise with the remote app I linked to above.
     
  6. Kesy

    Kesy New Member

    Messages:
    5
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Hello, first of all, thank you for your great app, I have an Nvidia Shield tv 2015 and it works very well.
    I've something to share, I tried to disable secure flag system wide, I managed to get there by unlocking the bootloader, downloading the boot.img fron the nvidia site, patching it with another phone with magisk installed (maybe there other ways but this seems to be the only one working for nvidia shield), flashed it to the shield through fastboot, installed magisk module for xposed framework api 26 (for oreo 8.0, other version will use other apis), xposed installer apk for magisk, and disable secure flag xposed module.

    Now I'm allowed to take screenshot everywhere, and your screen grabber can grab at least the netflix menu (before it couldn't) but sadly the screenshot while playing netflix or amazon prime video are still black, the great think is that i can grab from the modded netflix apk from xda (https://forum.xda-developers.com/android/apps-games/netflix-hd-ultrahd-ultrahd-dolby-5-1-l1-t3535349)

    I think it's worth some more investigation, I'm pretty sure that once disabled the secure flag the problem still remaining is widevine L1 since the L3 version works, but I think I can't do much more with my skill level
     
    Last edited: 28 October 2018
    • Like Like x 2
  7. thommy86

    thommy86 Member

    Messages:
    55
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +PhilipsHue
    Great work. I had this on my agenda for a really long time, but couldn't find the time to test it. What modded app are you using? Does the 4k version work for you? I am also curious what DisableFlagSecure you used? There is a Xposed version, but you are talking about a magisk module. Which one did you use?

    Please note that there a really simple guides to root your shield. Maybe you can share your guide for other.
     
  8. Kesy

    Kesy New Member

    Messages:
    5
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Sure here is what I did, it may be a little different with the 2017 shield:

    1) download the developer image from nvidia site https://developer.nvidia.com/shield-developer-os-images
    2) extract the boot.img from the zip file
    3) transfer it on a device with magisk installed (it's the only way for what I know, using other way can cause bootloop)
    4) open magisk and select install, select install again, choose patch boot image file, select your boot.img downloaded from nvidia site, at the end you will have a patched_boot.img file
    5) transfer it back to your computer
    6) install minimal ADB if you don't have it and enable developer settings on your nvidia shield, enable also usb debug from the developer menu
    7) connect a pc to your shield via usb cable (standard usb to mini usb for 2015 ) and reboot your shield in fastboot mode with the command "adb reboot bootloader"
    8) unlock your bootloader with the command "fastboot oem unlock", please note that it will factory reset your nvidia shield and it will take like 5 minutes
    9) test your boot image with the command "fastboot boot patched_boot.img" if it works go back in bootloader mode with "adb reboot bootloader" and flash it with "fastboot flash boot patched_boot.img"
    10) now you should have magisk installed but you might need sideload launcher to see the magisk manager https://play.google.com/store/apps/details?id=eu.chainfire.tv.sideloadlauncher&hl=it
    11) install xposed installer from this apk https://basketbuild.com/filedl/devs?dev=squabbi&dl=squabbi/extra/XposedInstaller_3.1.5-Magisk.apk you can push it with adb using the command "adb install XposedInstaller_3.1.5-Magisk.apk"
    12) open magisk manager, go to downloads and search for xposed, the versione we need with Oreo is sdk26 (version 90 beta 3), download it and enable it, then reboot
    13) now install this https://dl-xda.xposed.info/modules/fi.veetipaananen.android.disableflagsecure_v3_c38d39.apk you can side load it with "adb install fi.veetipaananen.android.disableflagsecure_v3_c38d39.apk"
    14) open xposed go to modules and you should see DisableFlagSecure, enable it, now reboot
    15) done

    some notes:
    - I tried to build a magisk module to disable flag secure with smali patcher but it didn't work
    - I don't respond of any damage to your console, this is just what I did, not what you should do
    - even after disabling flagsecure protected content can't be grabbed, maybe it will change in future but for now this will only enable grabber in netflix modded apk (but there is no HD) or in standard netflix menu but not in netflix video
    - I installed a modded netflix apk https://forum.xda-developers.com/android/apps-games/netflix-hd-ultrahd-ultrahd-dolby-5-1-l1-t3535349 they say that it should work at 4k or at least 1080p but I think that something is changed because I can't get more than 480p, not ideal at all, I was just trying to understand if flag secure was the only limitation and it's not, but we are a step closer
    - If you chromecast netflix from chrome to the shield you get 720p with grabbing enabled but I don't know if it was working before, if you cast from the app this will not work and the standard app will open and play the video
     
    Last edited: 31 October 2018
    • Like Like x 2
  9. thommy86

    thommy86 Member

    Messages:
    55
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +PhilipsHue
    I was too curious, so had to test.

    What is for the Shield the advantage of using Magisk? I am using SU and Xposed, and this does the job too. And seems a lot easier then your method.

    Did you try to mod the Android TV Netflix apk? I am not sure what needs to be edited, but I found a txt file on xda. Edit a decompiled apk is not a thing i did before.

    What I noticed is that the lights are working in the menu, but with a video played, the lights go off. (top right corner).
     
    • Like Like x 1
  10. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    Really nice work guys!

    I can't say that I find these results all that surprising to be honest. When looking further into exactly how the DRM stuff works, it does seem like it is something deeper within the GPUs themselves that encode the videostream. I suspect this is also why some devices like the Sony Bravias do not play well at all with some video - likely anything that requires the GPU to play.

    If this is the case, I'm really not sure how much help I can offer breaking down that barrier! That's a real tough one.
     
  11. thommy86

    thommy86 Member

    Messages:
    55
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +PhilipsHue
    For what I think is surprising, is that the modded app does work. So it is possible to watch Netflix with leds on. The live channels also didn't work before. With Xposed module they do light up :)
     
    • Like Like x 1
  12. Kesy

    Kesy New Member

    Messages:
    5
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    I used magisk to have a systemless mod, this way my system partition is clean and a future update will only disable the mod with no mix of files or bootloops

    Talking about taking screenshot in protected apps, I was trying this app https://play.google.com/store/apps/details?id=com.icecoldapps.screenshoteasy&hl=it on a modded galaxy s5 and I get to to take screenshot from netflix videos at 540p but I can't go further for the lack of l1 certification (i'm on lineage os, not stock rom) and I can't test it on nvidia shield tv for the lack of way to trigger the screenshot command (the custom command of the app, the standard one is triggable with a keyboard).

    I've also tried the "liboemcrypto disabler" magisk module but netflix stopped working and amazon prime video was playing (maybe was low resolution but I didn't care much of it at this point, I was just exploring) but not working with the grabber, so no luck here.

    I'm afraid that as abrenoch was saying the protection is running on a hw level and it's very likely that is not breakable, you can just run it or disable it but not trick it, at least not with my skills.

    It's a shame that my bravia xe9005 has no root and I don't want to risk so much, I think that the protection running on hdmi input is much more weak than the one running on ondemand apps like netflix, maybe the "disable secure flag" module could trick it and completely solve the problem
     
    Last edited: 2 November 2018
    • Like Like x 2
  13. Kesy

    Kesy New Member

    Messages:
    5
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Another little update, I've tried to grab directly from the frame buffer, /dev/graphics/fb0, unfortunately the nvidia shield tv reboots it self when touching it, either reading or writing it, I think they are using a custom framebuffer or it is some sort of protection but maybe on other devices it could work (also, I'm not expert and I could have caused it due to my lack of experience )
     
    Last edited: 2 November 2018
  14. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    Very interesting... I'll have to look into whether that would be a viable way of grabbing an image or not! Would probably be more along the lines of native android development for specific devices, but maybe that could be an option,
     
  15. Kesy

    Kesy New Member

    Messages:
    5
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    I think it will need root but for what I know is pretty standard, at least in older android version it worked on most of devices, there is an old tool to test it from adb if you don't want to code it, https://forum.xda-developers.com/showthread.php?t=2233751
     
    Last edited: 3 November 2018
    • Like Like x 1
  16. fahad

    fahad New Member

    Messages:
    1
    can someone tell what the setup for SHIELD tv .. like what i need for the rest ...and im new just give in simple way lol
     
  17. abrenoch

    abrenoch Android Grabber Developer

    Messages:
    89
    Hardware:
    RPi1/Zero, RPi2
    Do you already have a hyperion setup, or are you starting from scratch? If you are starting from scratch there are a few posts in the "DIY tutorials" that will get you started. If not there is a setup wizard in the app that should streamline getting things configured... But feel free to post any questions here!
     
  18. basti_

    basti_ New Member

    Messages:
    2
    Hardware:
    RPi3
    I read a lot about the Nvidia Shield. Has anyone got it running on an Android TV Box Like Xiaomi or anything comparable?
    I have a pi 3 which runs Kodi and IPTV nicely, just no netflix/amazon. I have set it up to receive the signal from my Windows machine as well for gaming. Just curious about the android TV setup :)

    For further testing I will try it on my Xiaomi Redmi 4X phone @ stock MIUI which is rooted to gather some extra information.
     
  19. basti_

    basti_ New Member

    Messages:
    2
    Hardware:
    RPi3
    Is your device rooted?
     
  20. castaway

    castaway New Member

    Messages:
    6
    Hardware:
    RPi2, +Arduino
    hello, i have hyperion setup with rpi2+arduino. Im about to buy nvidia shield. Will i have some problem getting kodi+hyperion to work? do i need rpi2 or just connect arduino to nvidia via USB with this grabber?
    im using it like this for years and many things could change so if there is some tutorial or something that can help me. I just want my hyperion work with nvidia shield :)

    thanks!