yashsingh1/xdaforums huggingface dataset:
[Google Chromecast] nicolahaye:
One little problem I have : after a little while of mirroring (about 5minutes or so) it gets all blurry on the TV screen :s and I have to stop mirroring and restart it so that it looks normal again. Any idea to what it might be due ?
[Google Chromecast] hwong96:
Casting screen, aka mirroring, requires the screen to be on at all times. If the device screen goes blank so will the TV screen. Plug charger in device if casting screen so battery power will be sufficient to prevent device from turning screen off due to lack of battery power.
[Google Chromecast] hwong96:
Is your phone blurry also? How old is the TV? What is the native resolution of the TV - 480p, 720p, 1080i or 1080p? Is there a way to upgrade software on the TV? Have you tried switching inputs from hdmi1 to TV back to hdmi1?
[Google Chromecast] mylee:
Chromecast on XiaoMi 3

This program is not working for my XiaoMi 3 although it seems to work on XiaoMi 2. My OS of XiaoMi3 is 4.4.2 with the latest firmware. Does anyone have the same issue as I do? Is there any solution to enable Chromecast mirroring on my XiaoMi 3?

Thanks.
[Google Chromecast] mkone5718:
Great work!
[Google Chromecast] hwong96:
Explain "not working".

Required for cast screen function in chrome cast with mirrorenabler v1 to v4, v5 optional

Rooted device on kitkat

Google Play Services v5.0.89

Chrome cast app v1.7.4

Chrome cast firmware 17250 or higher

Install mirrorenabler v1, grant SU access, enable mirroring

Open chrome cast app and slide out menu on the left. Do you see "cast screen option"?

If no, install mirrorenabler v2, grant SU access, enable mirroring

Open chrome cast app and slide out menu on the left. Do you see "cast screen" option?

If no, see this post

http://xdaforums.com/showpost.php?p=54371469&postcount=1115

If yes, select cast screen.

Do you have audio/video?

If yes, success.

If no, check /system/etc/audio_policy.conf for r_submix section and /system/lib/hw for audio.r_sub mix.default.so lib. Make a backup copy of audio_policy.conf in case you ever need to restore it.

If missing r_sub mix section in audio_policy.conf, install mirrorenabler v4, grant SU access, enable mirroring, enable force close fix

Do you have audio/video?

If yes, success

If no, read red hi lighted text in post #1

If r_sub mix section exists in /system/etc/audio_policy.conf, your video driver is missing the video codec.

Attach logcat in a txt or zip file. Do not paste output.

If you ever want to uninstall mirrorenabler, disable force close fix first. Otherwise, you will need that backup file I mentioned a few lines up.
[Google Chromecast] mylee:
Thanks for prompt feedback.

1. My XiaoMi 3 is rooted and installed mirrorenabler v5. I also enabled all the options in mirrorenabler v5 and grant root access.

2. Chromecast is updated to the latest firmware and Chromecast app version is 1.7.4.

3. I opened chrome cast app and slide out menu on the left but didn't see "cast screen option".

4. I will try the method below and give feedback.

http://xdaforums.com/showpost.php?p=54371469&postcount=11
[Google Chromecast] CounterC:
Can anyone inform me about the quality of their mirroring on the tv? Mine is not good. MHL was a lot better. Is there any way to improve quality or bitrate.

Aprreciated...

I'm on Galaxy S2 NeatRom 4.4.4
[Google Chromecast] t3chwizard:
Working great on the Optimus G Pro running the custom BEANSTALK KitKat 4.4.4007 ROM. A little lag. But as I am mirroring over WiFi and this is experimental I have little complaints.
[Google Chromecast] hwong96:
There are several things you can try.

1. Get a HDMI extender to move chromecast from behind the TV to the front.

2. Switch wifi channels at the router.

3. Move the wifi router closer to the chromecast.

4. Go to device settings-display-cast screen and turn off if on or vice versa ( may have no effect).

