yashsingh1/xdaforums huggingface dataset:
[Google Chromecast] hwong96:
When you are done with screen casting, disable the force close fix which restores your original audio_policy.conf file. Your audio should return to normal.

---------- Post added at 04:14 PM ---------- Previous post was at 03:52 PM ----------

I don't think you can fix permissions in cm-11. Do you have the r_submix section in your audio_policy.conf file? The zip file your rom maintainer provided you just inserted the audio.r_submix.default.so file into /system/lib/hw, but that didn't work because the audio.r_submix.default package wasn't compiled into the rom. Without the rom mainainer compiling the missing package via the device.mk file, cast screen just will not work. As for the AppOps error in your logcat, I don't know what that is since you said you haven't used AppOps to change any permissions. I'm out of ideas.

---------- Post added at 04:24 PM ---------- Previous post was at 04:14 PM ----------

Open terminal

type in su and press enter key

type in logcat > /sdcard/logcat_pedro5148_motox.txt

Attach .txt file in your reply. Do NOT paste the contents of the output txt file.

---------- Post added at 04:27 PM ---------- Previous post was at 04:24 PM ----------

When you disable the force close fix does your audio return to it previous state?

---------- Post added at 04:30 PM ---------- Previous post was at 04:27 PM ----------

Read the highlighted in red item in the op. Missing audio.r_submix.default.so file.
[Google Chromecast] Bl@kness:
Thanks for your suggestion that worked.
[Google Chromecast] pedro5148:
I solved the problem by installing the version v4, audio, video and subtitles synchronized perfectly.
[Google Chromecast] hwong96:
I did some research on AppOps and this (W)arning from the logcat was generated by AppOps installed on your device. Are you positive you didn't install it via the Xposed installer? The module is AppOpsXposed. I installed it on my tablet to show you what the permissions in Chromecast are. I have my location turned of in settings-location. That is why my chromecast shows location-denied. Everything else is Chromecast default values. Look in settings-app ops and click on chromecast. I have attached pics for clarity. What are the values for your chromecast?
[Google Chromecast] nelsonw:
[MENTION=4732871]r3pwn[/MENTION] You can add this to the OP since includes the fix for this:

for i9300

http://xdaforums.com/galaxy-s3/development/rom-archidroid-v2-4-6-power-hands-t2354859

thanks!
[Google Chromecast] tharmor:
No i am not using AppOps...also the submix sections is there....

This is what is there in the audio_policy.conf.

I later checked on AppOps and all values were allowed for me...
[Google Chromecast] rodrigofbranco:
I flashed this lib but still not working. I'll try to collect some libs from others Customs CM11 based. I'll post the results soon. Thank you!
[Google Chromecast] hwong96:
Flashing the audio.r_sub mix.default.so zip will not work as you found out. It has to be added in product packages in the device.mk file and compiled. See red highlighted text in the op

---------- Post added at 12:15 AM ---------- Previous post was at 12:08 AM ----------

The audio_policy.conf r_sub mix sampling rate should just be 48000.

What is the SELinux policy set at on your device? Go to settings-about tablet-selinux policy.

You say your device is not using AppOps so I don't know why the logcat gave the (W)warning message from AppOps. Strange.

I don't know what else to tell you on how to fix your issue.
[Google Chromecast] tharmor:
Mine is a phone and it says Selinux status --> Enforcing ! Thanks for your help.

Can i edit the sampling rate using root explorer or it is something the developer has to take care of ??

EDIT - Edited the file and now i am getting some error. Please find attached the logcat.

07-31 06:28:34.267 E/legacy_audio_hw_hal(144): int android_audio_legacy::adev_open_input_stream(audio_hw_device*, audio_io_handle_t, audio_devices_t, audio_config*, audio_stream_in**): devices before=0x80000004

