<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>Android/Lineage OS and Screen mirroring ("Cast")</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/669 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="669"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;p&gt;Android has native screen mirroring capabilities (when pulling down the status bar, there is a &amp;quot;cast&amp;quot; icon).&lt;/p&gt;
&lt;p&gt;It uses for two technologies:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Miracast (WiFi Display)&lt;/li&gt;
&lt;li&gt;Google Cast (Chromecast protocols CASTv1 and CASTv2)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Miracast"&gt;Miracast&lt;/a&gt; is an open standard, Google Cast is proprietary.&lt;/p&gt;
&lt;p&gt;Google Cast requires &amp;quot;gapps&amp;quot; on LineageOS. (proprietary google library)&lt;/p&gt;
&lt;div class="section" id="id1"&gt;
&lt;h1&gt;Miracast&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Android 4.4 (2013) introduced support for Miracast&lt;/li&gt;
&lt;li&gt;Android 6 (2015) already removed support for Miracast on some Nexus devices&lt;/li&gt;
&lt;li&gt;Android 9 (2018) (Android Pie) has no more source code for Miracast since Google removed support for it&lt;ul&gt;
&lt;li&gt;&lt;a class="reference external" href="https://www.reddit.com/r/LineageOS/comments/bqh9na/opo_on_pie_casten_does_not_work_anymore/eo4oyhd/"&gt;https://www.reddit.com/r/LineageOS/comments/bqh9na/opo_on_pie_casten_does_not_work_anymore/eo4oyhd/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://www.reddit.com/r/LineageOS/comments/dkswr3/cast_not_working_anymore_with_windows_10_connect/f4jkxym/"&gt;https://www.reddit.com/r/LineageOS/comments/dkswr3/cast_not_working_anymore_with_windows_10_connect/f4jkxym/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://www.reddit.com/r/LineageOS/comments/bdcl2v/unbale_to_cast_screen_to_tv_in_lineage_os_16_bacon/"&gt;https://www.reddit.com/r/LineageOS/comments/bdcl2v/unbale_to_cast_screen_to_tv_in_lineage_os_16_bacon/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Linux implementations&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;2014: &lt;a class="reference external" href="https://github.com/albfan/miraclecast"&gt;https://github.com/albfan/miraclecast&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;blog post: &lt;a class="reference external" href="https://dvdhrm.wordpress.com/2014/02/17/on-wifi-democratic-republics-and-miracles/"&gt;https://dvdhrm.wordpress.com/2014/02/17/on-wifi-democratic-republics-and-miracles/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;2019-12: &lt;a class="reference external" href="https://blogs.gnome.org/benzea/2019/01/30/gnome-screencast/"&gt;https://blogs.gnome.org/benzea/2019/01/30/gnome-screencast/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;List of applications: &lt;a class="reference external" href="https://wiki.thingsandstuff.org/Networked_media#Miracast"&gt;https://wiki.thingsandstuff.org/Networked_media#Miracast&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="google-cast"&gt;
&lt;h1&gt;Google Cast&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Disable Google Cast Receiver Signature Verification in Google Play Services with an XPosed module: &lt;a class="reference external" href="https://cryptographybuzz.com/reverse-engineering-google-cast/"&gt;https://cryptographybuzz.com/reverse-engineering-google-cast/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="section" id="protocol-v1"&gt;
&lt;h2&gt;Protocol v1&lt;/h2&gt;
&lt;p&gt;Uses DIAL (&lt;a class="reference external" href="http://www.dial-multiscreen.org"&gt;http://www.dial-multiscreen.org&lt;/a&gt;, &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Discovery_and_Launch"&gt;https://en.wikipedia.org/wiki/Discovery_and_Launch&lt;/a&gt;)&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;How Chromecast Works, Chromecast Protocol Explained (2013) &lt;a class="reference external" href="http://geeknizer.com/how-chromecast-works-chromecast-protocol-explained/"&gt;http://geeknizer.com/how-chromecast-works-chromecast-protocol-explained/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Chromecast Implementation Documentation WIP &lt;a class="reference external" href="https://github.com/jloutsenhizer/CR-Cast/wiki/Chromecast-Implementation-Documentation-WIP"&gt;https://github.com/jloutsenhizer/CR-Cast/wiki/Chromecast-Implementation-Documentation-WIP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;RAMP &lt;a class="reference external" href="https://github.com/entertailion/Fling"&gt;https://github.com/entertailion/Fling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CASTv1 receiver implementations&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;leapcast: &lt;a class="reference external" href="https://github.com/dz0ny/leapcast"&gt;https://github.com/dz0ny/leapcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;cheapcast: &lt;a class="reference external" href="https://github.com/mauimauer/cheapcast"&gt;https://github.com/mauimauer/cheapcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;plaincast: audio-only receiver, &lt;a class="reference external" href="https://github.com/aykevl/plaincast"&gt;https://github.com/aykevl/plaincast&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;plaincast for Dreambox satellite receiver: &lt;a class="reference external" href="https://dreambox.de/board/index.php?thread/22590-youtube-videos-auf-die-dreambox-casten-plaincast/&amp;amp;postID=175993"&gt;https://dreambox.de/board/index.php?thread/22590-youtube-videos-auf-die-dreambox-casten-plaincast/&amp;amp;postID=175993&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Senders:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;aircast (simulates airplay server, sends to chromecast)&lt;ul&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/ains/aircast"&gt;https://github.com/ains/aircast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;RemoteCast: control chromecast (audio volume, play/pause) (unavailable since 2015)&lt;ul&gt;
&lt;li&gt;&lt;a class="reference external" href="https://forum.xda-developers.com/showthread.php?t=2384624"&gt;https://forum.xda-developers.com/showthread.php?t=2384624&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;pulseaudio-dlna: Send Linux sound to Chromecast (sink). Unclear if v1 or v2&lt;ul&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/masmu/pulseaudio-dlna"&gt;https://github.com/masmu/pulseaudio-dlna&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="section" id="howto"&gt;
&lt;h3&gt;Howto&lt;/h3&gt;
&lt;p&gt;Control it with curl:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://fiquett.com/2013/07/chromecast-traffic-sniffing/"&gt;https://fiquett.com/2013/07/chromecast-traffic-sniffing/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://coderwall.com/p/jvuzdg/play-youtube-video-from-terminal-to-chromecast"&gt;https://coderwall.com/p/jvuzdg/play-youtube-video-from-terminal-to-chromecast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Find receivers:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ gssdp-discover --timeout=3 -t urn:dial-multiscreen-org:device:dialreceiver:1
&lt;/pre&gt;
&lt;p&gt;Run a youtube video:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
$ curl -X POST -d &amp;quot;v=zjR_AhxPnVM&amp;quot; http://dreambox:8008/apps/YouTube
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="protocol-analysis-for-v2"&gt;
&lt;h2&gt;Protocol analysis for v2&lt;/h2&gt;
&lt;p&gt;Custom protocol&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Google Cast Protocol: Overview &lt;a class="reference external" href="https://blog.oakbits.com/google-cast-protocol-overview.html"&gt;https://blog.oakbits.com/google-cast-protocol-overview.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google Cast Protocol: Discovery And Connection &lt;a class="reference external" href="https://blog.oakbits.com/google-cast-protocol-discovery-and-connection.html"&gt;https://blog.oakbits.com/google-cast-protocol-discovery-and-connection.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google Cast Protocol: Receiver Authentication &lt;a class="reference external" href="https://blog.oakbits.com/google-cast-protocol-receiver-authentication.html"&gt;https://blog.oakbits.com/google-cast-protocol-receiver-authentication.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Chromecast Wireless Protocols Part-I: Setup &lt;a class="reference external" href="http://jhshi.me/2016/10/24/chromecast-wireless-protocols-part-i-setup/index.html"&gt;http://jhshi.me/2016/10/24/chromecast-wireless-protocols-part-i-setup/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Chromecast Wireless Protocols Part-II: Cast &lt;a class="reference external" href="http://jhshi.me/2016/10/24/chromecast-wireless-protocols-part-ii-cast/index.html"&gt;http://jhshi.me/2016/10/24/chromecast-wireless-protocols-part-ii-cast/index.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CASTv2 Receiver implementations&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;javascript: &lt;a class="reference external" href="https://github.com/thibauts/node-castv2"&gt;https://github.com/thibauts/node-castv2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;java: &lt;a class="reference external" href="https://github.com/vitalidze/chromecast-java-api-v2"&gt;https://github.com/vitalidze/chromecast-java-api-v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;python: &lt;a class="reference external" href="https://github.com/huaiyuangu/chromecast-receiver-emulator"&gt;https://github.com/huaiyuangu/chromecast-receiver-emulator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CAST v2 senders&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;php: &lt;a class="reference external" href="https://github.com/ChrisRidings/CastV2inPHP"&gt;https://github.com/ChrisRidings/CastV2inPHP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;fx_cast: Firefox Extension to cast videos on websites to Chromecast &lt;a class="reference external" href="https://github.com/hensm/fx_cast"&gt;https://github.com/hensm/fx_cast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;List of applications: &lt;a class="reference external" href="https://wiki.thingsandstuff.org/Networked_media#Google_Cast_.2F_Chromecast"&gt;https://wiki.thingsandstuff.org/Networked_media#Google_Cast_.2F_Chromecast&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="open-screen-protocol"&gt;
&lt;h1&gt;Open Screen Protocol&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;2019-12 by some googler &lt;a class="reference external" href="https://w3c.github.io/openscreenprotocol/"&gt;https://w3c.github.io/openscreenprotocol/&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/w3c/openscreenprotocol"&gt;https://github.com/w3c/openscreenprotocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/bbc/device-discovery-pairing/blob/master/document.md"&gt;https://github.com/bbc/device-discovery-pairing/blob/master/document.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="upnp-multiscreen"&gt;
&lt;h1&gt;UPnP Multiscreen&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://openconnectivity.org/developer/specifications/upnp-resources/upnp/multiscreen2/"&gt;https://openconnectivity.org/developer/specifications/upnp-resources/upnp/multiscreen2/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="section" id="other"&gt;
&lt;h1&gt;Other&lt;/h1&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://elatov.github.io/2017/01/media-casting-and-streaming-options/"&gt;https://elatov.github.io/2017/01/media-casting-and-streaming-options/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/669/rev-raw/c9b90c965a0c1d69a0e8965cbff99006e9b87fe6/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/669#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;div class="image"&gt;&lt;img src="669/rev-raw/c9b90c965a0c1d69a0e8965cbff99006e9b87fe6/cast-icon.png" alt="cast-icon.png"/&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/669/rev-raw/c9b90c965a0c1d69a0e8965cbff99006e9b87fe6/cast-icon.png" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/669#cast-icon.png"&gt;cast-icon.png&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;div class="image"&gt;&lt;img src="669/rev-raw/c9b90c965a0c1d69a0e8965cbff99006e9b87fe6/no-cast-devices-found.png" alt="no-cast-devices-found.png"/&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/669/rev-raw/c9b90c965a0c1d69a0e8965cbff99006e9b87fe6/no-cast-devices-found.png" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/669#no-cast-devices-found.png"&gt;no-cast-devices-found.png&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
