Skip to content
Related Articles

Related Articles

Improve Article

Screen Mirroring of Android Smartphone using Raspberry Pi

  • Difficulty Level : Easy
  • Last Updated : 12 Mar, 2021

Raspberry Pi consists series of small single-board computers. It was developed in the United Kingdom by the Raspberry Pi foundation in association with Broadcom. The first Raspberry Pi model was launched in 2012 and by the time it became popular because of its wide applications in many fields like many used Raspberry Pi to learn programming skills, build hardware projects, do home automation, and even use them in industrial applications.

Raspberry Pi is a very cheap computer that runs Linux but also provides a set of GPIO(general purpose input/output)pins that allow you to control electronic components for physical computing and explore the internet of things(IoT).

Want a more fast-paced & competitive environment to learn the fundamentals of Android?
Click here to head to a guide uniquely curated by our experts with the aim to make you industry ready in no time!

Here is the list of different models of Raspberry Pi:



ModelRelease DateCore TypeNo. of CoresRAMGPU
Pi B15 Feb,2012ARM1176JZF-S1512 MBVideoCore IV 1080p@30
Pi 21 Feb,2015Cortex-A741 GBVideoCore IV
Pi zero30 Nov,2015ARM1176JZF-S1512 MBVideoCore IV
Pi 329 Feb,2016Cortex-A53 64-bit41 GB(DDR2)VideoCore IV 1080p@30
Pi A+10 Nov,2014ARM1176JZF-S1256 MBVideoCore IV
Pi zero w28 Feb,2017ARM1176JZF-S1512 MBVideoCore IV
Pi zero wh12 Jan,2018ARM1176JZF-S1512 MBVideoCore IV
Pi 3B+14 Mar,2018Cortex-A53 64-bit41 GB(DDR2)VideoCore IV
Pi 3Model A+15 Nov,2018Cortex-A53 64-bit4512 MB(DDR2)VideoCore IV
Pi 4B24 June,2019

Cortex-A72 (ARM v8) 

64-bit

4

1 GB,2 GB,

4 GB(LPDDR4)

VideoCore VI
Pi 4B(8 GB)28 May,2020

Cortex-A72 (ARM v8)

 64-bit

48 GB(LPDDR4)VideoCore VI
Pi 4002 Nov,2020

Cortex-A72 (ARM v8) 

64-bit



44 GB(LPDDR4)VideoCore VI
Pi Pico21 Jan,2021

RP2040 dual-core

 Arm Cortex-M0+

2264 KB————–

Now, let’s move to our project based on the screen mirroring of an android phone with the help of Raspberry Pi.

Screen Mirroring or casting allows you to mirror your mobile device content to your TV screen. One needs at least Raspberry Pi 2 model for mirroring your mobile device to your tv screen.

Prerequisites:

Raspberry Pi 2(or above model, excluding Pi Pico)

  1. HDMI cable
  2. Mouse
  3. Keyboard
  4. SD card(8GB at least)
  5. Data Cable(Depending upon your smartphone charging port)
  6. Output Screen(TV screen, Computer screen or any other screen)

Before moving forward, one should install Raspberry Pi OS(previously called Raspbian) an official supported operating system for Raspberry Pi.

Connections & Configuration:

So, now here are connections one should make before moving further:

  1. Connect one end of the HDMI cable to the output screen and the other to Raspberry Pi.
  2. Connect mouse and keyboard to the Raspberry Pi ports.
  3. For internet connection connect with an Ethernet cable or with WiFi.
  4. For providing power to Raspberry Pi connect it with a type-C or type-B data cable(depending upon the Raspberry Pi model).

Implementation:

Now it begins, after installing OS and making connections follow the given below steps carefully:

For installing scrcpy we have to install PiKiss on our Raspberry Pi.

Step 1: Open terminal(Ctrl+Alt+T) on Raspberry Pi and type the following command and hit enter:



 $ curl -sSL https://git.io/JfAPE | bash

      

Step 2: Open File Explorer->Pi(folder)->PiKiss. Under PiKiss Folder go-to tools and on top click on ‘Open Current Folder in Terminal’.

Step 3: Check if new scripts are available on remote and update them automatically, but If you want to get the latest version manually, just enter into the directory with cd PiKISS and use the below command: 

$ git pull

Step 4: Open the drop-down menu and click on ‘System Tools followed by Open PiKISS.

Step 5: The given window will pop up and scroll down to select scrcpy and press enter.

Step 6: Again open the drop-down menu and click on System tools followed by scrcpy.

Step 7: Now, connect the android smartphone to raspberry pi and enable the developer option on your android smartphone by tapping 4-7 times on your android smartphones’ build number(If you are unable to enable the developer option, then search how to enable developer option for any particular device. After getting on developer option,enable USB debugging on android smartphone. (Click ‘OK’ on popup message if it displays on after enabling USB debugging). On connecting your android smartphone to Raspberry Pi, it will show the ‘USB Debbuging’ popup window, click on ‘Allow‘.

Step 8: At last, again enable scrcpy by simply click on Scrcpy under System Tools.

It will mirror your android device on your output screen.

My Personal Notes arrow_drop_up
Recommended Articles
Page :