How I can cast my Android screen to the Raspbian?
Per this Android 4.3 is added some API for easy screen casting, Settings> Device> Display> Cast screen however I couldn't find anyway to make that with Raspbian.
It is done for Airplay but from some searching I've reached to this and this (needs very specific custom ROM) and I couldn't find any solution for live casting my Android device screen to use Raspberry Pi HDMI output.
4 Answers 4
Miracast (what the cast setting on a Nexus enables) is tricky because it's a direct device to device Wi-Fi protocol. There appears to be a project called OpenWFD that's working on Linux support but it's not ready yet. You'd probably have better luck using something like VNC, which works reasonably well on the RaspberryPi already.
-
It's not clear how you would get the source Android content to transmit via VNC, unless you plan on heavily modifying the source device's Android install, or restricting to certain apps with their own built-in VNC support.Chris Stratton– Chris Stratton2015年12月14日 01:53:03 +00:00Commented Dec 14, 2015 at 1:53
The MiracleCast project can turn a Raspberry Pi into a Miracast reciever or transmitter. See here for a success story on a Raspberry Pi.
-
That repo doesn't have any downloads and the Pi guide sounds like it's saying to run it from a custom ISO. That's doable but I don't think most people want to dual boot their Pi. Any tips for this or newer software for this?Deoxal– Deoxal2021年11月26日 09:40:16 +00:00Commented Nov 26, 2021 at 9:40
It's not perfect, but I'm doing it using XPRA.
- Shadow your normal X screen (xpra shadow :0) on your laptop
- Log into the raspbian over SSH (with access to running X screen)
- Attach to your laptop: xpra attach ssh:ip_address:0
cons: You won't cast a video that way, but web pages, apps, presentation - yes. You need a control inversion where raspberry pi is able to log into your (higher level security) system.
-
1It seems like you may have misread the question. The source is no a laptop but rather an Android device, and the mirror display is the pi. This means you can't use an arbitrary solution, but rather only make use of functionality which the Android operating system (or failing that specific apps with the content of interest) already supports(s).Chris Stratton– Chris Stratton2015年12月14日 01:49:31 +00:00Commented Dec 14, 2015 at 1:49
-
True - because I found this question when I was looking for info on how to cast Linux screen to rpi. Mea culpa. For android my only idea is VNC server on android and client on rpi. Still not best for casting images/videos. Ex. (rooted devices): play.google.com/store/apps/details?id=org.onaips.vnc&hl=plbla– bla2015年12月15日 17:42:39 +00:00Commented Dec 15, 2015 at 17:42
Yes, you can install Android 11 on a Raspberry Pi 3 or 4
I have only tried one configuration
That is Android 11 via Lineage OS 18.1
This specific build
https://konstakang.com/devices/rpi4/LineageOS18/
This version only runs on a RPi4 with 2GB ram. I tried 1GB and while it ran, it was highly unstable with several application crashes before boot is finished
But on RPi4 2GB, it worked very well for my purpose, is working very well right now for a spacedesk viewer