yashsingh1/xdaforums huggingface dataset:
[Google Chromecast] huisinro:
Interesting, ADT-1 itself no longer works with Screencasting from Chromecast app, this is caused by the same error as you mentioned about signature check:

D/MirroringActivity( 1985): startMirroring

I/MirroringActivity( 1985): acquireWifiLock: Acquiring wifi lock

D/WifiService( 524): acquireWifiLockLocked: WifiLock{com.google.android.apps.mediashell.MirroringAc

tivity type=1 binder=android.os.BinderProxy@164e18ab}

W/GooglePlayServicesUtil( 1184): Test-keys aren't accepted on this build.

D/AndroidRuntime( 1985): Shutting down VM

E/AndroidRuntime( 1985): FATAL EXCEPTION: main

E/AndroidRuntime( 1985): Process: com.google.android.apps.mediashell, PID: 1985

E/AndroidRuntime( 1985): java.lang.SecurityException: Signature check failed

E/AndroidRuntime( 1985): at android.os.Parcel.readException(Parcel.java:1540)

E/AndroidRuntime( 1985): at android.os.Parcel.readException(Parcel.java:1493)

E/AndroidRuntime( 1985): at com.google.android.gms.common.internal.k$a$a.j(Unknown Source)

E/AndroidRuntime( 1985): at com.google.android.gms.internal.fe.a(Unknown Source)

E/AndroidRuntime( 1985): at com.google.android.gms.common.internal.d.an(Unknown Source)

E/AndroidRuntime( 1985): at com.google.android.gms.common.internal.d$f.onServiceConnected(Unk

nown Source)

E/AndroidRuntime( 1985): at com.google.android.gms.common.internal.f$a$a.onServiceConnected(U

nknown Source)

E/AndroidRuntime( 1985): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.jav

a:1201)

E/AndroidRuntime( 1985): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedA

pk.java:1218)

E/AndroidRuntime( 1985): at android.os.Handler.handleCallback(Handler.java:739)

E/AndroidRuntime( 1985): at android.os.Handler.dispatchMessage(Handler.java:95)

E/AndroidRuntime( 1985): at android.os.Looper.loop(Looper.java:135)

E/AndroidRuntime( 1985): at android.app.ActivityThread.main(ActivityThread.java:5221)

E/AndroidRuntime( 1985): at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 1985): at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime( 1985): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote

Init.java:899)

E/AndroidRuntime( 1985): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

W/ActivityManager( 524): Force finishing activity com.google.android.apps.mediashell/.MirroringAc

tivity

I/Process ( 1985): Sending signal. PID: 1985 SIG: 9

D/WifiService( 524): releaseWifiLockLocked: WifiLock{com.google.android.apps.mediashell.MirroringAc

tivity type=1 binder=android.os.BinderProxy@164e18ab}

W/MediaFocusControl( 524): AudioFocus audio focus client died

I/MediaFocusControl( 524): AudioFocus removeFocusStackEntry(): removing entry for android.os.Binde

rProxy@1dd39487

I/WindowState( 524): WIN DEATH: Window{35584dee u0 com.google.android.apps.mediashell/com.google.an
[Google Chromecast] huisinro:
Hi HomerSP,

can you explain more how ADT-1 obtain certificates and calculates hash value for device auth request? In other words, how did you get the hard coded certificates and hash value?

If you can describe the java code or native c code that call the relevant functions, would be really helpful.

Thanks, and happy new year!
[Google Chromecast] HomerSp:
It's using the MediaDrm API's: https://developer.android.com/reference/android/media/MediaDrm.html

You should be able to figure out how it works by looking at my changes (in the OP).
[Google Chromecast] huisinro:
What is the relation between java side certificate and the custom certificate inside the native code .so file? do they have to be the same?

Thanks,
[Google Chromecast] iballan:
Live signal on Danish TV2 play app not working

Wow this is a nice service. I have done the System install on my Minix Neo X7.

The server is running, and i can cast all stored programs from the Danish TV2 Play app. Unfortunatel i cannot make the live signal work.

I shortly displays the name of the current tv-show, and then i shows a black screen.

Are you able to help?
[Google Chromecast] HomerSp:
Which java-side certificate do you mean? The public one? If so, that's used for verifying that the data that is signed using the private key is correct.

Does it work correctly on a "real" chromecast? It is, as you may imagine, difficult to debug region-restricted apps, so there may not be anything I can do here. A logcat might help though.
[Google Chromecast] huisinro:
Hi HomerSp,

Thanks for getting back to me. I was referring to the private key in your java code (com/google/android/apps/cast/CastReceiverServiceBase$1.smali) and the native certificate inside the modified .so file (0x1E412C4-0x1E415A2). Is 0x1E412C4-0x1E415A2 really a complete certificate? It does not look a complete one to me.

Would really appreciate if you can shed some lights on the whole process: How do you get the certificate from the private key? How do you get the signature (by calling APIs on ADT-1) for that signature? I have ADT-1, and can try to generate new keys to test. If you can describe the details, will save time for me.

In addition, I've cracked the chromecast mirroring protocol, and are now developing some senders that support chromecast mirroring. I will try to release a app on Android, called YouCast, that can send screens to Chromecast (and ADT-1, too).
[Google Chromecast] HomerSp:
The private key in the java code is what was used for creating the certificate that's embedded in the .so. The certificate itself is 0x2de bytes long, so those addresses are correct. Keep note that this is a self-generated certificate, so if you're thinking that the private key that's used here is useful, it's not (it's one I have generated myself) :)

The signature is generated using the signRSA method of MediaDrm, you can check the log output while using my modified app to see what parameters you need to pass to the method (look for signRSA). I'm not entirely sure what the message passed to the signRSA method is, but I know it contains a sha1 hash of the certificate (I'm currently looking into this).
[Google Chromecast] kgersen:
Did you see the source Google posted : https://code.google.com/p/android-cast-mirrored-source/ ? (i havent read the 11 pages here so ignore this if you talked about this yet).

The project is a just a readme which contains links to the source tar files:
[Google Chromecast] HomerSp:
I did not in fact see that, I will most certainly have a look. Thanks! :)
[Google Chromecast] huisinro:
Hi HomerSp,