07-31 06:28:34.267 E/legacy_audio_hw_hal(144): int android_audio_legacy::adev_open_input_stream(audio_hw_device*, audio_io_handle_t, audio_devices_t, audio_config*, audio_stream_in**): devices after=0x40000

---------- Post added at 06:26 AM ---------- Previous post was at 06:22 AM ----------

Ya same here i have told pawtip to include it in next build...rather than a zip.
[Google Chromecast] hwong96:
You can edit it using root explorer. One last thought-SELinux Enforcing status might be preventing cast screen from working. Another user has a similar error with application policy not allowing cast screen to work.

Those are the same errors you had before. Changes to audio_policy will not take effect until you reboot device. Then take logcat and compare output.
[Google Chromecast] tharmor:
Anyway to change the enforcing status ? I edited that file and rebooted but no change...same behaviour.
[Google Chromecast] hwong96:
I'm sure there is a way to change the enforcing status to permissive or disabled, but I need to research further. My cm11 build on my tablet has SELinux disabled.
[Google Chromecast] tharmor:
Made it to permissive....no change.
[Google Chromecast] fritzum:
Sorry for the late reply. Here is the file.

Thank you for looking into it, hwong96! :)
[Google Chromecast] Range_SPA:
Works!

You're a genius!

Works on my S4 Cynamogen 11 M8 :)
[Google Chromecast] hwong96:
I also need you to attach a logcat .txt file.

Open terminal as super user

Type logcat > /sdcard/logcat.txt

Do not paste output to reply. It will be too much verbage.

Have you tried MirrorEnabler v4 with the force close fix enabled?
[Google Chromecast] fritzum:
I tried v5, with and without the force close fix enabled.

Should I try v4 instead?

Attached the logcat, does that help you?
[Google Chromecast] hwong96:
Yes try v4.
[Google Chromecast] fritzum:
Same thing with v4.
[Google Chromecast] thebrenda:
OK, excuse my simplistic question - Is there a certain Chromecast version/model that I should get or can i go to Tigerdirect and get any. Also, what is the "Chromecast App" and the "Chromecast companion app" referenced in the original post? Where do I get them?
[Google Chromecast] hwong96:
Install the chrome cast app from the play store. You can buy the chrome cast device at any electronics store, Amazon, eBay, etc. There is only one chrome cast model.

---------- Post added at 10:16 AM ---------- Previous post was at 10:00 AM ----------

According to Google, the Galaxy s4 is compatible with cast screening. Did you try cast screen without mirror enable? Anyway, I found the errors in the logcat. You're getting (W)warning AppOps bad call and (W)warning Adreno EGL out of memory and (E)error surface flinger. What is the security policy on your device? Look in settings-about-selinux policy. You have same issue as user tharmor and

the bear j koss
[Google Chromecast] thebrenda:
OK, another simplistic question. Doe "root access on your device" mean that it must be rooted? I have a nexus 7, 2012, 4.4.4 that is not rooted. Is there a way to root (if needed) and save your settings, apps, - root - then do a restore of your settings apps?
[Google Chromecast] Ja_som:
Yes.

Yes.

Use Wug's Nexus Root Toolkit, make backup, root, restore backup... It's easy ;)
[Google Chromecast] hwong96:
Yes root access means your device must be rooted. Here is the thread on your device http://xdaforums.com/showpost.php?p=38201742&postcount=3 on how to root. If you have rooting questions, post them in that thread.

Always do a system backup before rooting. Make sure Google play services is v 5.0.84, chrome cast firmware is 17250 or higher, and chrome cast app is v1.7.4.
[Google Chromecast] tharmor:
I checked wid dev and he gave me few commands for permission...i will try those...
[Google Chromecast] fritzum:
It's a Samsung Galaxy S4 mini which is not part of the officially supported devices.

The settings say:

SE for Android status

Enforcing

SEPF_GT-I9195_4.4.2_0016

Fri May 23 19:52:40 2014

