Skip to content

Instantly share code, notes, and snippets.

View CodeZombie's full-sized avatar
🌵

Jeremy Clark CodeZombie

🌵
View GitHub Profile
@CodeZombie
CodeZombie / baseline.fex
Created September 29, 2026 16:30
baseline fex
[product]
version = "100"
machine = "evb"
[platform]
eraseflag = 0
next_work = 2
[target]
boot_clock = 1008

How to extract the .fex file from the SD card dump of a GA36-MB firmware.

  1. Install bin2fex via sunxi-tools: https://linux-sunxi.org/Sunxi-tools
  2. Find the offset of script.bin: grep -obUaP "product\x00" sdcard.img | awk -F: '$1>20000000 && $1<20400000'
  3. That will give you some offsets. Try them in reverse order, subtracting 16.
  4. dd if=sdcard.img of=script.bin bs=1 skip=<the offset you just found - 16> count=131072 status=progress
  5. Attempt to convert it: bin2fex script.bin > hardware.fex
  6. If it gives you an error, try the other offset(s) you found.

NOTE: script.bin will exist in the first 128mb of the sdcard, so you can cut that out first before step 2 if you want to save time.

@CodeZombie
CodeZombie / ga36mbv1.x_mount_guide.md
Last active November 4, 2026 03:03
GA36-MB microSD Card Fix/Mount Guide

GA36-MB V1.x MicroSD Card Mount/MBR Fix Guide

Preamble

The Master Boot Record on the stock microSD card that comes with the GA36-MB v1.x is broken.

Master Boot Record (MBR) is a table at the very beginning of the microSD card that tells your computer about all the partitions on the card.

MBR takes up exactly 512 bytes, and must end with the two bytes 0x55 and 0xaa

Through some series of mistakes, negligence, or general incomptence, the manufacturer of the ga36mbv1.2 has set these two bytes instead to 0xc3 and 0x5a. This means no operating system will enumerate the table, and no partitions will be mountable.

@CodeZombie
CodeZombie / ga36-mb_v1.2-20260416.fex
Created July 26, 2026 01:22
ga36-mb_v1.2-20260416.fex
[product]
version = "100"
machine = "evb"
[platform]
eraseflag = 0
next_work = 2
[target]
boot_clock = 1008
@CodeZombie
CodeZombie / ga36-mb-v1.2.md
Last active October 13, 2026 17:12
GA36-MB V1.2-20260416 investigation

GA36-MB V1.2-20260416 [The latest(?) fake r36s]

So I got scammed.

I was trying to buy a proper r36s clone so I could play Stardew Valley in the bathtub. My mistake. Instead, I ended up with a "GA36-MB." Identical in every way from the outside, this little guy is quite the imposter. The CPU is allegedly not a Rockchip RK3326, but an Allwinner A33. From a performance perspective that's a little bit of a downgrade, but the real kicker is that the rockchip is a 64 bit chip and the allwinner is 32. More like allloser amirite. I'm not 100% convinced that this is the case though, I've seen a lot of conflicting information on this, so I intend to put the question to rest, though I'm hoping it's a rockchip.

(Spoiler alert: It's not a rockchip. It's a 32-bit allwinner with 512mb of ram.)

@CodeZombie
CodeZombie / code.c
Last active January 24, 2026 06:10
esp_lcd ili9341 initialization
#include "esp_lcd_panel_io.h"
#include "esp_lcd_panel_vendor.h"
#include "esp_lcd_panel_ops.h"
#include "esp_lcd_ili9341.h"
#define SPI_HOST SPI2_HOST // FSPI on S2
esp_lcd_panel_handle_t panel_handle;
void initialize_ili9341() {
@CodeZombie
CodeZombie / instructions.md
Last active October 22, 2026 13:38
[Linux] ESP-IDF devcontainer setup.

Hello!

I'm going to walk you through setting up the ESP-IDF inside of VSCode with Devcontainers.

This worked for me with the immutable fedora-based distro Aurora, though the steps should be similar for any distro.

For non-immutable (mutable?) linux distros you don't have to install the base ESP-IDF in a devcontainer, though I would still recommend it.

Installing the prerequisites

  1. Install VSCode. In Aurora this is easy, just enable dev mode: ujust devmode.
@CodeZombie
CodeZombie / esp-idf-fix.md
Last active January 2, 2026 01:07
esp-idf in a Dev Container on Immutable Fedora

Steps to fix the "spawn udevadm ENOENT" error inside the ESP-IDF dev container.

  1. Launch the dev container in vscode and open a terminal.
  2. Open a terminal. Confirm that you're in the remote devcontainer terminal, and not on your host system.
  3. apt-get update
  4. apt-get install udev
  5. Now in your devcontainer.json file, add this to the end of the dict:
  "runArgs": [
    "--device=/dev/ttyACM0",
 "--privileged"
@CodeZombie
CodeZombie / plugin.cfg
Created November 1, 2025 22:24
PolyTools
[plugin]
name="PolyTools"
description="Adds tools to the inspector to make editing a Polygon2d a little easier."
author="CodeZombie"
version="1.0"
script="polytools_plugin.gd"
@CodeZombie
CodeZombie / delay.py
Last active October 28, 2025 02:25
ComfyUI Delay Node
import time
class DELAY:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required": {