How to convert an old TV box into an epic digital picture frame

Hi, I am Leonardo from São Paulo, and Wolfgang invited me to turn my latest project into a guest post.

As an enthusiast of many sciences, I aim to understand and demonstrate how the complexities of knowledge can be simplified and integrated into society through a little box containing an electrified stone we trick into thinking for us.

I built and customized three instances of The Digital Picture Frame. It’s so simple yet such a great system setup that I fell in love.

People have built such awesome setups for this small utility, and passion drove me to my calling: It’s my time to hack a device and turn it into a picture frame.

My chosen target? An old TV Box.

It has everything needed:

  • A hackable Android TV that I can turn into Linux
  • A way to boot a custom system (e.g., an SD card)
  • A way to mount different media for photo display (e.g., flash drives)

Let’s dive into this journey. Perhaps you will have a TV Box-Frame, too!

Not all TV boxes will work. Some, if not most, cannot host a custom system. Be wary when following this as a guide, as your setup might vary.

Installing Armbian

Armbian is a “minimal custom Debian or Ubuntu based Linux perfect for server and IOT.” We’re going to pick it because most TV Boxes are ARM-based, and Armbian is perfect for the job.

We will follow the guide CSC Armbian for RK322x TV box boards.

For this tutorial, we will use an RK3229 pilot chip. It’s available in many TV boxes and is not hard to set up.

Discovering the chipset

If you’re not sure that your TV Box chip is supported, download and install, through the TV box, the app Z-CPU or the FLOSS App CPU Info.

In the app, we’re looking for information on the chipset. Chipsets of the format RK322X are supported.

Unbricking instructions

Technically, rock chip devices cannot be bricked. However, a screw-up might require repairing the original system, and the unbricking instructions from CSC Armbian for RK322x TV box boards can help.

Installing using an SD Card

We’re going to use an SDXC Card (or, most commonly, an SD Card + Adapter). This card will hold our entire operating system* and be plugged into the machine 24/7. I recommend anything 8GB or bigger, but realistically, 3GB is the entire system + files.

* You could instead install the system directly to the machine. I couldn’t get that to work reliably and preferred the permanent SD approach.

Preparing the TV Box with Multitool

The Multitool is a small but powerful tool for making changes to our RK322X.

Let’s first flash the Multitool image onto the SD Card. You can use any tool for it, but I like Balena Etcher.

Our goal with Multitool is straightforward:

  1. Flash Multitool to the SD Card
  2. Put the card in the TV Box and power on. After a few seconds, Multitool should appear on the display
  3. RECOMMENDED: Make a backup of the current firmware with Backup Flash
  4. Select Install Jump Start for Armbian

And we’re done with Multitool! Power the device down and retrieve the SD card. Store your backup and get ready to flash it again!

Choosing an image

CSC Armbian for RK322x TV box boards explains how to make a build, but we will grab a pre-built binary from armbian/community.

Let’s take the image Rk322x-box_bookworm_current_6.12.15_minimal.img.xz

As we’ve done earlier, let’s flash it to our SD card using Balena Etcher.
After flashing, insert the SD with the new Armbian image on the device and power it on.

Welcome to Armbian

If everything worked correctly, you should now have a shell inside Armbian asking you for information.
The most important point here is that we’ll create a normal user account with the username pi. This will be important to follow The Digital Picture Frame without too many changes on the scripts.

To finish configuring Armbian, let’s run two commands:

  • sudo rk322x-config and select your board characteristics to enable LEDs, wifi chips, etc.
  • armbian-config to configure time zones, locales, and other personal options

At this point, you can also connect your device to your network and connect to it through ssh.

Install The Digital PictureFrame

From this point on, we are done with the system and can start playing with PictureFrame itself. We will follow the guide for Raspberries as closely as we can until we get it working.

Let’s first install the necessary dependencies:

sudo apt update

sudo apt install build-essential pkg-config python3-dev python3-pip python3.11-venv libjpeg-dev libtiff-dev libfreetype6-dev zlib1g-dev liblcms2-dev libwebp-dev tcl-dev tk-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpng-dev cmake ninja-build git libgles2-mesa libegl1-mesa libgl1-mesa-dri libglapi-mesa libsdl2-2.0-0 libsdl2-dev

And compile + install HEIF, as the ones from Armbian aren’t updated enough:

cd ~

git clone https://github.com/strukturag/libheif.git

cd libheif

mkdir build && cd build

cmake ..

make -j$(nproc)

sudo make install

Then, let’s prepare a Python virtual environment to install picframe into:

cd ~

mkdir venv_picframe

python3 -m venv /home/pi/venv_picframe

source venv_picframe/bin/activate

And finally, let’s install PictureFrame!

pip install picframe

To know it worked, we should see after a long (maybe 30+ minutes) some positive messages:

Successfully installed IPTCInfo3-2.1.4 Pillow-11.1.0 PyYAML-6.0.2 defusedxml-0.7.1 ninepatch-0.2.0 numpy-2.2.3 paho-mqtt-2.1.0 pi-heif-0.21.0 pi3d-2.53 picframe-2024.11.1 pysdl2-0.9.17

Configuring PictureFrame

On Configuring PicFrame we have clear instructions on how to configure picframe. Let’s do that now!

You will be asked three questions for the basic configuration settings. Just hit Enter to keep the default for now. You can always change these settings later.

mkdir {Pictures,DeletedPictures}

picframe -i /home/pi/

You don’t need to make changes in the configuration file at this point. But you probably want to customize it later. In that case, open it with

nano ~/picframe_data/config/configuration.yaml

Starting PictureFrame

Let’s create a script to start our Picframe:

nano start_picframe.sh

#!/bin/bash
source /home/pi/venv_picframe/bin/activate # activate phyton virtual env
picframe &  #start picframe

while true; do sleep 10; done # Keep the script running

Save and close and make the file executable with

chmod +x ./start_picframe.sh

And now, finally, let’s run our PicFrame

./start_picframe.sh

And if everything went through correctly, we’ll get a beautiful mug on the screen:

Auto Starting Picframe

This part will work a bit differently from Autostarting PictureFrame, so pay close attention!

Let’s start by creating the file picframe.service with sudo nano /etc/systemd/system/picframe.service and pasting the following content inside:

[Unit]
Description=PictureFrame Startup
After=multi-user.target

[Service]
Type=simple
ExecStart=/bin/bash /home/pi/start_picframe.sh
Restart=on-failure  # Only restart if it fails
RestartSec=10       # Wait 10 seconds before restarting
User=pi
WorkingDirectory=/home/pi
Environment=DISPLAY=:0
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Then reload systemd and enable the brand new service:

sudo systemctl daemon-reload

sudo systemctl enable picframe.service

sudo systemctl start picframe.service

We can check the service status by running

systemctl status picframe.service

Enable Autologin on tty1

The pi user doesn’t have auto-login enabled, and we must have it if we don’t want to stare at a login screen. Let’s change that by creating an override for getty@tty1:

sudo mkdir -p /etc/systemd/system/getty@tty1.service.d

sudo nano /etc/systemd/system/getty@tty1.service.d/override.conf

And paste this inside to enable auto-login:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM

PictureFrame should now start on boot.

Was this article helpful?


Thank you for your support and motivation.


Scroll to Top