So the problem is the Selinux policy. I'll look into that in the corresponding threads.
[Google Chromecast] tharmor:
Ok so i have the new logcat after some changes done by developer.....is the issue still the AppOps calls ? Some error extracts....

[video_encoder__openmax_main]: thread exiting

07-31 18:42:58.111 E/AVSource(875): video converter failed to initialize w/ err 0xffffffea

07-31 18:42:58.111 E/GCastSource(875): Failed to initialize AVSource (err -22)

07-31 18:26:09.874 E/OMXNodeInstance(144): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x80001005

07-31 18:26:09.874 E/ACodec (860): [OMX.BRCM.vc4.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -2147483648
[Google Chromecast] tharmor:
One more logcat...i was getting blank screen and Casting screen status on chromecast app....
[Google Chromecast] tomlang:
Nook hd+

I'm trying to get this to work on a Nook hd+ room unwind cm11. I an using a build by extreme0 that includes the fix. The following is from a couple of posts on the Nook hd+ cm11 forum. By the way, it is difficult to run an older Google play services, it keeps updating to the latest.

Originally Posted by extrem0

You need to have updated Google play services. Make sure it's on 5.0.82 build. Also, try rebooting both your chromecast and your nook after enabling cast and no force close options.

I'm still having no luck casting the screen. Casting from a chromecast aware application works well. I downgraded Google play services to 5.0.82, and rebooted both the nook hd+ and chromecast after running the mirror enabler with all three switches set. A few seconds after I try to cast screen to my chromecast, Google play services quits and it disconnects.

Any ideas?
[Google Chromecast] hwong96:
Looks like the issue is the video driver.

07-31 18:42:43.897 D/brcm-ve (144): [video_encoder__SetParameter]: 7f0d201d - not implemented!

07-31 18:42:43.897 E/OMXNodeInstance(144): OMX_EnableAndroidNativeBuffers failed with error -2147479546 (0x80001006)

07-31 18:42:43.907 E/ACodec (875): [OMX.BRCM.vc4.encoder.avc] onCreateInputSurface returning error -38

07-31 18:42:43.907 W/MediaCodec(875): createInputSurface failed, err=-38

See if the ROM dev can get an updated video driver from the device manufacturer.

---------- Post added at 01:59 PM ---------- Previous post was at 01:51 PM ----------

It should be the 5.0.84 build. Try unplugging chromecast and replugging in HDMI after you start to cast screen.

Edit: Google Play Services is now v5.0.89.
[Google Chromecast] tomlang:
Will it work with 5.0.89?

If I downgrade to an earlier build, it auto updates to the latest in no time.
[Google Chromecast] hwong96:
Make sure you have audio.r_submix.default.so in /system/lib/hw.

Make sure you have the r_submix section in audio_policy.conf located in /system/etc.

Chromecast firmware 17250 or higher.

Chromecast app v1.7.4

Google Play Services 5.084 or higher.

Give it a try. Report results.

Try this and see if it works.

Go into settings-display-cast screen-turn on. Cast screen from chrome cast menu.
[Google Chromecast] tomlang:
All looks as you say. Files are correct, fw is 17977, app is 1.7.4, services 5.089

And I cast screen from the menu. Serviced always FC.
[Google Chromecast] PolishPoet:
Works on my Asus TF700 running CROMBI-KK
[Google Chromecast] :
Just a heads up, I'm running Dn5v2 on the note 2 with my buildprop set to s5 and screen mirroring works straight out the box without the need for the app. It might work on other devices/roms just by changing the buildprop

Only issue I had was after i installed this app I couldn't get screen mirroring back without it, but after i did a restore I had mirroring straight out of the box again
[Google Chromecast] hwong96:
Attach logcat in a txt file. Do not paste the output.
[Google Chromecast] hrishikeshgramani:
Thank you works on my Xiaomi mi3w Indian version

Sent from my MI 3W
[Google Chromecast] fritzum:
ALRIGHT, I got it to work on the Samsung Galaxy S4 mini by setting Selinux to permissive. Works like a charm!

What I did was open a terminal and type:

su

pm disable com.sec.knox.seandroid

setenforce 0

Still need to check whether this stays after rebooting the phone.

Thank you so much for pointing me to the problem, hwong96! :cyclops:
[Google Chromecast] tharmor:
So you are no longer getting AppOps warnings in the logcat ??
[Google Chromecast] fritzum:
Hm, I don't know... I will attach my logcat so you can have a look at it. There is too much text inside for me to understand...

EDIT:

rebooted the phone, disabled selinux again, but now screencasting doesn't work anymore... same problem as before. damn.
[Google Chromecast] hwong96:
Reboot chrome cast.
[Google Chromecast] fritzum:
Did that. Here's my new logcat with selinux = permissive
[Google Chromecast] hwong96:
Logcat is not complete. I don't see anything useful like last logcat.
[Google Chromecast] fritzum:
Yeah, somehow the logcat is a lot smaller now... :/

Another try...
[Google Chromecast] tharmor:
One more try required......this one has nothing :D
[Google Chromecast] fritzum:
Hehe... just to make sure I'm proceeding in the right order:

1. I type logcat > /sdcard/logcat.txt

2. I try to cast the screen

3. I close the terminal

All I get is this...
[Google Chromecast] tharmor:
Use catlog app from playstore !
[Google Chromecast] runandhide05:
If u r doing this in terminal emulator on phone then su is required

So do

1 type su

2 I type logcat > /sdcard/logcat.txt

3. I try to cast the screen

4. I close the terminal

sent from space
[Google Chromecast] fritzum:
Thanks, the su was missing... here is the logcat.
[Google Chromecast] hwong96:
You still have AppOps error for chromecast. Go to settings-apps-download, click on chromecast, clear data, clear cache. Is SELinux still in permissive mode? Try cast screen again.
[Google Chromecast] fritzum:
Linux is still in permissive mode. Clearing cache and data fixed it! :)