MHL and wired HDMI will always be better than mirroring.
[Google Chromecast] nappster:
s2

I have Download and install the Rom from here

When i now mirror my screen it was only black !

S2 with ROMs that allow Screen Mirroring
[Google Chromecast] hwong96:
Clear data/cache in chromecast app, Google play services.

Reboot phone, chromecast.

Launch cast screen.
[Google Chromecast] mylee:
The method is working. The option of "Cast Screen" shows in my app and the mirror function is working.

Thanks.
[Google Chromecast] nappster:
I have do it but its the same, black screen for seconds ( 20 or less) than he goes back to normal chromecast screen.

When i start mirror, then google play service is ending.

I test it and mirror runs ! but is very poor performance, slow.

I think thats the reason why google do not release for all Android Cell Phones
[Google Chromecast] hwong96:
You tried both S2 roms in the op with mirrorenabler v4 and they do not work on your device?
[Google Chromecast] nappster:
First i used the mod cynagogen from this site cm-11-201xxxx-Marko89-9100 and he makes a Black screen

then i use Netrom 4.4.4 and Mirror is working, but is very poor/slow and makes no Fun when is worked like this.

I have see Videos with google mirror support and this is fast !

Now I am back to Cynagogen Marko Rom, netrom is not my style.

EDIT: I used Mirror enabler V5
[Google Chromecast] JohnKoffee:
Can't get it to work on my Gtab 2 10" ( Android 4.4.4 MarkoX89). Even with the latest update of #MirrorEnabler, still having Google Play Services fc issue... :(
[Google Chromecast] g4b3rm4n:
Mirroring works on LG-D405 (L90) with CM11 without any problems ^_^
[Google Chromecast] hwong96:
CM11 based ROMs had an apopps error for audio recording permission denial

the CM upstream fix: Revert "appop: reimplement

OP_RECORD_AUDIO op check in mediaserver" which caused chromecast cast screen to crash due to audio

recording permission denied error in logcat.

Try a later version and see if it is fixed. Attach logcat text file. Do not paste output.

---------- Post added at 01:25 PM ---------- Previous post was at 01:22 PM ----------

See my repl y to JohnKoffee above.

http://xdaforums.com/showpost.php?p=54719603&postcount=1502
[Google Chromecast] tharmor:
Getting Google Play Service force close on my Galaxy Tab 3 running on Kitkat 4.4.2.......both google play services and chromecast app latest !

Please help !

Have attached the logcat.
[Google Chromecast] illfrozn:
Can I ask what TP build?
[Google Chromecast] PolishPoet:
It was working, but when I tried it today it flashed the tablet screen and then went to black. Haven't been able to get it to work again.
[Google Chromecast] r3pwn:
That won't exist, they need to be given to the Chromecast App, but it doesn't request them. So basically nothing you can do right now. Unless there's a way to grant permissions to a package via pm (PackageManager).
[Google Chromecast] lartomar2002:
Isn't the Gtab a tegra 2 device? If so I believe it does not support any type of casting.
[Google Chromecast] hwong96:
How about platform.xml in /etc/permissions? Could it be inserted there and assigned a group_id? We should see if anyone who has a supported device attach the platform.xml file for a look. Attached is cm11's platform.xml file.
[Google Chromecast] hwong96:
[MENTION=5314601]tharmor[/MENTION], [MENTION=4732871]r3pwn[/MENTION]

