Roku IDK on Mac
I have long loved my series of TV streaming Roku devices. The UI isn’t as fancy as the Apple TV, but it’s very stable, very responsive, and far easier to use than Apple’s insane remote. Historically the Roku SDK was really only targeted at streaming TV apps (which makes sense), but there wasn’t a way to write games or other high performance apps using anything but Roku’s own BrightScript SDK. However, about a month ago Roku announced the Independent Developer Kit that lets anyone build and side load apps onto their own Roku’s using C++ and OpenGL. I was thrilled but bummed that you have to run the SDK on Linux. However, it’s just some command line scripts, so maybe we could run it in a Docker container. After a little experimenation I figured out how. Let's dig in.
First install Docker for Mac
Next, from the terminal on your Mac, create a Linux Ubuntu container image.
docker run -it —name ubuntu ubuntu:xenial bash
Now you should have Ubuntu Linux running inside of a Docker container, and a shell into this container as root.
From within the linux container, install the standard GCC build chain
apt install build-essential
Setup the IDK
Back on your host macOS terminal, download the IDK and then copy the tarball into your linux container.
docker cp ~/Downloads/10.5.517-IDK.tar ubuntu:/home
back in the container shell, uncompress the tarball
tar -xvf 10.5.517-IDK.tar
go to the gles2 example
and build it
Now it will compile the test app and create the file:
Copy this file back to macOS by typing this into a terminal on the mac side
docker cp ubuntu:/home/10.5.517-IDK/samples/gles2/idk_sample_gles2.squashfs.bin .
Now you’ve got a compiled app and you just need to install in on your Roku.
Roku Developer Mode
Now enable developer mode on your Roku following these instructions. As part of the setup it will give you a URL on your local network, and username. Write these down. Set a password as part of the setup, and write that down too. The setup process reboot your Roku.
After the reboot navigate to that URL (something like
http://10.0.0.121/)in your browser and put in the user/pass. You are now at the app install page. Upload the binary and click install.
Done. If you have a supported device the app will launch. Otherwise it will tell you that “IDK Applications are not supported on this device.” I thought my device was supported because it’s under the no longer manufactured but still can update to the latest OS table. However you need to look for the IDK support row, and you’ll see its only some of the current devices. I have a Roku Ultra and there have been several versions with that name but mine doesn’t support the IDK. I suspect it has to do with the particular ARM chip inside, which has clearly changed over time. In any case, I ordered a new 4k streaming stick + (2021 edition) for 30$ so in a few days i’ll be able to test my apps.
I'm looking forward to messing around with the SDK and building a snow flake simulator for my annual Christmas Countdown clock. Ciao!
Posted November 20th, 2021