Now I need to find a way to set selinux to permissive on each boot and to delete cache and data of the chromecast app each time after mirroring...
[Google Chromecast] hwong96:
Try [MENTION=3708664]fritzum[/MENTION]'s method here

http://xdaforums.com/showpost.php?p=54542590&postcount=1343 and

http://xdaforums.com/showpost.php?p=54548191&postcount=1356
[Google Chromecast] fritzum:
Edit: NOT!

Damn, it just worked once and that's it. Now it stopped working and behaves like before, even after clearing the chromecast app data.
[Google Chromecast] hwong96:
It appears something in SELinux is preventing chromecast from working. When set to permissive, it will give error message (AppOps Bad call) but should allow program to continue. Don.'t know what else to suggest.
[Google Chromecast] maforget:
I don't think that the AppOps message is the issue. I have the error message but can still cast with FC fix enabled. I also tried switching SELinux but it won't change (setenforce just gives a bad argument with whatever argument you give it)

Here is the rundown of what I tried.

Device is Galaxy S3 SGH-I747M Running CM11 d2lte Nightly 07/31

Play Service is 5.0.89

Chromecast App : 1.7.4

Chromecast Firmware : 17977

MirrorEnabler v5

The library exist and in audio_policy.conf the submix portion already exists. So normally I shouldn't have to enable the FC Fix, because it seems it only copies a new audio_policy.conf file?

But just enabling the cast options makes Play Services crash when casting.

With the Force Close fix it works but can't play any mp3 (tried with Play music and BubbleUpnP, both are not working. Everything else seems to work ok).

I also edited manually edited the CM11 audio_policy.conf to just have 48000Hz in the submix portion.

