Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

z Working with DTB Files

southoz edited this page Dec 31, 2025 · 1 revision

To decompile, edit, and recompile a DTB file on your R36S clone running ArkOS, you'll need access to the device's terminal. This process assumes you're comfortable with basic Linux commands and understand the risks—editing DTB files incorrectly can cause boot failures or hardware issues, so back up everything first. DTB files are typically located in /boot (e.g., gameconsole-r36s.dtb, rk3326-r36s-linux.dtb, or similar variants like rk3326-rg351mp-linux.dtb depending on your exact clone and ArkOS build). Identify yours with ls /boot/*.dtb.

Step 1: Access the Terminal

  • Via USB keyboard (on-device terminal): Connect a USB keyboard to your R36S. Press Alt + F2 to bring up the login prompt. Log in with username ark and password ark.
  • Via SSH (recommended for easier editing):
    • On the device, go to the EmulationStation menu > Options > Advanced > Remote Services > Enable (this starts SSH).
    • Find the device's IP address: Options > Network Info.
    • From your PC, connect via SSH: ssh ark@<device-ip> (password: ark). Use a client like PuTTY (Windows) or Terminal (Mac/Linux).
    • For file transfers/editing, use WinSCP or similar with the same credentials.

If SSH isn't enabled by default, enable it as above. Ensure the device is on Wi-Fi.

Step 2: Install Required Tools

ArkOS is Ubuntu-based, so use apt to install the Device Tree Compiler (dtc) if it's not already present (it's often not by default).

sudo apt update
sudo apt install device-tree-compiler nano

This installs dtc for decompiling/recompiling and nano as a simple text editor (if not already there; vi is usually available as an alternative).

Step 3: Backup and Decompile the DTB

Navigate to the boot directory and work on your target DTB file (replace gameconsole-r36s.dtb with your actual filename).

cd /boot
sudo cp gameconsole-r36s.dtb gameconsole-r36s.dtb.bak  # Backup
dtc -I dtb -O dts -o gameconsole-r36s.dts gameconsole-r36s.dtb  # Decompile to DTS

This creates an editable text file (gameconsole-r36s.dts).

Step 4: Edit the DTS File

Open the DTS file in a text editor and make your changes (e.g., modify hardware properties like display timings, joystick axes, or GPIO pins). Be precise—reference Device Tree syntax documentation if needed.

sudo nano gameconsole-r36s.dts

Save and exit (Ctrl+O, Enter, Ctrl+X in nano).

Step 5: Recompile and Replace the DTB

dtc -I dts -O dtb -o gameconsole-r36s-new.dtb gameconsole-r36s.dts  # Recompile to DTB
sudo mv gameconsole-r36s-new.dtb gameconsole-r36s.dtb  # Replace original
sudo sync  # Ensure changes are written

Step 6: Reboot and Test

sudo reboot

If it doesn't boot, restore your backup by mounting the SD card on a PC (insert into a computer, copy the .bak file back over the DTB in the BOOT partition).

Common use cases include fixing black screens on clones by adjusting display panels or swapping joystick axes. If your edits involve boot.ini or other files, edit those similarly in /boot. For complex edits, consider doing this on a Linux PC/VM by mounting the SD card's BOOT partition instead of on-device.

Home

Guides

Arcade Systems

Console Systems

Handheld Systems

Computer Systems

Ports and Recompilations

Advanced

Clone this wiki locally