Add permission like this.
[Google Chromecast] JohnKoffee:
It's not. It's an OMAP SoC if I'm correct.
[Google Chromecast] lartomar2002:
I have a Gtab and it is a tegra 2. It is old and I only use it for displaying pictures.
[Google Chromecast] iSecks:
I can't get this to work on my Moto X. I've tried V1 and V2 a while ago, and just checked again and tried V5 but none of them have worked. It says 'Enabled' after reboots and everything but it doesn't show up in the Chromecast app [updated as well.] Any ideas?
[Google Chromecast] hwong96:
Read my instructions here http://xdaforums.com/showpost.php?p=54696076&postcount=1489
[Google Chromecast] omega5384:
Nvidia shield Mirrorenabler v5 all I get is a black screen when I cast. It installed fine. Anyone else having this issue?
[Google Chromecast] iSecks:
Went through all of that, I have audio.r_submix.default.so, r_submix in audio_policy.conf, I still don't see any cast screen [in the Chromecast app or in the quicksettings with V5]. I assume that means I'm missing the video codec, as per the last lines in the post you linked. What should I send a logcat of, the chromecast app?
[Google Chromecast] hwong96:
Open terminal

Type su ( press enter)

Type logcat > /sdcard/logcat.txt (press enter)

Attach in reply. Do not paste output, too much verbiage.

---------- Post added at 09:50 PM ---------- Previous post was at 09:49 PM ----------

See my reply to iSecks above.
[Google Chromecast] iSecks:
Attached. Thanks!
[Google Chromecast] hwong96:
It appears you did not read and follow instructions. After v2 did not work you should have read post #1115 and follow those instructions to add the values manually to Google services framework database using sqlite editor. The instructions clearly state

If no, see this post

http://xdaforums.com/showpost.php?p=54371469&postcount=1115

When a link is given, click on it to take you to the post.

Read this post and click on the link given http://xdaforums.com/showpost.php?p=54707602&postcount=1496
[Google Chromecast] roland deschan:
Samsung Smart TV

Hi...

Anyone tested this with a Samsung Smart TV using Screen Mirroring without Chromecast?
[Google Chromecast] tharmor:
They exist in platform.xml.........
[Google Chromecast] iSecks:
I did follow the instructions, the value already existed and was set to true.
[Google Chromecast] hwong96:
OK. I saw in the logcat you have p2p. Go to device settings-display-cast screen and turn off. Reboot device. Open chrome cast app. Do you see the cast screen option now?

---------- Post added at 12:54 AM ---------- Previous post was at 12:47 AM ----------

What exists in platform.xml? Make a screen print of the permissions. If the permission exist, there should not be a permission denied error.
[Google Chromecast] tharmor:
Here is the screenshot !
[Google Chromecast] oxygenoxy:
I'm using I9305 with omnirom omni-4.4.4-20140809-i9305-NIGHTLY.zip with pa_gapps-modular-micro-4.4.4-20140804-signed.zip. When I click on the Chromecast to cast my screen, after a short while, my whole phone crashes. As in I have to remove the battery physically to restart the phone. I've updated all apps to the latest version.

Edit: Let me know if you want the logcat.
[Google Chromecast] fersy:
On CarbonRom screenmirroring is working... galaxy s3 lte i9305
[Google Chromecast] oxygenoxy:
Thanks. I just might switch to carbonrom for this feature!
[Google Chromecast] CounterC:
How is your quality?

I saw some nexus 5 demos and the quality and delay looks amazing. I don't have that on my galaxy s2
[Google Chromecast] hwong96:
Read this post http://xdaforums.com/showpost.php?p=54721990&postcount=1510

---------- Post added at 10:13 AM ---------- Previous post was at 09:35 AM ----------

A logcat will be helpful.

Type su (enter)

Type logcat > /sdcard/logcat-i9305-omni.txt (enter)

Attach .txt file or zip. Do not paste output.

---------- Post added at 10:50 AM ---------- Previous post was at 10:13 AM ----------

Uninstall chrome cast app. Clear data/cache in Google services framework. Reboot device. Reinstall chrome cast app. Enable mirrorenabler. Open chrome cast. Do you get cast screen option?
[Google Chromecast] tharmor:
Thanks will add the line and revert !

Edit : Not working....it seems codec issue....
[Google Chromecast] newb4r9o:
Guys, Try CM nightly!!

