Islet/tools/fat.py
astar76 c88455c759 Islet 0.7.6: a Dynamic Island for notched iPhones
SpringBoard tweak for the iPhone XR on iOS 18.7.1 (Dopamine rootless),
built without Theos using the swift.org clang and linked on the phone.

The island shows music with Apple's audio analyzer and live lyrics, timers,
calls, flashlight, screen recording, accessories and their batteries, calendar,
notifications with actions, and system popups, in portrait and landscape.
Includes a Settings page, a Watch ping hook, an offscreen self test and the
tools that capture the showcase video.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:03:58 -06:00

12 lines
621 B
Python
Executable file

#!/usr/bin/env python3
# fat.py out in1 in2 ... : combine thin Mach-O files into a fat binary.
import struct, sys
out, ins = sys.argv[1], sys.argv[2:]
slices = []
for p in ins:
d = open(p, 'rb').read(); ct, cs = struct.unpack('<II', d[4:12]); slices.append((ct, cs, d))
hdr = 8 + 20 * len(slices); off = hdr; ents = b''; body = b''
for ct, cs, d in slices:
al = 14; off = (off + (1 << al) - 1) & ~((1 << al) - 1)
ents += struct.pack('>IIIII', ct, cs, off, len(d), al); body += b'\0' * (off - hdr - len(body)) + d; off += len(d)
open(out, 'wb').write(struct.pack('>II', 0xcafebabe, len(slices)) + ents + body)