Introduction
In this tutorial, you'll learn how to transform an old Android phone into a powerful streaming device that can mirror its screen to your TV. This is an excellent way to repurpose older hardware while avoiding the cost of purchasing a dedicated streaming stick. We'll use ADB (Android Debug Bridge) and a few simple commands to enable screen mirroring functionality.
Prerequisites
- An old Android phone running Android 5.0 or higher
- A TV with an HDMI input port
- An HDMI cable (Type-C to HDMI or Micro HDMI)
- A computer with ADB tools installed
- USB debugging enabled on your Android device
- Basic understanding of command-line interfaces
Step-by-Step Instructions
1. Prepare Your Android Device
Before we begin, ensure your Android phone is ready for screen mirroring. First, enable Developer Options by going to Settings > About Phone and tapping the Build Number seven times. Then navigate to Settings > Developer Options and enable USB Debugging. This step is crucial because ADB requires these permissions to communicate with your device.
2. Install ADB Tools on Your Computer
Download and install the Android SDK Platform Tools on your computer. For Windows users, you can download the complete SDK from the official Android developer site. For macOS and Linux users, you can install ADB via package managers like Homebrew (brew install android-platform-tools) or directly from the Android Studio installer.
3. Connect Your Phone to Your Computer
Use a USB cable to connect your Android phone to your computer. Make sure the phone is unlocked and you've granted permission for USB debugging when prompted. Verify the connection by running the following command in your terminal or command prompt:
adb devices
This command should list your connected device. If it doesn't, double-check that USB debugging is enabled and your cable is properly connected.
4. Enable Screen Mirroring via ADB
Now we'll use ADB to enable screen mirroring functionality on your device. Run this command:
adb shell settings put global screen_compositor_enabled 1
This command enables the screen compositor, which is essential for screen mirroring. The screen compositor handles the rendering of your device's display and is required for proper mirroring to work.
5. Configure HDMI Output
Next, we need to configure your device to output video via HDMI. Run the following command:
adb shell settings put system hdmi_output_mode 1
This sets the HDMI output mode to standard, which is compatible with most TVs. You may need to experiment with different values (0 for auto, 1 for standard, 2 for high definition) depending on your specific device and TV capabilities.
6. Set Up Your TV Connection
Connect your Android phone to your TV using an HDMI cable. If your phone has a USB-C port, you'll need a USB-C to HDMI adapter. For phones with Micro USB, use a Micro USB to HDMI adapter. Once connected, your phone's screen should automatically begin mirroring to your TV. If it doesn't, try unplugging and replugging the HDMI cable, or restart your phone and try again.
Summary
By following these steps, you've successfully transformed your old Android phone into a streaming device capable of mirroring its screen to your TV. This method is cost-effective and environmentally friendly, allowing you to repurpose older hardware. The process leverages ADB commands to enable screen mirroring functionality that's typically not available through standard Android settings. Remember that the quality of mirroring may vary depending on your phone's hardware capabilities and the HDMI cable you're using.
For advanced users, you can further optimize this setup by creating a simple script that automates these commands, or by exploring custom ROMs that provide native HDMI output support. This technique demonstrates how Android's underlying system can be manipulated to achieve functionality beyond what's offered in standard user interfaces.



