See https://github.com/kensuke/How-to-Miracast-on-AOSP/wiki
Everything you want..
Modified Files List
βββ build
βΒ Β βββ target
βΒ Β βββ product
βΒ Β βββ generic_no_telephony.mk // pre-install app setting
βββ device
βΒ Β βββ asus
βΒ Β βΒ Β βββ grouper // Nexus 7 Wi-Fi
βΒ Β βΒ Β βΒ Β βββ audio_policy.conf
βΒ Β βΒ Β βΒ Β βββ device-common.mk
βΒ Β βΒ Β βΒ Β βββ overlay/framewsorks/base/core/res/res/values/config.xml
βΒ Β βΒ Β βββ tilapia // Nexus 7 3G
βΒ Β βΒ Β βββ overlay/framewsorks/base/core/res/res/values/config.xml
βΒ Β βββ samsung
βΒ Β βββ maguro // Galaxy Nexus
βΒ Β β βββ overlay/framewsorks/base/core/res/res/values/config.xml
βΒ Β βββ tuna // Samsung Common
βΒ Β βββ audio
βΒ Β βΒ Β βββ audio_policy.conf
βΒ Β βββ device.mk
βΒ Β βββ media_codecs.xml
βββ docs
βΒ Β βββ images
βΒ Β ββ // some images for wiki documentation
βββ frameworks
βΒ Β βββ av
βΒ Β βΒ Β βββ media
βΒ Β βΒ Β βββ libstagefright
βΒ Β βΒ Β βββ ACodec.cpp // Source
βΒ Β βΒ Β βββ wifi-display
βΒ Β βΒ Β βββ ANetworkSession.cpp // Debug Log
βΒ Β βΒ Β βββ sink
βΒ Β βΒ Β βΒ Β βββ TunnelRenderer.cpp
βΒ Β βΒ Β βΒ Β βββ WifiDisplaySink.cpp
βΒ Β βΒ Β βββ source
βΒ Β βΒ Β βββ WifiDisplaySource.cpp
βΒ Β βββ base
βΒ Β βΒ Β βββ services
βΒ Β βΒ Β βββ java
βΒ Β βΒ Β βββ com
βΒ Β βΒ Β βββ android
βΒ Β βΒ Β βββ server
βΒ Β βΒ Β βββ display
βΒ Β βΒ Β βββ WifiDisplayController.java // Sink
βΒ Β βββ native
βΒ Β βββ libs
βΒ Β βββ gui
βΒ Β βββ SurfaceTexture.cpp // Sink: Screen Rotation
βββ packages
βββ apps
ββ Mira4U // JNI Sink, other util app
ββ Settings/src/com/android/settings/wfd/WifiDisplaySettings.java // On/Off Switch
ββ WFD // wfd cmd test app