I compared the existing audio_policy.conf with the one that is copied by the enabler when Force-Close Fix option is enabled. And it seems that there are a lot of sections missing with the new one compared to the CM11 (tunnel,ipa) which might explained why there is no sound with some apps. Also since it is not working out of the box with CM11 there are other sections in the new conf that also don't exists in CM11 (a2dp, usb, deep_buffer) which might explain why it is not working out of the box without the FC fix.

So I am thinking that there is something else that needs to be added to the conf file to the normal CM11 conf file to have it working out of the box and maybe since the new conf file that is copied by the apps doesn't match the ROM CM11 file it is either trying to send the output to an non existent output or something important is missing in the new conf file.

Attached are the conf files and the logcat. I also attached the logcat where I try to Play some file with Play Music.
[Google Chromecast] tharmor:
Ok so now i have kikat on my galaxt tab 3 7.0 and i get google play services force closes....applied second option still same issue....
[Google Chromecast] josito801:
Its running on MI3W? Thanks.
[Google Chromecast] cnotes2019:
Is it working on verizon m8? Thanks [emoji2] & cheers [emoji482]
[Google Chromecast] runandhide05:
Yes but grab v1

sent from space
[Google Chromecast] tomlang:
Here it is, tried twice.

Thanks
[Google Chromecast] omar300:
Dude i love u! :highfive: ;)

thanks for counting in sony phones! my Z1 is working great! no issues in 10 mins test so far. works good as factory default nexus 4 i have.
[Google Chromecast] Smobbo:
Thanks for making this great app!

Just wanted to let you guys know that it works on a iFive mini 3GS (Chinese tablet).

It works with version 4, on version 5 it gives 'you're missing audio submix' error.
[Google Chromecast] cachimori:
Please I need help. My device is a LG Optimus G, I rooted the phone, I installed chromecast (last version), I installed mirror enabler v5 (mirror status enabled, force-close fix enabled and quicksettings mirror enabled). I open chromecast and I can't see the cast screen option. What do I have to do? Thanks
[Google Chromecast] :
Daft question have you rebooted?
[Google Chromecast] cachimori:
Yes
[Google Chromecast] hwong96:
Read this post http://xdaforums.com/showpost.php?p=54371469&postcount=1115

---------- Post added at 08:16 AM ---------- Previous post was at 08:09 AM ----------

I see AppOps error Bad Call. What is the SELinux policy on the HD+?

---------- Post added at 08:47 AM ---------- Previous post was at 08:16 AM ----------

read red highlighted item in op and attach logcat txt file.
[Google Chromecast] timmyd463229:
Can we add the file for the note 2 ourselves or does only the ROM maker have that option
[Google Chromecast] hwong96:
There is is no "one size fits all" audio_policy.conf file for every device. Each device's audio_policy.conf is customized to the audio io hardware. You can edit the file to combine the two and see if all outputs work for you. If it works, make a backup of the file. It will be replaced when you flash an upgrade ROM.
[Google Chromecast] timmyd463229:
Can the developer add audio.r_submix.default to

the product_packages in the device.mk file. So we can use the screen cast option to chtomecast ? Please

Thanks
[Google Chromecast] hwong96:
Read the highlighted text in red of post #1.

---------- Post added at 09:39 AM ---------- Previous post was at 09:38 AM ----------

You need to post your question/request in the correct device forum.
[Google Chromecast] timmyd463229:
Oops that's where I meant to put it
[Google Chromecast] bjarnehe:
Mirroring is now working for Samsung Galaxy S3 i9305 with the latest nightly build of CyanogenMod! It is slow, but works :)
[Google Chromecast] hwong96:
Go to settings-display-cast screen on S3 and enable to see if turning on has any effect on screen output.
[Google Chromecast] tomlang:
Where do I find the SElinux policy on the Nook hd+?

