-
Notifications
You must be signed in to change notification settings - Fork 0
z Working with DTB Files
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.
-
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
arkand passwordark. -
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.
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).
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).
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).
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
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.
- Arcade (arcade)
- CAPCOM Play System 1 (cps1)
- CAPCOM Play System 2 (cps2)
- CAPCOM Play System 3 (cps3)
- MAME 2003 (mame2003)
- MAME 2010 (mame)
- Amiga CD32 (amigacd32)
- Atari 2600 (atari2600)
- Atari 5200 (atari5200)
- Atari 7800 (atari7800)
- Mattel Intellivision (intellivision)
- NEC PCE Engine (pcengine)
- NEC PC Engine CD (pcenginecd)
- NEC Turbografx 16 (turbografx)
- NEC Turbografx 16 CD (turbografxcd)
- Nintendo Entertainment System (nes)
- Nintendo Famicom (famicom)
- Nintendo Famicom Disk System (fds)
- Nintendo Super Nintendo Entertainment System (snes)
- Nintendo Super Famicom (sfc)
- Nintendo 64 (n64)
- Sega SG‐1000 (sg‐1000)
- Sega Master System (mastersystem)
- Sega Megadrive (megadrive)
- Sega Genesis (genesis)
- Sega CD (segacd)
- Sega 32x (sega32x)
- Sega Saturn (saturn)
- Sega Dreamcast (dc)
- SNK Neo Geo (neogeo)
- SNK Neo Geo CD (neogeocd)
- Sony Playstation (psx)
- Atari Lynx (atarilynx}
- Bandai WonderSwan (wonderswan)
- Bandai WonderSwan Color (wonderswancolor)
- Nintendo GameBoy (gb)
- Nintendo Gameboy Advanced (gba)
- Nintendo Gameboy Color (gbc)
- Nintendo DS (nds)
- Sega Game Gear (gamegear)
- SNK Neo Geo Pocket (ngp)
- SNK Neo Geo Pocket Color (ngpc)
- Sony Playstation Portable (psp)