Couldn't get my n7100 to work. I went about downloading recent roms; unzipped them; discarded those that did not have /system/lib/hw/audio.r_submix.default; installed a number of roms that did include audio.r_submix.default but nonetheless failed.

Yesterday tried http://download.cyanogenmod.org/?type=nightly&device=n7100 (enter YOUR device instead of n7100) and it works brilliantly! (I have historically used omnirom, pacman, RR, etc. but never CM - CM is FINE) AND it screencasts very well!!

Am using V5; only need to enable Mirror Status.

(If I try to cast and do other stuff (e.g. mail), it can slow things down a little, but it's fine!

(Note 2 N7100; cm-11-20140809-NIGHTLY-n7100.zip)

HTH!

.
[Google Chromecast] iSecks:
So I was reading everywhere that mirror was working on KK devices, and so trying all of this stuff I assumed I could get it working as other Moto X owners say it works. Well I was reading the changelog when reinstalling the Chromecast app, turns out it's for 4.4.2+ and I'm only on 4.4... D'oh!

Anyways, thanks for the help. Hopefully I can use Dan Rosenberg's bootloader unlock soon and root 4.4.4 on my vzw X.
[Google Chromecast] xbiggyl:
My setup: HTC One m8 - ARHD v10.1 - Default kernel

After trying v5 and following this thread, I posted a question in my ROMs thread, asking if and how I can bake the audio.r_submix.default into ROM but I was told that the "device.mk is for source built roms. [ARHD] is just from HTC mainly so doesn't have the file."

I don't want to believe that this means the end of my efforts to make this work. As a last resort, I included a link to my logcat and hoping that someone would take a look at it and see if there's anything to be done.

LINK to Logcat

Any input is really appreciated,

Cheers,
[Google Chromecast] hwong96:
Your logcat shows audio output recording permission denied. See attached. HTC will have to add it to its closed source ROM.

You could check out cm11 HTC one m8 ROM here http://xdaforums.com/showthread.php?t=2743579

See if the ROM maintainer will add it to the cm11 ROM.
[Google Chromecast] runandhide05:
It works on stock so something they did broke it. And yes since is based on stock they are not compiling, They are taking a stock Rom and adding / removing items after the Rom has already been compiled (this is with ALL ROMS that are "based on stock")

The stock htc m8 roms have the required remote submix audio dependencies when htc compiles them.

I've looked at the Rom you linked and the files needed are indeed in there so something they added/removed/or otherwise edited is what broke it.

My suggestion would be get your hands dirty and start comparing a stock htc Rom to theirs (make sure if their is based off international 4.4.3 use and international 4.4.3 for comparison it will make it easier), compare their permissions to stock, compare the libs under hw and so fourth. If you find any diff change theirs accordingly. I tell you to do this because A. It will help you, and B once you find what's braking it you can let the Rom creator know and he can fix it. A Rom creator is more likely to help if you bring him the problem and a solution

sent from space
[Google Chromecast] bhiga:
IIRC officially it's 4.4.1+ not that it matters if you're really on 4.4.nothin ;)
[Google Chromecast] hwong96:
I did some investigation into the apopps audio record permission denied issue and found the root cause.

The AudioFlinger.h and AudioFlinger.cpp code has a bool 'checkAudioRecordOp' which causes the errors. CM11 roms had this issue several night lies ago, but fixed it by removing 'checkAudioRecordOp' from the code. This is not something you can do unless you know how to compile the rom. Best if you contact rom maker/maintainer and see if they are willing to make the changes.

