the ipod nano 7g is the last nano and the least documented one. it has a samsung s5l8740 (a cortex-a5, 64 mib of dram), a 240×432 display, and a bootrom that wInd3x can talk into running unsigned code. on the n7g the tool uses s5late to bring back the wInd3x-style bug, then uploads a payload over dfu. haxed dfu is temporary and lives entirely in sram; a reboot puts the ipod back to normal
the part where macos lies to you
haxed dfu is easy to verify on linux. send the payload, read string descriptor 2, expect haxed dfu. on macos the same read kept returning the old product string, every time. this is not a timing problem and retrying does not help: iokit keeps the string descriptors from the enumeration, and re-reading them through the same device handle returns the cached copy. the exploit had worked; the check was looking at a stale string
the way out is to make the host enumerate the device again, without cutting power. libusb_reset_device does exactly that on macos. it maps to USBDeviceReEnumerate, which apple documents for firmware update use: the device is terminated and enumerated again as if it had just been plugged in. the exploit is in sram, so it survives the bus reset. i added a small Reset to the usb interface and used it only on darwin:
func (d *desktopUsb) Reset() error {
hadInterface := d.done != nil
if hadInterface {
d.done()
d.done = nil
}
if err := d.usb.Reset(); err != nil { // libusb_reset_device
return err
}
if hadInterface {
return d.UseDefaultInterface()
}
return nil
}
there was a second paper cut. the wtf stage's dfu stack stalls the first DFU_CLRSTATUS if you talk to it immediately after it enumerates. cfw run already retries the whole upload ten times; my demo sender did not. so even after the descriptor check was fixed, sending the next stage failed once and looked like a different bug
the second stage does the hard part
the panel is mipi dsi, and the bootrom does not initialize it. wtf does. it is the second stage that runs from usb dfu, brings up dram and the display, and then loads the next image. by the time our payload runs, the dsim and panel are alive. this is the same split the linux port relies on: the n31 tiny-drm driver says it makes use of “the already set up mipi dsim by the bootloader”
that means the payload does not need a panel init sequence. it talks to the lcdif window at 0x38300000: status at 0x1c with a busy bit at 0x10, write data at 0x40. one little-endian xrgb8888 word per busy-poll
void lcd_put(uint32_t px) {
while (LCD_STATUS & LCD_BUSY) {
}
LCD_WDATA = px;
}
the image is linked at 0x08000000 and sent with wInd3x cfw run. that command boots haxed dfu, uploads the defanged wtf, waits for the device to switch, and hands it a flat binary wrapped in an img1
red, then a picture, then a qr code

the first payload was 104 bytes: fill the screen with 0x00ff0000 and halt
the second one added a small p6 ppm parser and nearest-neighbor scaling to 240×432. the ppm is embedded with .incbin, so the firmware stays a single flat binary. the third one draws a qr code: a 29×29 matrix generated once for this post's url, scaled to 222×222 with a four-module quiet zone, and rendered word by word
for (uint32_t y = 0; y < HEIGHT; y++) {
for (uint32_t x = 0; x < WIDTH; x++) {
uint32_t px = 0;
if (x >= X0 && x < X0 + SIDE && y >= Y0 && y < Y0 + SIDE) {
int mx = (int)(x - X0) / SCALE - QUIET;
int my = (int)(y - Y0) / SCALE - QUIET;
int white;
if (mx < 0 || mx >= QR_SIZE || my < 0 || my >= QR_SIZE) {
white = 1; /* quiet zone */
} else {
white = !black(mx, my);
}
if (white) {
px = 0x00ffffff;
}
}
lcd_put(px);
}
}
whats left?

this chain is still tethered. the panel init belongs to wtf, so these demos only work after cfw run; there is no backlight control, no storage, and no gpio. the qr matrix is fixed at build time, and the ppm path only accepts binary p6 with maxval at most 255. the macos fix is small, but it is the difference between “haxed dfu” and “i guess it worked”