[G3 Original Android Development] aha360:
Potential solution to getting Miracast to work on a Smart TV

Good news guys, and girls! I think I have got Miracast to work on a smart TV, after having read up on Miracast and CyanogenMod, with the first hint of getting it to work on the LG G3 being found on this post by mbayatli, with the help of Rashed97 et al:

Requirements:

- WiFi enabled, with BOTH the television and the phone connected to the same WiFi network/hotspot

- A file manager that can manage files at root level (ES File Explorer recommended)

- A text editor that can edit files at root level (see ES File Explorer - use ES Note Editor)

- A smartphone with ROOT privileges - nobody gives a damn as to HOW you root it, as long as the phone is rooted, you should be fine.

- A phone user who is tech-savvy enough to know what the heck he or she is doing.

- LAST BUT NOT LEAST, BACKUP YOUR PHONE AS IF THIS MESSES UP YOUR PHONE, YOU CAN EASILY RESTORE FROM A BACKUP!

Part I: Text Editing

1. Open up ES File Explorer, in which you will then need to go to the /data/misc/wifi directory, as shown below:

2. Once that is done, you will then see a bunch of .conf, .txt and .ini files, as shown below:

3. Edit BOTH the p2p_supplicant.conf and the wpa_supplicant.conf files, and look for the following lines:

(sorry for no screen-capturing the p2p_supplicant file as I was messing around with this whilst being pessimistic of Miracast working)

p2p_disabled=1
p2p_no_group_iface=1

...and delete the p2p_no_group_iface=1 line and edit the p2p_disabled=0 line for BOTH OF THE FILES, so that it would look like this:

p2p_disabled=0

Also, REMEMBER TO SAVE THE CHANGES on the files themselves once you have edited them.

4. After the text-editing part of the tutorial is done, REBOOT your phone.

Part II: Miracast Setup

5. Once you have started up your phone, enable WiFi on said phone, and make sure your smart TV is connected to the same WiFi network as the one your phone is connected to as this is important for it to work.

6. Swipe down the top bar (the Notification Bar), and tap on the Cast Screen icon

7. Tap on "More Settings".

8. After tapping on "More Settings", you will see the Cast Screen icon - once you are on the "Cast Screen" screen, tap on the vertical ellipsis icon (Menu icon)

9. After tapping on the Menu icon, make sure that the Wireless Display feature is ENABLED, and if it is not, then ENABLE IT by tapping on it.

6. Go to the Home Screen and then to the App Drawer, and tap on Settings.

7. Once you are on Settings, go to WiFi, then tap on the Menu icon (vertical ellipsis icon).

8. After that, tap on Advanced, then tap on WiFi Direct..

9. Once that is done, tap on SEARCH FOR DEVICES, in which your Smart TV should appear.

10. After that, tap on the smart TV that appears, and wait to see if the smart TV can connect to the phone (you may need to do a "remember me" setup on both the phone and the TV).

.

11. If you have successfully done this, then you should have the phone screen mirrored to the television set - see the PROOF IMAGES below:

PROOF IMAGES

TESTED SMART TELEVISIONS AND DEVICES:

- Samsung UE40H6400

Special thanks go to: hemo87, nash16, mbayatli, Rashed97 et al

Let me know if you have any issues!