I have attached screen prints of the AudioFlinger files for reference.
[Google Chromecast] hwong96:
See my post #1537
[Google Chromecast] CoOoL_BoY:
please upload this app to play store
[Google Chromecast] r3pwn:
I would, but I have not because I would get tons of mixed ratings due to the mirroring not working properly on some devices, which is not my fault, but people would still leave negative reviews because of that, even if it is free... Also, the Play Store isn't available on some devices, so this is the best method.
[Google Chromecast] CoOoL_BoY:
well i would rate it 5 stars ;)
[Google Chromecast] bhiga:
Yeah, wish Play Store reviews would downrate "didn't work" reviews somehow... Reviews should be based on what the app actually does, rather than what people want or think it should do... :silly:
[Google Chromecast] jizar:
Galaxy Mega SGH-M819N

Confirmation - Tested

Working on Samsung Galaxy Mega 6.3 SGH-M819N (MetroPCS)

Running CM11 4.4.4 ROM
[Google Chromecast] tharmor:
But i an getting codec failure error as well. What is the reason for that ?
[Google Chromecast] ebrinkis:
Nook HD+

Nook HD+ now fully functional after updating to cm-11-20140809-NIGHTLY-ovation.zip. Thank you to Verygreen for getting the changes pushed through! Now I can use any app on my Nook HD+ to watch a movie in any format (including all the ones not previously able to be cast to Chromecast like AVI) by screen casting. This has taken my Nook HD+ to a whole new level. Thanks again to r3pwn for the app, hwong96 for finding the problem in the builds, extrem0 for the unofficial build /temporary fix and Verygreen for getting the changes pushed through for the CM build.
[Google Chromecast] hwong96:
Chromecast will try to utilize a specific feature of a codec. If it is not avaiable an alternative is used. The device logs errors for debugging. But "StoreMetadataInBuffers" is not supported by the Marvell codec.. Metadata is "data about the data". Each step of code execution that passes gets "we announce support". I see a transition now idle>executing. Then executing. Unfortunately, the permission failure for audio record dependency force closes "gotoExit" so I can't determine if video output is fine or not.
[Google Chromecast] recipientsuperior:
Working on gpad 8.3 stock rooted!

