← All posts

Play your own Minecraft: Java Edition on the Anbernic RG40XXH (stock OS)

PortMaster has a port of Minecraft: Java Edition that plays on handhelds like the Anbernic RG40XXH. On custom systems like muOS it runs after some setup (our muOS guide). On Anbernic’s own system, the “stock OS” the handheld comes with, it doesn’t start at all: the graphics, the controls and the memory all need fixes first.

We made those fixes into a small free tool, PocketKode Port Bridge. It sets everything up on the handheld and puts Minecraft in the stock OS’s PORTS game list. You bring your own Minecraft; Port Bridge never downloads it.

Tested on: Anbernic RG40XXH (1 GB RAM) · Anbernic stock OS V1.1.0 · Minecraft: Java Edition 1.12.2 · Port Bridge 1.0.0.

Experimental: it plays, but on a 1 GB handheld it isn’t always smooth. See Smoother play.

What you need

  • Your own Minecraft: Java Edition (bought from Minecraft.net) and a computer with the official Minecraft Launcher (Windows, macOS or Linux).
  • The handheld on Wi-Fi with internet for the first start: Port Bridge downloads PortMaster’s parts (about 190 MB).
  • Free space: about 1 GB on the system partition (the stock OS has plenty) and 200 MB on SD card 1 for the copy.
  • A way to copy files to SD card 1: Wi-Fi Transfer (see copying files to the stock OS over Wi-Fi), SFTP or a card reader.

Step 1: get Minecraft 1.12.2 on your computer

The port runs 1.12.2 (and 1.7.10), not today’s Minecraft.

  1. Open the official Minecraft Launcher and sign in with the account that owns Java Edition.
  2. Go to Installations → New installation, choose release 1.12.2 and click Create.
  3. Click Play once and wait until the main menu appears. This downloads the libraries, sounds and textures 1.12.2 needs. Then quit Minecraft.

Step 2: download Port Bridge and collect your files

Download PortBridge-1.0.0-stock.zip (32 KB) and unzip it. Its PC folder has a small script that collects exactly the files of your 1.12.2 the handheld needs (about 180 MB: the game, 30 libraries, sounds and textures). It only copies files your Minecraft Launcher already put on your computer; it doesn’t download anything or sign in.

Computer Run
Windows Right-click collect-minecraft.ps1 → Run with PowerShell
macOS, Linux In Terminal, in the PC folder: python3 collect-minecraft.py

It makes minecraft-1.12.2-files.zip next to the script. If 1.12.2 isn’t installed yet, it tells you what to do.

Step 3: copy two things to SD card 1

  1. The Roms folder from the Port Bridge zip onto SD card 1. Its Roms/PORTS and Roms/APPS join the folders already there.
  2. minecraft-1.12.2-files.zip into Roms/APPS/PortBridge on SD card 1.

With Wi-Fi Transfer, open the SD card 1 tab, go into Roms/APPS/PortBridge and tap Upload files. Over SFTP the folder is /mnt/mmc/Roms/APPS/PortBridge.

Step 4: start it

  1. Turn on Wi-Fi, then open PORTS → Minecraft in the game list. If PORTS isn’t there yet, restart the handheld once.
  2. The first time, the Port Bridge setup shows its progress: it downloads PortMaster’s port and runtimes from PortMaster’s official releases (checked), applies the stock OS fixes, makes 512 MB of extra memory (a swap file, about a minute) and installs your files. The zip is deleted afterwards.
  3. When it says Minecraft is ready, press A. Starting Minecraft takes 1–2 minutes.

From then on, PORTS → Minecraft starts the game directly.

Controls

Button Action
Left stick Move
Right stick Look around, and the mouse pointer in menus
A Jump
B Drop item
X / Y Inventory
R2 Break / attack (left click)
L2 Place / use (right click)
L1 / R1 Hotbar
START Pause menu
SELECT + START, hold 2 s Quit Minecraft

Quit with SELECT + START, not by switching off. While Minecraft runs it writes a lot to the SD card (the swap file). Switching off in the middle can damage files on the card.

Smoother play

The RG40XXH has 1 GB of RAM, and Minecraft uses almost all of it. If you start without settings, Port Bridge writes light ones for you. If you brought settings from a PC, lower them in Options → Video Settings:

Setting Set to Why
Render Distance 4–6 By far the biggest effect on speed and memory
Graphics Fast Simpler leaves, water and shadows
Smooth Lighting Off Saves work on every block
Mipmap Levels Off Less memory for textures
Max Framerate 30 Steady frames instead of ups and downs
Clouds Off Less to draw

Big worlds with farms and many animals are slower; a new world near spawn plays best.

If something goes wrong

  • The setup says it didn’t finish: usually Wi-Fi without internet. Turn on Wi-Fi and open PORTS → Minecraft again; it continues where it stopped. Details are in Roms/APPS/PortBridge/setup.log.
  • “One more step: your Minecraft files”: the setup didn’t find minecraft-1.12.2-files.zip. Check it’s in Roms/APPS/PortBridge (exactly that name).
  • Minecraft closes after a while: lower the render distance (see above). Logs: /roms/pk-minecraft/ports/minecraftjava/app.log and log.txt (over SFTP).
  • Nothing starts at all, not even other apps: the system partition may have become read-only after the handheld was switched off during a write. A file system check fixes it; email us and we’ll help.

To remove it: delete Roms/PORTS/Minecraft.sh, Roms/PORTS/Imgs/Minecraft.png and Roms/APPS/PortBridge from SD card 1, and /roms/pk-minecraft over SFTP (your worlds are in /roms/pk-minecraft/ports/minecraftjava/.minecraft/saves: copy them first if you want to keep them).

What Port Bridge changes, for the curious

PortMaster’s port is made for systems like muOS. On the stock OS, Port Bridge:

  • uses its own version of PortMaster’s control.txt (the stock OS’s folders, buttons and 640×480 screen);
  • makes Westonpack, the display layer the port runs in, use the stock OS’s Mali graphics driver (the stock OS ships Ubuntu’s generic graphics libraries, which can’t open the screen);
  • starts the controls helper with the stock OS’s newer SDL, so the buttons reach the game;
  • adds a 512 MB swap file (the stock OS has none) and the SELECT + START exit;
  • starts 1.12.2 directly, without PortMaster’s launcher menu.

All its files are open (MIT License), in the download.

Credits

Port Bridge only makes existing work run on the stock OS. Thank you to PortMaster and its community, and to the Minecraft port’s makers: Dia (porter), Jeod (launcher), BinaryCounter (Westonpack and Crusty), gfififid (1.12.2), HMCL (Hello Minecraft! Launcher) and the PortMaster testers. Also ptitSeb (gl4es) and Azul (Zulu Java).

Using muOS? See Minecraft Java on muOS: the same PC script copies your files straight onto a muOS card.

Questions? Email feedback@pocketkode.com.

NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT. Minecraft is a trademark of Mojang Synergies AB. PocketKode is not affiliated with PortMaster or Anbernic.