Again, thanks for posting more info.

I will dig more when I got time. Right now, I am debugging my Chromecast mirroring sender, and dump out the peer certificate and the signature from device auth response. I noted the signature is same as in your java code, but the certificate is different from the one inside your .so file, even the length is not same, which was the reason why I asked you about whether it's a complete certificate.

When you calculate the signature, did you pass the embedded signature in the .so file to signRSA() method? or it's something different that you used as the input to get the signature.
[Google Chromecast] FireFriend:
Have you had any luck with Netflix? I have a UG802 android tv stick (Rockchip) And the Youtube functions works great for my living room. I'm running Android 4.4.2
[Google Chromecast] HomerSp:
I didn't really calculate the signature, I just wrote an app with the values that were passed to the MediaDrm functions and had [MENTION=2975319]death2all110[/MENTION] run it on his ADT-1 which generated valid signed data from the message. After some digging into this I've realised that the message is passed from OpenSSL, so you need to dig through the OpenSSL code to find out what the message actually consists of. I do however know that the last 20 bytes of it is a sha1sum of the peer certificate.

Unfortunately, no. The Netflix code is so bad that it will be difficult to produce anything useful. I may give it another go soon though.
[Google Chromecast] dabotsonline:
My Fire TV is non-rooted and attempts to follow the procedure with the Signed APK have failed at every step. Is it still possible on the latest firmware - either completing the procedure without rooting, or successfully rooting then completing? Thanks.
[Google Chromecast] HomerSp:
You need to install Google Play services for this to function properly. Other than that I think the signed version should work on an unrooted device, I'm sure there are guides out there for how to install GMS on your Fire TV. There have also been people successful in installing it on their device earlier in this thread, maybe you can try contacting them?
[Google Chromecast] dabotsonline:
Hi [MENTION=2266182]HomerSp[/MENTION] , I've read through this thread as you suggested, but I'm still having problems with my stock, non-rooted Fire TV. Here are my details:

Settings > System > Developer Options:

ADB debugging: ON

Apps from Unknown Sources: ON

Settings > System > About:

Software Version:

51.1.4.2_user_514015320

I then used ADB on my Mac OS X 10.10 computer:

% cd Downloads/APK/Fire_TV

% adb connect 192.168.1.170

% adb install -r com.google.android.gms-6.6.03_\(1681564-030\)-6603030-minAPI9.apk

[MD5 of that APK from http://www.apkmirror.com/apk/google.../google-play-services-6-6-03-1681564-030-apk/ :

39E3C8ACAD6600CBE7FAC71685E212C5 ]

SUCCESS

I then unplugged and replugged my Fire TV by hand as 'adb reboot' didn't work

When it restarted, I went to Settings > Applications > Manage All Installed Applications > Google Play service > Launch application

I then returned to my Mac

% adb connect 192.168.1.170

% adb install -r AndroidMediaShell-signed.apk

[MD5 of that APK:

7368FC5E9D29B00AAD023969B3602A1F ]

'Failure [INSTALL_FAILED_OLDER_SDK]'

