[Google Chromecast] r3pwn:
Hello, fellow XDA members!

Some of you may have heard of me before, and for the ones that haven't, let this be a warm introduction.

After hearing of the new Chromecast app with Beta support for mirroring, I decided to see if it's possible to enable for all devices. Apparently it is! :D

I assumed that some devices just wouldn't stream well, so I decided to mark this as [EXPERIMENTAL]. Please note that I did not make the feature, just the method to enable it.

Please alsenote that you need the latest version of the Chromecast companion app and root access on your device (not your chromecast) for this to work properly. The mirroring functionality requires KitKat 4.4.2 or higher.

Please note that under certain circumstances, some Samsung tabs may bootloop due to this modification. To be safe, do not enable the second option unless you ABSOLUTELY need to.

If this worked for you and you want to send some money my way (Keep in mind that I didn't make the mirroring, only the hack to enable it), feel free to visit my PayPal donation link in my signature. :)

For those STILL having issues,

Check /system/lib/hw directory for the file "audio.r_submix.default.so".

If it doesn't exist, ask your device maintainer to add audio.r_submix.default to

the product_packages in the device.mk file. (You may not know what it means, but they will.)

EXAMPLE (Thanks, [MENTION=3900214]runandhide05[/MENTION]!):

http://review.teameos.org/#/c/389/

(Thanks, [MENTION=4282424]hwong96[/MENTION].)

What exactly is required for this to work?

(This is the technical aspect of getting mirroring to work)

(Straight from Google)

* The WiFi radio must support WiFi P2P.

* The WiFi radio must support concurrent connections to the WiFi display and to an access point.

* The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix" remote submix module. This module is used to record and stream system audio output to the WiFi display encoder in the media server.

* The remote submix module "audio.r_submix.default" must be installed on the device.

* The device must be provisioned with HDCP keys (for protected content).

LINK: (v7)

https://www.androidfilehost.com/?fid=95784891001616583

Here are all of the previous releases: http://www.androidfilehost.com/?a=show&w=files&flid=16506

Changelog:

v7

- Lollipop support

- Bug fixes

- This modification now works on ALL devices KitKat and up. (Including x86, hopefully)

- Mirroring might work better on Lollipop. We only learn by testing, right?

v6

- Bug fix with sqlite3

v5

- Added PurpleHoloLight Theme!

- Added an audio remote submix file check.

v4

- Fixed critical bugs

v3

- Added fix that may work for some

- Added " QuickSettings Mirror Tile" option

v2

- Added preinstalled sqlite3 binaries

- Fixed critical bugs

v1

- Initial release

Please note that I tried to provide a safe, universal fix, but unfortunately, this may STILL not work on some devices. If it does not work for you, let me know and I will try to fix it (again). :)

Please note that this has the potential to mess up audio on your device, but it creates a backup that you can restore from by "Disabling" the fix.

For the paranoid:

Source can be found here: https://github.com/r3pwn/MirrorEnabler

Tested Working:

(Aside from the officially supported devices)

Amazon Kindle Fire HD 8.9"

Amazon Kindle Fire HD 7" (BeanStalk ROM only)

ASUS PadFone X

ASUS PadFone 2

Nook HD+ (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE)

Droid RAZR MAXX HD

Droid RAZR M

Sony Xperia Z

Sony Xperia Z Ultra

Sony Xperia Z1

Sony Xperia Z1 Tablet

Sony Xperia Z1 Compact

Sony Xperia Z2

Sony Xperia Z2 Tablet

Sony Xperia ZL

Huawei Honor 3C

HTC One M8 (Including GPE)

HTC Droid DNA (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE IN RED)

Motorola Moto X

Motorola Moto X (2014)

Motorola Moto G

Motorola Moto G (2014)

Samsung Galaxy S II (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE)

Samsung Galaxy S III (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE)

Samsung Galaxy S IV Mini

Samsung Galaxy Note II (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE IN RED)

Samsung Note 8 Tab

Samsung Note 10.1 Tab

Samsung Note Pro 12.2 Tab

Samsung Galaxy Tab 2 (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE)

Samsung Galaxy Tab Pro 8.4

Samsung Galaxy Tab S 10.5

Samsung Galaxy Tab 4

Nexus 7 2012

Galaxy Nexus (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE IN RED)

Oppo Find 7

Oppo Find 7a

OnePlus One

LG GPad 8.3 (ONLY ON V6)

LG G2 Mini (ONLY ON V6)

LG Optimus G (ONLY ON V6)

LG G Flex (ONLY ON V6)

Xiaomi Mi2

Sero 7 Pro (as of v4) (ROM MUST HAVE APPLIED FIX, CHECK ABOVE)

And possibly your smartphone/tablet! Test it out and let me know!

Tested Not Working:

HTC EVO 3D

Droid 4

Samsung Galaxy S I

Most older devices

Devices with a Tegra SoC (not sure why)

TO THOSE WITH PLAY SERVICES FORCE CLOSE:

A fix is out (v4). Thank these guys:

[MENTION=528820]alex3305[/MENTION]

[MENTION=3911109]pabx[/MENTION]

[MENTION=1489155]mattgyver83[/MENTION]

ROMs that allow Screen Mirroring

Samsung Galaxy Tab 2:

http://bit.ly/1upFx9B

Samsung Galaxy S2 i9100:

http://bit.ly/1nHuByH

http://xdaforums.com/galaxy-s2/development-derivatives/rom-i9100-aosp-neatrom-v5-8-t2603169

Samsung Galaxy S III i9300:

http://xdaforums.com/showthread.php?p=54395318

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

Verizon Galaxy Nexus:

http://xdaforums.com/showthread.php?t=2822892

To enable Chromecast Mirroring on a TouchWiz ROM, follow the guide below:

(For SAMSUNG Devices ONLY!)

For those with audio issues after applying the Force-Close Fix:

DISABLE THE SECOND OPTION IN MIRRORENABLER FIRST!