{"id":2084,"date":"2026-08-12T02:04:12","date_gmt":"2026-08-12T06:04:12","guid":{"rendered":"https:\/\/tim.cexx.org\/?p=2084"},"modified":"2026-08-12T19:27:22","modified_gmt":"2026-08-12T23:27:22","slug":"solved-ish-screen-mirroring-casting-requires-location-permissions","status":"publish","type":"post","link":"https:\/\/tim.cexx.org\/?p=2084","title":{"rendered":"Solved-Ish: Screen Mirroring\/Casting Requires Location Permissions"},"content":{"rendered":"\n<p><em>TL;DR: Strange technical quirk rather than datamining techbro shenanigans (okay, only a little techbro shenanigans). This is &#8220;Miracast&#8221; under the hood, which (sometimes) requires scanning for and connecting to a dummy WiFi Access Point to make a direct connection, and baddies<sup data-fn=\"83685d70-1c39-407a-b6d7-8a29ee01530d\" class=\"fn\"><a href=\"#83685d70-1c39-407a-b6d7-8a29ee01530d\" id=\"83685d70-1c39-407a-b6d7-8a29ee01530d-link\">1<\/a><\/sup> can use access to your nearby APs for location tracking, so this scan is gated behind location permissions.<\/em><\/p>\n\n\n\n<p>Funny story, I just got back from a fishing trip with the kids and we wanted to show Mrs. (who couldn&#8217;t go due to work) pictures of it from my phone on the big TV. &#8220;But Tiiiim!&#8221;, she cried, &#8220;everytime you try to do something like this it doesn&#8217;t work and takes an hour of rebooting and fiddling with things.&#8221;<\/p>\n\n\n\n<p>I protested: &#8220;It&#8217;s 2026! It&#8217;s <em>screen sharing<\/em>! It&#8217;s between un-hacked commercial devices that natively support this as a bullet-point sales feature!&#8221; Yeah, so trying to cast to the TV didn&#8217;t work, and I ended up running downstairs to my desktop to plug in a cable <em>like a savage<\/em> to transfer the photos to my janky <a href=\"https:\/\/tim.cexx.org\/?p=1679\">Raspberry Pi media center setup<\/a> over Samba and stream them over <a href=\"https:\/\/jellyfin.org\/\">Jellyfin<\/a>. Then (after Mrs. went to bed), spent an hour debugging why screen mirroring (&#8220;casting&#8221;&#8230;) to the Roku TV no longer works<sup data-fn=\"b5fb3efb-b568-4720-96b2-cd66e696fbf6\" class=\"fn\"><a href=\"#b5fb3efb-b568-4720-96b2-cd66e696fbf6\" id=\"b5fb3efb-b568-4720-96b2-cd66e696fbf6-link\">2<\/a><\/sup>.<\/p>\n\n\n\n<p>While digging into that, a discovery&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"703\" height=\"1024\" src=\"https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst-703x1024.jpg\" alt=\"Enable Wireless Display: Please turn on location first\" class=\"wp-image-2086\" style=\"aspect-ratio:0.6865333487458097;width:403px;height:auto\" srcset=\"https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst-703x1024.jpg 703w, https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst-206x300.jpg 206w, https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst-768x1119.jpg 768w, https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst-1054x1536.jpg 1054w, https:\/\/tim.cexx.org\/wp-content\/uploads\/locationfirst.jpg 1080w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><figcaption class=\"wp-element-caption\"><em>Nope. Nope nope nope.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Yes, that is a real (squished for space) screenshot; the phone (OnePlus \/ OxygenOS) is blocking me from screencasting (&#8220;Display Mirroring&#8221; by any other name, we&#8217;ll get to that) to <em>my own TV<\/em> in <em>my own living room<\/em>, a handful of feet away, on the <em>same wireless network<\/em> until I enable location permissions.<\/p>\n\n\n\n<p>As a rule, I don&#8217;t give platform to shenanigans like this. Looks like an open-and-shut case of permissions creep and enshittification land-grab, right? Strangely though, when selecting the long-forgotten Chromecast as a screen mirroring destination, it just works (not really, it crashes after a bit or when the first session disconnects, but it connects without asking where I live first). Why does only casting to a <em>specific<\/em> device demand location access? So the plot has thickened and I dug in a bit. Web searching this produced no direct hits (even with the usual &#8220;+reddit&#8221;) because 2026 and web search, but here is what I ultimately learned.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">First: What&#8217;s all this &#8216;Casting&#8217; stuff, anyway?<\/h2>\n\n\n\n<p>Insert fishing trip joke here. In short, the industry, especially where mobile devices are concerned, has developed a bewildering array of competing protocols and terminology for sharing screen content, which all go by a weird mix of overlapping and vendor-proprietary names. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"473\" src=\"https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-1024x473.jpg\" alt=\"\" class=\"wp-image-2092\" srcset=\"https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-1024x473.jpg 1024w, https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-300x138.jpg 300w, https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-768x354.jpg 768w, https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-1536x709.jpg 1536w, https:\/\/tim.cexx.org\/wp-content\/uploads\/cast-2048x945.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>The mysterious unlabeled &#8216;Cast&#8217; button. What protocol(s) does it implicitly assume? The world may never know.<\/em><\/figcaption><\/figure>\n\n\n\n<p>So first off, there are at least four mainstream competing under-the-hood protocols for the act of sending screen content to another device that might be labeled as &#8220;Casting&#8221;<sup data-fn=\"9aba3861-8bb8-42ca-81bc-a68a7fe415cb\" class=\"fn\"><a href=\"#9aba3861-8bb8-42ca-81bc-a68a7fe415cb\" id=\"9aba3861-8bb8-42ca-81bc-a68a7fe415cb-link\">3<\/a><\/sup> and use identical glyphs and logos. These are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8220;Casting&#8221;<\/strong> (Chromecast protocol, formally <a href=\"https:\/\/en.wikipedia.org\/wiki\/Google_Cast\">Google Cast<\/a>) is a proprietary protocol developed by Google for sending audiovisual <em>content<\/em> to another device. Typically a specific piece of content or view, window, etc., is forwarded by an application implementing this protocol, not the entire device screen.<\/li>\n\n\n\n<li><strong>&#8220;Casting&#8221;<\/strong> (various oddball app-specific methods) is a means of sending <em>metadata<\/em> from a specific app on one device to another instance of that same app running on the other device. For example, &#8220;Cast&#8221;ing a video from the YouTube app basically just sends the URL to a copy of the YouTube app (if one exists and is installed) on the other device. If the same app isn&#8217;t installed in both places, or isn&#8217;t available because competing app stores, or the versions aren&#8217;t adequately matched, or they can&#8217;t find each other, or the vendor is mad at you, etc., this doesn&#8217;t work, and of course this mechanism is app-specific and has to be re-invented for every app.<\/li>\n\n\n\n<li><strong>&#8220;Casting&#8221;<\/strong>, aka Screen Mirroring. This is actually the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Miracast\">Miracast protocol<\/a>, and sends audiovisual <em>content<\/em>, typically the full screen. According to the official <a href=\"https:\/\/support.roku.com\/article\/screen-mirror-your-phone-tablet-or-computer\">Roku documentation<\/a> for this feature on their devices, &#8220;Common terms for screen mirroring include:\n<ul class=\"wp-block-list\">\n<li>Smart View<\/li>\n\n\n\n<li>Quick Connect<\/li>\n\n\n\n<li>SmartShare<\/li>\n\n\n\n<li>AllShare Cast<\/li>\n\n\n\n<li>Wireless display<\/li>\n\n\n\n<li>Display mirroring<\/li>\n\n\n\n<li>HTC Connect<\/li>\n\n\n\n<li>Screen casting<\/li>\n\n\n\n<li>Cast&#8221;<\/li>\n\n\n\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Miracast\">According to Wikipedia<\/a>, it could also-also be called <em>easy mirroring<\/em> (Panasonic) or <em>Connect<\/em> (Windows 10)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/AirPlay\"><strong>Apple AirPlay<\/strong><\/a>, A proprietary Apple thing that sends A\/V <em>content<\/em> to the remote device, kind of like the Chromecast protocol. At least it has its own well-defined name that&#8217;s less likely to be labeled &#8220;casting&#8221;.<\/li>\n<\/ul>\n\n\n\n<p>So, the &#8220;Casting&#8221; in question here is really the Miracast protocol for my case (Roku devices don&#8217;t support the Chromecast protocol). A fun sidenote, Miracast, an industry standard governed by the WiFi Alliance, is supported by basically all Android smartphones <em>except<\/em> Google-branded ones (e.g. Nexus and Pixel). Google rather <a href=\"https:\/\/en.wikipedia.org\/wiki\/Miracast#Android\">pointedly removed support for it<\/a> from Android beginning in v6.0 to push its proprietary Chromecast protocol instead, and pretty much all other device vendors manually add it back in their own Android forks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Miracast and Location Connection<\/h2>\n\n\n\n<p>Despite all the documentation and admonitions to &#8220;ensure both devices are on the same network&#8221;, Miracast typically uses <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wi-Fi_Direct\">Wi-Fi Direct<\/a>, bypassing your network entirely and creating its own WiFi Access Point (SoftAP) on one device to establish a direct connection. Unfortunately, it&#8217;s well-known that WiFi access points tend to hang around a long time without moving, giving rise to myriad WiFi location databases that can be used to pinpoint a user by scanning for nearby APs. Due to this, since Wi-Fi Direct relies on scanning for and connecting to these newly-created SoftAPs, Android (at minimum) requires granting location permissions to scan for WiFi devices (and Bluetooth, for the same reason). A quirk is that there is also a &#8220;Miracast over Infrastructure&#8221; mode, which only some implementations support, that works like your more traditional discovery protocols sending and receiving announcement packets over an existing network. This <em>may<\/em> explain why not all Miracast destinations require granting location permissions. As for why devices are <em>discovered<\/em> without location permissions (AP scanning), but require it to <em>connect<\/em>, don&#8217;t ask me. A quick scan of the Miracast spec suggests that if the device is already connected to a network, it will send more traditional discovery info on that network via mDNS, even though the Wi-Fi Direct mechanism ultimately expects you to bypass it for a direct connection (via scan) to the SoftAP.<\/p>\n\n\n\n<p>Unfortunately &#8211; and here is where the techbro shenanigans come in &#8211; this falls under Android&#8217;s fine-grained location permission, and enabling &#8220;Location&#8221; is all-or-nothing. Seemingly by design, there is no distinction between acknowledging the technical implementation <em>could<\/em> be misused for location tracking, and granting consent to actively do so. Under Android (at least), there is no granularity to grant AP scanning at the app <em>or<\/em> system level without also granting e.g. GPS access, nor easily bound it to that specific interaction. The low-resistance path is for the user to knuckle under and broadly grant &#8220;location&#8221; permission to the app, which, even if the app developer is honest, may be <a href=\"https:\/\/www.eff.org\/deeplinks\/2026\/07\/developers-beware-ad-libraries-betray-your-users-location-privacy\">misused by someone down the chain<\/a>, this misuse ranging from &#8220;merely&#8221; creepy ad-targeting to one&#8217;s location history being <a href=\"https:\/\/www.eff.org\/deeplinks\/2026\/03\/targeted-advertising-gives-your-location-government-just-ask-cbp\">resold to repressive governments<\/a>. Likewise, enabling &#8220;location&#8221; at the system level is taken by Google as a greenlight to actively collect it in all available forms, with all of the same aforementioned issues, not merely enable technical features that <em>could<\/em> be used to do so.<\/p>\n\n\n\n<p>So, I kind-of get it, in one sense they are warning you that we can&#8217;t have nice things &#8211; this feature inherently comes with a data collection risk and some ne&#8217;er-do-well app could use it to hoover information<sup data-fn=\"2a35962a-1a65-43ec-9a6c-21f4b0249263\" class=\"fn\"><a href=\"#2a35962a-1a65-43ec-9a6c-21f4b0249263\" id=\"2a35962a-1a65-43ec-9a6c-21f4b0249263-link\">4<\/a><\/sup> &#8211; but in another sense they&#8217;ve solved the &#8220;have to sleep with your boss if you want that promotion&#8221; problem by just pressuring you to sign a consent waiver first, with a clause saying that they get to watch too.<\/p>\n\n\n\n<p><\/p>\n\n\n<ol class=\"wp-block-footnotes\"><li id=\"83685d70-1c39-407a-b6d7-8a29ee01530d\">&#8220;Baddies&#8221; being defined as not-the-industry-leaders by the industry leaders (including ones that rhyme with Foogle), who are <a href=\"https:\/\/developers.google.com\/maps\/documentation\/geolocation\/overview\">already doing this all the time<\/a>, including creating that database itself to resell access to those non-industry-leading baddies. <a href=\"#83685d70-1c39-407a-b6d7-8a29ee01530d-link\" aria-label=\"Jump to footnote reference 1\">\u21a9\ufe0e<\/a><\/li><li id=\"b5fb3efb-b568-4720-96b2-cd66e696fbf6\">For my specific case, the problem was mainly lack of clarity over which underlying protocols were\/weren&#8217;t supported by the app-specific &#8216;Cast&#8217; button I was trying to use (app assumed Chromecast protocol, TV &#8220;cast&#8221; feature only supports Miracast), coupled with the fallback Chromecast (which <em>does<\/em>, of course, support Chromecast protocol) not appearing due to being crashed, thus making it look like a broader network discovery problem. More and more, I find that my janky homerolled solutions are actually becoming more reliable than commercially-supported cross-vendor ones, if only because all the moving parts are actually visible and they don&#8217;t depend on the benevolence of competitors who are actively trying to kneecap each other. <a href=\"#b5fb3efb-b568-4720-96b2-cd66e696fbf6-link\" aria-label=\"Jump to footnote reference 2\">\u21a9\ufe0e<\/a><\/li><li id=\"9aba3861-8bb8-42ca-81bc-a68a7fe415cb\">Plus about several thousand others for streaming screen or A\/V content that, for whatever reason, are <em>not<\/em> called &#8220;casting&#8221; or commonly baked into mobile devices. <a href=\"#9aba3861-8bb8-42ca-81bc-a68a7fe415cb-link\" aria-label=\"Jump to footnote reference 3\">\u21a9\ufe0e<\/a><\/li><li id=\"2a35962a-1a65-43ec-9a6c-21f4b0249263\">In this case, why do individual apps have to separately implement the scanning functionality and have access to the resulting AP data? I.e., why is this industry-standard protocol and discovery not handled by the device OS itself? (Oh, wait, see note above about Google ripping it out of Android OS since it competes with Google Cast.) <a href=\"#2a35962a-1a65-43ec-9a6c-21f4b0249263-link\" aria-label=\"Jump to footnote reference 4\">\u21a9\ufe0e<\/a><\/li><\/ol>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>TL;DR: Strange technical quirk rather than datamining techbro shenanigans (okay, only a little techbro shenanigans). This is &#8220;Miracast&#8221; under the hood, which (sometimes) requires scanning for and connecting to a dummy WiFi Access Point to make a direct connection, and baddies can use access to your nearby APs for location tracking, so this scan is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_FSMCFIC_featured_image_caption":"","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","iawp_total_views":126,"footnotes":"[{\"content\":\"\\\"Baddies\\\" being defined as not-the-industry-leaders by the industry leaders (including ones that rhyme with Foogle), who are <a href=\\\"https:\/\/developers.google.com\/maps\/documentation\/geolocation\/overview\\\">already doing this all the time<\/a>, including creating that database itself to resell access to those non-industry-leading baddies.\",\"id\":\"83685d70-1c39-407a-b6d7-8a29ee01530d\"},{\"content\":\"For my specific case, the problem was mainly lack of clarity over which underlying protocols were\/weren't supported by the app-specific 'Cast' button I was trying to use (app assumed Chromecast protocol, TV \\\"cast\\\" feature only supports Miracast), coupled with the fallback Chromecast (which <em>does<\/em>, of course, support Chromecast protocol) not appearing due to being crashed, thus making it look like a broader network discovery problem. More and more, I find that my janky homerolled solutions are actually becoming more reliable than commercially-supported cross-vendor ones, if only because all the moving parts are actually visible and they don't depend on the benevolence of competitors who are actively trying to kneecap each other.\",\"id\":\"b5fb3efb-b568-4720-96b2-cd66e696fbf6\"},{\"content\":\"Plus about several thousand others for streaming screen or A\/V content that, for whatever reason, are <em>not<\/em> called \\\"casting\\\" or commonly baked into mobile devices.\",\"id\":\"9aba3861-8bb8-42ca-81bc-a68a7fe415cb\"},{\"content\":\"In this case, why do individual apps have to separately implement the scanning functionality and have access to the resulting AP data? I.e., why is this industry-standard protocol and discovery not handled by the device OS itself? (Oh, wait, see note above about Google ripping it out of Android OS since it competes with Google Cast.)\",\"id\":\"2a35962a-1a65-43ec-9a6c-21f4b0249263\"}]"},"categories":[4,2],"tags":[40,15,202],"class_list":["post-2084","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geek","category-rants-rambles","tag-broken","tag-corporates","tag-enshittification"],"_links":{"self":[{"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/posts\/2084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2084"}],"version-history":[{"count":8,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/posts\/2084\/revisions"}],"predecessor-version":[{"id":2098,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/posts\/2084\/revisions\/2098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=\/wp\/v2\/media\/2092"}],"wp:attachment":[{"href":"https:\/\/tim.cexx.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tim.cexx.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}