(Incidentally, what does the '-r' option do? Installation of the latter APK fails whether I include it or not, though.)

Any ideas?

Also, once that has succeeded, how would it then be possible to succeed with 'adb shell mv /system/app/WhisperplayCore.apk /system/app/WhisperplayCore.apk.bak' on a non-rooted Fire TV?

Cheers.
[Google Chromecast] HomerSp:
Could you try this apk: https://docs.google.com/uc?export=download&id=0B4FOzj4b2EYiVDR1a1o0WFVSWjg

I thought the one in the OP had a lowered minimum API, but I guess it didn't.

I forgot that the Fire TV required you to disable WhisperplayCore, simply put, you won't be able to do that on a non-rooted Fire TV.
[Google Chromecast] dabotsonline:
Hi [MENTION=2266182]HomerSp[/MENTION], I've made some progress on my Fire TV running non-rooted 51.1.4.2_user_514015320:

*** Already completed ***

[ % adb connect 192.168.1.170

% adb install -r com.google.android.gms-6.6.03_\(1681564-030\)-6603030-minAPI9.apk

[MD5: 39E3C8ACAD6600CBE7FAC71685E212C5 ]

SUCCESS ]

***

% adb install -r AndroidMediaShell-signed.apk

[MD5 of your new APK: A3978F7129D5FA6EE2146DE9F542649E ]

SUCCESS

% adb shell pm disable com.amazon.whisperplay.cds

Killed

% adb shell pm disable com.amazon.whisperlink.core.android

Killed

% adb shell am force-stop com.amazon.whisperplay.cds

% adb shell am force-stop com.amazon.whisperlink.core.android