Finally got this to work on my LG Gpad 8.3 running stock rooted 4.4.2. Used v5 and sqlite edit (post #1115; used asqlitemanager to do the edit. ) Right now it's working pretty well save for some amount of latency. Thanks for this!
[Google Chromecast] oxygenoxy:
Screen mirroring is working on carboj ROM on i9305. However it is quite slow and there's no sound. Any chance a logcat will help in debugging what's wrong or the fault lies with the ROM?
[Google Chromecast] hwong96:
Turn up the volume before casting. Unplug chromecast and plug back into HDMI port. If that does not work, reboot phone and chromecast.

Type su (enter)

Type logcat > /sdcard/logcat-carbon-i9305.txt

Attach file, do not paste output.
[Google Chromecast] Krllo:
when it is installed really works ... but all others google apps like youtube, playere, real player stop to cast on tv. i use carbon KK rom
[Google Chromecast] hwong96:
Try rebooting chromecast after screen casting before launching the apps in chromecast.
[Google Chromecast] JulianAT:
Device: Samsung Galaxy S4 Mini (GT-i9195, LTE-version)

ROM: CyanogenMod 11 (Nightly from 12th August 2014)

#MirrorEnabler:

Version: v5

Mirror Status: Enabled

Force-Close Fix: Disabled

QuickSettings Mirror: Does not take any effect to QuickSettings.

Quality:

Sound and video works great with games!

Video laggs a little, but it's absolutley okay :)

Thanks for your work!
[Google Chromecast] CounterC:
Y

So I guess galaxy s2 isn't powerful enough to cast screen at good quality? My video quality sucks. Very pixelated...

[MENTION=4732871]r3pwn[/MENTION] Can this be a rom issue or a mirrorenabler app issue?
[Google Chromecast] ziddey:
I've noticed that on a Sero 7 Pro running dopa 2.1, this app will break google play music, pandora, and most likely many other apps:

E/AudioFlinger( 133): Sample rate out of range: 44100 mSampleRate 8000
E/AudioTrack( 133): AudioFlinger could not create track, status: -22
E/AudioSink( 133): Unable to create audio track

This is with trying to play without casting (built-in speakers / headphones). Of course, there's other inherent issues with the rom and screen casting regardless, but just curious if this affects anyone else. Imagine it has to do with libaudiopolicyconf.so

edit: manually adjusted audio_policy.conf instead of applying the fix and all is fine now (discounting known issues)
[Google Chromecast] hwong96:
If you have a copy of your original audio_policy.conf file, attach to reply and I'll see if I can modify it to work with your device's hardware.

---------- Post added at 05:38 PM ---------- Previous post was at 05:25 PM ----------

Dopa2.1 thread states clearly that audio doesn't work when mirroring, whether with Miracast or Google Cast Screen. They both need audio.r_submix.default.so baked in the rom at compile time. See red hilighted text in post #1. Audio_policy.conf also needs the r_submix section added. That is what option #2 mirrorenabler does.
[Google Chromecast] CounterC:
Thanks!

attached you will find the 2 audio_policy.conf files

PS: Just to be clear, the screen mirroring works. I can mirror onto my TV through chromecast. The only problem is the quality.

The animations are very slow and the quality is bad. I've seen demos from the Nexus 5 and others on Youtube and it looks very good, not at all like mine.

They can even play games fluently...
[Google Chromecast] hwong96:
While I look into it, there are a few things you can try to improve mirroring.

1. Check for wireless network interference. Setting up the Auto channel selection may also be helpful if your router offers this feature.

2. Place your router as close as you can to your home entertainment center.

3. Turn off Bluetooth on your device while you are screen casting.

4. Make sure there aren’t any other data intensive tasks taking place on your network.

5. Router Quality Matters.

6. Set up QOS (Quality of Service) on your router, and place your chromecast devices at the highest priority.

7. Set CPU speed to performance.
[Google Chromecast] tpuserhp:
The quality of screen casting could be hardware dependent. My nexus 7 2012 gives me intermittent pixelation and sound issue. But my touchpad does not have these issues. I tried to change nexus 7 to ART runtime and processor performance setting but to no avail. I hope Google could improve on this.
[Google Chromecast] bhiga:
In addition to what [MENTION=4282424]hwong96[/MENTION] said, if your device has a WiFi Display option in the Setting try toggling it. On some devices this can enable (or interfere with) optimizations for screen casting.
[Google Chromecast] hwong96:
The Galaxy S2 specs are CPU Dualcore 1.2 ARM A9, GPU Mali 400.

The HP Touchpad specs are CPU Dualcore 1.2 Scorpion, GPU Adreno 220.

They are comparable so there shouldn't be any major performance differences. For example, when I installed mirror enabler v4 and enabled the force closed fix which replaces the audio_policy.conf file with the r_submix section along with extraneous parameters my nook doesn't have, the video and audio were in slow motion. I added only the r_submix section only to my original audio_policy.conf file and video/audio is normal. So yes, having the wrong parameters in the audio_policy.conf file will affect video/audio output.
[Google Chromecast] CounterC:
That's good news!

It means my s2 should be able to mirror screen fluently?!

[MENTION=4282424]hwong96[/MENTION] it would be awesome if you can take a look into my file and guide me to the optimal parameters. I cannot wait..
[Google Chromecast] VVMM:
I don't know if this is really related to mirror enabler or not, but now my "ok google" hotword detection crashes everytime and it cannot be used anymore. Tried to disable/enable fixes. Samsung i9300, CM11, latest nightly. Can anyone help/confirm? Maybe related to CM?
[Google Chromecast] xbiggyl:
Thanks for the reply,

I've been looking into the ROM compiling literature. I'm new to this field. But I want to try it myself.

could you just point me to the right direction. Which tool would I need to use to get to the audioflinger.cpp file in ARHD.

(I'm not asking for a tutorial, just the name of the tools needed, I will look em up)

Thanks.