As a side note, I just installed SElinux mode changer, and it reports selinux is either not installed or disabled???
[Google Chromecast] hwong96:
Go to settings-about tablet look on last line.
[Google Chromecast] XxPixX:
Not working on Samsung Galaxy Note GT-N7000 running CarbonROM 4.4.4. I wasn't expecting it to though, screen recording is broken for this device (but CarbonROM has a workaround).
[Google Chromecast] shaker2k:
I can confirm this. Working on latest cm 11 snapshot.
[Google Chromecast] r3pwn:
If this has helped you and you use Bitcoins, feel free to donate to me. Address is in my signature.
[Google Chromecast] krizz07:
Working fine on galaxy s4 running cm11 (casting does not appear prior to the installation of this app).

Tested on 2 locations in the house and one location is laggy. Your experience is huge ymmv based on device and network.

Tried gta san andreas and it works well but angry birds racing disconnects the connection to chromecast.
[Google Chromecast] patstar5:
Where do I goto cast? I enabled it and can't find it in notification panel or settings. Htc one m8 running skydragon GPE rom
[Google Chromecast] lakedubvt:
Moto X stock running Xposed. When I open the app it does not ask for root access but gives me a prompt saying I do not have sqlite 3 binary then it takes me to the playstore to download an app to install the binary. I have not read about this mentioned so wasn't sure what it was.
[Google Chromecast] EmeraldTimer:
Working on Xperia Z

Open chromecast app and go to "Cast Screen" that will appear
[Google Chromecast] r3pwn:
Yes, that is common. Some devices don't have that, but it is needed for this to work.

It's in the newest version of the Chromecast app.
[Google Chromecast] YapFas:
works on LG g2 Mini but have to install sqLite
[Google Chromecast] jrk190:
Doesn't work on Razr M, Running CM11... Causes a reboot.
[Google Chromecast] Demonhotrod:
I have a Samsung Galaxy S3, running stock OmniROM and Google Play Services crash when I try to connect. The #MirrorEnabler app works though, I never even had the option to cast before
[Google Chromecast] Humzah24:
Works beautifully on the HTC Droid DNA running GPE ROM. Not noticing any lag. Nice job.
[Google Chromecast] ruffnutts:
Thanks for this works for me on my Moto G 4G there is a delay though also I'm in the UK so the Chrome app is not 1.7 but I managed to get it off the net :)

Now to try my Nvidia Shield:good::laugh:
[Google Chromecast] IncaTrails:
Not working on Samsung Galaxy Tab 10.1

Cyanogenmod 10.1.3-p5100

Android Version 4.2.2

Chromecast 1.7.4

Every time I start MirrorEnabler it comes up disabled. I can enable it but no joy.
[Google Chromecast] dibblebill:
Padfone X here. Says "Connecting" for 2 to 3 seconds, then "Disconnecting" as quickly. Suspecting my Chromecast isn't updating... Build 16664
[Google Chromecast] quangnv:
Great! It works on my nexus 7 wifi 2012 and xperia z
[Google Chromecast] Jejebond:
Galaxy S3 with CM11 M8 (Beoffla Kernel 2.3) Crash of Google Play Services.

Google Play Services v5.0.84 (1259630-036)

Google Chromecast App v1.7.4

Google Chromecast Dongle 17250 FR

A S3 user should create a post for fixing this, too many different devices users here.
[Google Chromecast] r3pwn:
That's actually a bug in the app. No harm is caused, but I didn't update it because I figured nobody re-opens the app anyways. You need to be on KitKat for this to work.
[Google Chromecast] dibblebill:
Question. Is there a way to force the Chromecast itself to update?
[Google Chromecast] r3pwn:
Too bad there isn't a well-known method of force-updating. :/

Try a factory reset. When you connect it to the internet "for the first time", it should check for updates automatically then.
[Google Chromecast] 7ewis:
I've downloaded this on my OnePlus One, it works well! (Although it did randomly disconnect once)

I was just wondering, if I wanted to delete this app and revert all the settings back, would just uninstalling the apk do this?
[Google Chromecast] tomlang:
It says... Disabled

How do I change it?