(doesn't seem to restart Fire TV as was feared, thankfully)

% adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -n com.google.android.apps.mediashell/.AutoStartListener

When I then try to cast something from BBC iPlayer, Deezer, YouTube, Zattoo from my iPhone 4S running iOS 8.1.2, I can find 'AFTB' under my Chromecast icon list and the icon turns solid. However, the playback screen on my phone shows a constantly loading symbol, and the Fire TV screen shows 'Ready to Cast' for about 30 seconds before returning to the home screen.

Is this as far as it's possible to get without having root access?

Thanks again.
[Google Chromecast] DA6030:
New apk pushed to Android TVs via Play Store

App updated today via GPS: https://play.google.com/store/apps/details?id=com.google.android.apps.mediashell

Any Nexus Player owners have a capture of the new APK?
[Google Chromecast] laurorual:
What about those who has a phone in Android 5 and cant use Xposed to fix the issue with Google Play services? Are we out of luck? :(

Also, i cant make any video casting work on my Galaxy Tab 8.9 (i'm casting from my PC to my Galaxy Tab, which is in Android 4.0.4) and youtube casting shows me "YouTube on TV is not supported on this device".

I'm using the signed apk version because my tab doesnt have root. The chrome connects with my tab, it shows the casting app connected in my tab but it doesnt actually cast any video to it(eg. Plex and VideoStream). The xposed version of this app will solve this? Or is Android 4.0.4/casting from pc kind of incompatible?

Music and Photo casting seems to work well at least :p

By the way, great app! I can see a lot of pottential in here! Make our old android devices alive again :p
[Google Chromecast] lagrra:
More support

Would be awesome if we could have support for; TorrenTV, Popcorntime, Showbox, TV 2 Play and ofcource Netflix :)
[Google Chromecast] osm0sis:
Don't think Showbox even supports casting, so that's a crazy request.
[Google Chromecast] mik101:
Has anyone gotten this working with any of the Chrome Apps? ie VideoStream For Google Chromecast, LocalChromecast Player, or the Cast Player extension for Chrome?

I have it working fine with Youtube, and that's great, but I don't understand why I can't get the cast button to make my device show up for anything else (just my real Chromecast does).

How does the receiver behave with a real ADT1?

Hopefully we can make it function more like a real Chromecast once we get our hands on the updated APK from the play store as requested above.

Thanks to HomerSP for the hard work!

Edit: I forgot to mention I'm using the flashable zip.
[Google Chromecast] ahmedsalah83:
Here you go, the apk from the nexus player

https://www.dropbox.com/s/jrfophd5jahxpcn/base.apk?dl=0

https://www.dropbox.com/s/jrfophd5jahxpcn/base.apk?dl=0
[Google Chromecast] mik101:
How was that posted 8 days ago when Google only updated it on the market 2 days ago?

Edit, and it contains only the x86 lib.so when the ADT1 is Tegra4(ARM) based.

Edit 2: Crashes upon update, not that it was unexpected. Shame Google won't let everyone use this anyway. It would be a great addition to the Android platform. They'll likely do everything they can to make sure this is dead in the water. :( I don't have time to look at what they changed right now.

Edit 3: Had to reflash the system package to even get it to show up again as a receiver. Simply uninstalling the update didn't do it.
[Google Chromecast] HomerSp:
[MENTION=2222938]dabotsonline[/MENTION] It looks that way I'm afraid. I'm pretty sure other people in this thread got it working on their devices, but I'm not really sure how.

[MENTION=632910]DA6030[/MENTION] It will have to be pulled from the ADT-1 due to the Nexus Player being an Intel device. However, as things are I don't really have the time to port all the changes (nor do I really want to ). If there are a lot of changes, I may port it some time in the future, but don't get your hopes up.

[MENTION=2537964]laurorual[/MENTION] As it is, yes. I am working on something that you may find interesting though (it's related to Xposed and Lollipop).

[MENTION=2659831]lagrra[/MENTION] Unfortunately I have little to no control over what apps are compatible with the Cast Receiver. I can only fix an existing implementation, and even then that may not be so easy (Netflix for example).

[MENTION=2742000]mik101[/MENTION] I think the later versions of the Cast Receiver extension check the certificate expiry date, just like the Google Play services. So we're pretty much out of luck here.
[Google Chromecast] magdap:
Can you please make a full tutorial how you came this far?

Thanks!

I still can't even see my aftv, although I did exactly the same
[Google Chromecast] agleung:
Thanks [MENTION=2266182]HomerSp[/MENTION] for the instructions. I have tried to get the receiver to work in a rooted Android TV box running 4.2 using system install with Xposed module for receiver. Here are my steps

1. I used ES File Explorer to move libcast_shell_android.so into /system/lib/ and AndroidMediaShell.apk into /system/app/ and change permissions to 0644

2. I installed Exposed/frameworks and the module for receiver. Rebooted.

It runs only when I disconnect the ethernet cable, i.e., wifi only. I can see under Settings-Apps-Running app that Google Cast Receiver is running and MediaShellCast ReceiverService is started.

On the Mac Chromcast tab I can see the Android box listed as a DIAL device (looks the same as my Tivo Roamio without the android guy and only available to YouTube tab). It crashes when I start sending video from YouTube.

I noticed I don't have libgcastv2_base.so or libgcastv2_support.so in /system/lib so I copied those from /data/app-lib/com.google.android.gms-2/, changed permissions to 0644 and rebooted. Still unable to cast and looks to be DIAL only.

Edit: I figured out how to get the log via SSH while I cast from YouTube Chrome tab. pastebin.com slash UpqeymVx. (Sorry I am not allowed to post link yet.)

Q1: I don't have a second rooted Android device to run Xposed client module. Is there an older Android or iOS app I can cast from?

Q2: How do I know if I have the codecs for proper screen casting?

Q3: How can I tell if cast v2 protocol is started?

Q4: With the Google Play Service 6.5 date checking. Does it mean chrome tab casting will not be possible, i.e. only rooted Android with Xposed client module to Android.

Q5: Even if working, I assume I am stuck with wifi only. Any chance to get ethernet going in non-FireTV devices?

It has been a fun experiment. My goal is to have an ethernet connected Android TV that I can cast from Chrome tab (non YouTube) that I can use a hand held remote (not game pad or phone) to play and pause. I could look into getting another box. ADT-1 needs hack to allow non dev mode restricted contents. It also does not come with a remote. Nexus Player needs USB dongle to get ethernet. Razor Forge does not have a remote either. What do you guys think?

Thanks.
[Google Chromecast] Maxr1998:
[MENTION=2266182]HomerSp[/MENTION], this doesn't work for me. I have the signed version on my stock 5.0.2 Nexus 7 2012 with Play Services 6.5.99, tried to start the receiver with adb (it doesn't show up in Settings → Apps → running apps, but I'm pretty sure I didn't mistype anything), my casting device is this Nexus 4 with the Xposed mod and Android 4.4.4, but the cast button doesn't appear anywhere in the apps. I already rebooted both devices multiple times..

Sent using my nexus⁴ running Mahdi 2.8 with Xposed and hells-Core B64

Bitcoin donation address
[Google Chromecast] bkfitz:
does this work with Pandora?

does this work with Pandora
[Google Chromecast] bkfitz:
Having trouble with Galaxy S3 i535 Verizon Rooted Via Towelroot

Pulled my old Verizon GS3 out of the drawer, factory reset (to 4.4.2 because I had done all the stock upgrades), 'rooted' via Towelroot one click apk (while SuperUser shows me rooted, I don't seem to have a recovery that allows me to flash ROMS), then tried to get this working by installing the signed apk and the Xposed fix for both the receiver (GS3) and my 'client' (Galaxy Tab 10.1 pro unrooted Kit Kat), but when I install the Chromecast app from the play store and search for Chromecasts, it can't find the receiver... any thoughts?

UPDATE: Ran the adb script to run on boot and now i see the cast receiver app running under applocations -> running but i dont see it from my tablet when i open the chromeast app...? Help.

UPDATE 2: I now see the device in my ubuntu laptop chrome cast extenstion and when I go to cast to the device it seems to be working, but I don't hear any audio coming through the 3.5mm on the receiver phone (I only intend to use this to stream audio)? Casting from my tablet still isn't working at all...

Thanks!
[Google Chromecast] zAo_:
Did anyone succeed/try the Google Cast Receiver for Android TV? It's in de Play store:

https://play.google.com/store/apps/details?id=com.google.android.apps.mediashell

I installed it on CM11 (4.4.4) without a problem. I just don't know how to start it (reboot doesnt help).
[Google Chromecast] jimchen5209:
No permission

I used Terminal Emulator for the shell command and it gave me these errer messages.

u0_a115@mango:/ $ am broadcast -a android.intent.action.BOOT_COMPLETED -n com.google.android.apps.mediashell/.AutoStartListener

Broadcasting: Intent { act=android.intent.action.BOOT_COMPLETED cmp=com.google.android.apps.mediashell/.AutoStartListener }

java.lang.SecurityException: Permission Denial: broadcast asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS

at android.os.Parcel.readException(Parcel.java:1465)

at android.os.Parcel.readException(Parcel.java:1419)

at android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2462)

at com.android.commands.am.Am.sendBroadcast(Am.java:802)

at com.android.commands.am.Am.onRun(Am.java:284)

at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)

at com.android.commands.am.Am.main(Am.java:76)

at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)

at dalvik.system.NativeStart.main(Native Method)

1|u0_a115@mango:/ $

What should I do?

Do I need to root the device or run it on adb?

I'm using Acer Iconia A1-810 and have android 4.4 Kitkat installed(System update).
[Google Chromecast] Maxr1998:
It seems the Terminal Emulator has the wrong permissions, you have to do it via adb, then it works..

Sent using my nexus⁴ running Euphoria 1.0 with Xposed and hells-Core B69-t4 L

Bitcoin donation address
[Google Chromecast] ThauExodus:
Can you provide this apk or tell me, how I can download it?
[Google Chromecast] Neur0Nerd:
Doesn't work for me, I have it installed and I have the button displayed but once I cast whatever I want, it starts the casting procedure but before the media is played, I get an error :/
[Google Chromecast] Phat Phreddy:
http://www.apkmirror.com/apk/google-inc/google-cast-receiver/

---------- Post added at 07:31 PM ---------- Previous post was at 07:08 PM ----------

Just tried to sideload that to a amazon fire TV (non rooted) and it fails..

I would DEARLY love that app to work.. Chromecasting to my AFTV box from android phone would be a huge feature.
[Google Chromecast] akenis:
No prob..

1. Let showbox update

2. Uninstall MX player

3. Search/install growbox.apk on android phone.

4. Install Allcast on phone

5. Install Allcast Receiver on Fire TV from Amazon app store.

That should do it. Allcast will set you back $6. Can be done with Localcast for free. But you have to sodeload on Fore TV since its not approved by Amazon.
[Google Chromecast] Phat Phreddy:
Will give that a try..

That enables casting from all devices ?? If I have allcast on iPad iOS also ??

And all apps ??

This should work over DLNA.. Unsure why it isnt currently..
[Google Chromecast] roberto.andrade:
Running on Android x86

I had to install the .so onto /system/lib/arm so it wouldn't complain of the wrong el_machine when loading the library but now I'm crashing with:

houdini ( 2916): [2916] Unsupported feature (ID:0x1140001a)

Which I believe is the binary translation layer trying to map the ARM instructions on the lib to x86 sets. Any tips/clues as how to run this on an x86 machine?
[Google Chromecast] MaluNoPeleke:
Same problem here on a Nexus Player with Android 5.1
[Google Chromecast] death2all110:
May I ask why you're trying to do this with a nexus player? And it won't work because the app is for ARM based SoCs not x86. It will need rebuilt with support for x86
[Google Chromecast] MaluNoPeleke:
With the update the casting feature works much better than before but two apps (Sky and Magine) don't work. I think it is a DRM problem.
[Google Chromecast] radicalbiscuit:
This might be a silly question, but what's the "correct" way of removing (uninstalling) the signed APK version?