According to Wikipedia:

Miracast support was built into Android with version 4.2 ...

... Support was dropped again with Android 6.0 Marshmallow in 2015, in favor of Google's own Google Cast protocol.

Any answers associated with these older versions of Android do not apply.

Modern Android devices include a "cast" function, but it's Google proprietary and so cheap HDMI TV dongles might not support it, especially since it's probably a moving target, and Google wants you to buy their device.

There are apps that simply help you turn the casting function on and off, but all those do is save you from digging into the settings yourself (they don't add any casting functionality).

Is there a way to add Miracast function to a modern Android device?

  • At a technical level, support for Miracast requires three things: wireless chipset support, operating system support, and driver support. That is about all I know on the subject. – Bo Lawson Dec 5 at 19:28

If Zillinium's suggestion to make changes into the "system / build.prop" does not make it fully function, you might need to also change the "/system/etc/wfdconfig.xml" file also. The following steps require both require root access and custom recovery TWRP.

Pre N (Nougat) the long way. You could use the nano command to add and/or change values, but for simplicity and to stay in-bounds, just use a file explorer and text editor.

  1. Go into the file /system/etc/wfdconfig.xml
  2. Change the code:

    ...
    <ContentProtection>
        <Valid>1</Valid>
     ...
    

    Change 1 to 0 to make it look like this code:

    ...
    <ContentProtection>
        <Valid>0</Valid>
    ...
    
  3. Go into the file /system/build.prop. Go down to this line of code and AFTER it:

    persist.debug.wfd.enable=1
    

    Add a new line of code by creating this line:

    persist.debug.wfd.appmonitoring=1
    
  4. Save and exit.

  5. Restart phone.

  6. connect phone to computer.

  7. Open an elevated command prompt and throw these commands:

    adb shell
    su
    setprop persist.debug.wfd.appmonitoring 1
    
  8. Verify the setprop getprop persist.debug.wfd.appmonitoring

    If 1 is returned, then you should be good to go.

    Side note: if this should put you into a bootloop, go into custom recovery TWRP.

  9. Open a command prompt and throw these commands:

    adb shell
    chmod 644 /system/build.prop
    

    That should fix bootloop.

For Android N (Nougat) the short way:

From the custom recovery TWRP:

  1. Open a elevated command prompt:

    adb reboot bootloader
    
  2. Next, mount the /vendor partition from within TWRP`

  3. Then throw the command:

    adb shell 'echo persist.debug.wfd.enable=1 >>/vendor/build.prop'
    
  4. Reboot system from TWRP menu

You should be good to go.

i can't possibly walk you through all the system modifications that are required but it's definitely possible with root access...

Reasons for Google's changes....

MiraCast has never been fully supported by Android, it usually had serious problems trying to convert the screen into a standard 1080 or 720 resolution video, this usually caused just a phone shape video on the screen and not utilizing the entire screen... I believe that designing their own cast software was necessary to combat the problems Android was experiencing.

To Enable a Disabled MiraCast you'd need


You'll need root enabled.

All you have to do is change one line on your build.prop. ( system / build.prop )

You have to change the line

 persist.debug.wfd.enable=0

To

persist.debug.wfd.enable=1

If you're on stock or stock based ROM, you will edit the line.

If you're Lineage based rom, you will have to add the line.

Now you reboot and Miracast can be enabled.

Reference

To Add MiraCast is difficult if it wasn't disabled by the manufacturer, usually to enable ChromeCast you'd disable the older MiraCast, so if you're device has ChromeCast you should be able to enable it with the information above...

However if it was never part of your system to begin with, you'd need to manually build it into your system... Outside the scope of this site.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.