Obtaining game data from old GameSticks

After building a minimal server for my PlayJam GameStick micro gaming console, I sought a way to get cached game data off existing GameSticks.

Nobody had cared enough to obtain copies of the server API responses before the official server had been shut down in 2017, and now we had nearly no information about the games that could once be bought, downloaded, installed and played on a GameStick. I already had the data for 31 games, but none for 157 others that were once available.

One day GameStick Fans discord member alex.shorts wrote:

@cweiske I have a GameStick with the tofu media player, and used it in the days before the servers were shut down

This was the jackpot! All game data would be cached on it, we just had to get the files.

Advanced launcher

GameSticks came pre-installed with the "TOFU Media Center", which was a fork of XBMC 12 tailored for the GameStick. XBMC (now Kodi) has support for plugins, and using such a plugin to enable Android's debug bridge adb was the most promising way to reach that goal: We wanted to run am start -n com.android.settings/.Settings to open standard Android settings and enable adb via the developer settings.

alex.shorts tried the gamestickers rooting tutorial but failed because the "Advanced Launcher" TOFU plugin was not even able to create a start script - it failed with an error that others had seen before:

Cannot create launchers.xml file

Using another "Advanced Launcher" version yielded the same error.

Own TOFU plugin

When we cannot open the settings to enable adb, then we need a TOFU plugin that copies the cache files onto a SD card.

GameStick debugging

When programming, the program (here the plugin) needs to be tested. Testing on GameStick's TOFU means:

  1. Create a plugin .zip file with the code
  2. Make the .zip file available via SMB over the network (or copy it to the SD card, which involves ejecting + inserting SD cards)
  3. Uninstall the last plugin version from TOFU
  4. Install the new plugin version
  5. Run the plugin
  6. Gues why it did not work

This process takes ~2 minutes, which is way too long - when changing a line of code in the editor, I want feedback quickly.

Old XBMC: Linux

Next I tried to compile XBMC 12 on my Linux laptop. After investing 1 hour to obtain and install all required dependencies, the "make" script failed because the 2023 C compiler does not like to compile code that the 2013 C compiler had no problems with.

Since my C skills are sub-par I ditched that idea.

Debian 12 dependencies for XBMC 12
libsdl-image1.2-dev libsdl-mixer1.2-dev

XBMC: Wine

When compilation fails, use a pre-compiled XBMC. There were no pre-compiled XBMC 12 to find for Linux, but for Windows!

So I installed wine and could finally start XBMC.

With a local XBMC running, I could install a minimal plugin version and the continue editing the python file in ~/.wine/drive_c/users/cweiske/Application Data/XBMC/addons/. That allowed me to quickly test changes, even if I could not use it to test the actual GameStick directory copying code.

As soon as the Windows plugin version worked, I adjusted the paths to be GameStick-compatible, zipped the files and installed it in TOFU - and it worked!

The script.copygamestickcache code and ready-to-install plugin files are available.

Game data

A couple of days later, alex.shorts used the plugin to get the cache files off his GameStick and sent them to me.

In the meantime, I had built a schema for game data files as well as some scripts to import the cache files and download the available .apk, movie and image files. We now have complete data of 183 games!

5 games had been pulled from the store before shutdown, and so we still need some donor who can provide cache files from 2015.

Only 33 .apk files could be downloaded from S3, the others are blocked - probably only accessible with temporary access tokens that once were generated by the GameStick server.

The next step is to build a TOFU plugin that copies all .apk files off the GameStick.

Written by Christian Weiske.

Comments? Please send an e-mail.