1
0
Fork 0
mirror of synced 2026-12-06 17:12:25 +00:00
No description
  • C++ 55.1%
  • C 16.4%
  • Python 10.7%
  • CMake 6.3%
  • Shell 5.8%
  • Other 5.7%
Find a file
andrei 1ab9124be8
Add settling delay before iBEC reconnect (#10)
## Summary

Adds a three-second delay before the iBEC reconnect to address a
possible USB dongle-specific timing issue.

The modification successfully resolved a similar issue during my
original testing using a 2023 MacBook Pro (M3 Pro) with a HyperDrive
HD5002GL USB dongle.

Related to #5.

## Testing

- [ ] Built on Apple Silicon (`arm64`). macOS version:
- [ ] Built on Intel (`x86_64`). macOS version:
- [ ] `ctest --test-dir build` passes
- [ ] `otool -L` output still matches `AGENTS.md` (if dependencies
changed)
- [ ] Tested on a real Apple TV. Model and firmware:

The original modification was successfully tested on an Apple TV 3
(A1469, 8.4.3). The reconstructed patch has not been retested.

## AI use disclosure

- [ ] No AI used
- [ ] AI assisted (I wrote it, AI helped with parts)
- [x] Mostly AI-generated

**Tool(s) and what they did:** GPT-6 assisted with the original
troubleshooting, and reconstructed the two-line patch

## Things I'm unsure of / haven't verified

- Whether the delay is still necessary with the latest upstream
improvements.
- Whether the issue is specific to my USB dongle.
- Whether the additional delay benefits other Apple TV models.
- Compilation and hardware testing against the current upstream
revision.
2026-12-01 19:45:38 -05:00
.claude Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
.github settings.yml: extend the shared settings from regulad/.github [no ci] 2026-11-22 11:16:29 -05:00
cainjector Add cainjector: a modern CA trust store, so HTTPS apt sources validate 2026-09-21 22:50:08 -04:00
debcache Blackb0x/Debs -> ./debcache, generated on Linux only 2026-09-18 20:04:26 -04:00
docs Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
entrypoint sshd is alive: delete the loader, document that --tether-boot is not needed 2026-09-21 20:38:03 -04:00
keys Bake boot-args into the iBEC: setenv boot-args is inert on this bootloader 2026-09-20 18:53:47 -04:00
misc Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
package Add a pre-commit config, and check text out as LF 2026-11-23 13:32:28 -05:00
pictures Add hardware photographs of the entrypoint and the finished install [no ci] 2026-09-22 15:05:53 -04:00
scripts Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
src Add settling delay before iBEC reconnect (#10) 2026-12-01 19:45:38 -05:00
third_party Publish firmware as patches against Apple's IPSW, not as firmware 2026-10-06 13:13:48 -04:00
tweaks Add native resolution tweak and consolidate tweak packaging 2026-09-23 16:38:29 -04:00
.gitattributes Add a pre-commit config, and check text out as LF 2026-11-23 13:32:28 -05:00
.gitignore Publish firmware as patches against Apple's IPSW, not as firmware 2026-10-06 13:13:48 -04:00
.gitmodules Publish firmware as patches against Apple's IPSW, not as firmware 2026-10-06 13:13:48 -04:00
.pre-commit-config.yaml Add a pre-commit config, and check text out as LF 2026-11-23 13:32:28 -05:00
AGENTS.md Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
CMakeLists.txt Retire .claude/TODO.md: its open work is #6, #7 and #8 2026-11-23 13:32:26 -05:00
CODE_OF_CONDUCT.md Add a pre-commit config, and check text out as LF 2026-11-23 13:32:28 -05:00
CONTRIBUTING.md Add contributor docs, issue forms and issue auto-assignment 2026-10-06 12:35:37 -04:00
LICENSE.md Eliminate loose libraries: split Patcher, vendor idevicerestore, unify libplist 2026-09-19 20:25:37 -04:00
README.md Add a pre-commit config, and check text out as LF 2026-11-23 13:32:28 -05:00

Blackb0x--

wakatime

Don't eWaste what can still be used!

Jailbreak tool for the 2nd/3rd-gen Apple TV, via the checkm8/SHAtter DFU-mode boot exploit. Side-loads Cydia (frontend nitoTV) + Kodi.

done

Additional features over the original blackb0x:

  • Works in 2026 with current apt repositories; features custom apt repository with backports
    • Includes working tailscale implementation (to my knowledge, first VPN ever made for the Apple TV 2/3)
  • Custom backport plugin repository for Kodi Helix (download here)
    • Jellyfin "Lite" available for streaming video & audio (uses hardware acceleration on the ATV, can achieve 768p30)
  • Restores ATV2 Appliance support to lowtide (the springboard/pineboard equivalent for Apple TV Software), allowing legacy tweaks and apps to appear on the UI
  • Restores additional resolution modes to Settings
  • Injects Debian 13 CAs into Apple TV Software, enabling the entire system to connect to current websites
  • apt-get configured to use the system SSL handlers (enables TLS 1.2 support, which a vast majority of the internet still supports)
  • Logs to screen during install process, making it easier to debug
  • GPL compliance (all unlicensed code from Blackb0x was either rewritten or properly vendored and attributed as a submodule)
  • Fully declarative payload configuration
  • First-class Apple Silicon Mac support (Rosetta 2 required for authoring pipeline; pre-built patches can be used for macOS > 27/Golden Gate)
  • Opportunistic use of pre-patched binaries built on GHA CD pipeline (eliminates the need to run legacy Xcode through Rosetta 2 nor build huge libraries)

Supported devices:

device latest firmware notes
AppleTV3,2 (A1469) tvOS 8.4.3 (formerly Apple TV Software 7.x) untethered only (tihmstar's etasonATV)
AppleTV3,1 (A1427) tvOS 8.4.3 (formerly Apple TV Software 7.x) untethered only; needs an Arduino running synackuk's checkm8-A5 to pwn DFU first; blackb0x picks up from there
AppleTV2,1 (A1378) tvOS 7.1.2 (formerly Apple TV Software 6.x) tethered only

Warning: AppleTV2,1 support has not been fully validated, please report any issues you encounter to the issues page.

Tip: if blackb0x-pwn is unreliable over a direct USB-C connection, put a plain (non-Thunderbolt) USB hub between the Mac and the Apple TV.

Please star this project if it helped you.

Requirements

Both targets need the Xcode Command Line Tools, plus Homebrew.

Tested hosts

Verified working on both ends of the range Apple currently spans:

host macOS notes
Apple Silicon (arm64) 26 Tahoe primary development host
Intel (x86_64) 11 Big Sur oldest verified host, and the oldest toolchain

Both architectures and both OS vintages are supported, not just the new one. Big Sur is the floor that matters in practice, because its clang is old enough to reject C++ that every newer compiler accepts — if you are changing anything under src/, see the C++17 conventions note in AGENTS.md before assuming a clean local build means a portable one.

Jailbreaking only

To build and run the jailbreak:

brew install cmake autoconf automake libtool pkg-config gh

gh is GitHub's CLI, and it is what lets blackb0x fetch CI's firmware patches and rebuild the suite from Apple's own IPSW instead of baking one. No Apple firmware is redistributed; only binary patches against it are. Sign in once with gh auth login. Without it you can still jailbreak, but you have to bake the firmware yourself, which needs root and everything in the next list.

Development/authoring

To additionally build the authoring tools (firmware baker, vendored apt, tests):

brew install git-lfs ldid afsctool dpkg python3 \
             berkeley-db@5 openssl@3 xxhash lz4 xz gettext

The baker also needs Theos for dm.pl ($THEOS, default ~/theos) and two old Xcodes available locally to build binaries.

Xcode For Why
Xcode_6.4.dmg AppleTV3,1 / AppleTV3,2 ld64-242.2, iPhoneOS8.4 SDK
Xcode_5.1.1.dmg AppleTV2,1 ld64-236.4, iPhoneOS7.1 SDK

Put both in ~/Downloads and the bake finds them; whole .dmgs are fine and are mounted read-only for the build. Point somewhere else with the XCODE_TOOLCHAIN=<dir> environment variable (an Xcode.app bundle, or a bare extracted toolchain root containing usr/bin/clang and SDKs/iPhoneOS<ver>.sdk) or XCODE_SEARCH_DIR=<dir> (a different place to look for the same names). Both are read straight from the environment by entrypoint/Makefile, so a CI job sets one variable and needs nothing else.

Almost everything else is vendored under third_party/ and built from source.

Build

git clone --recurse-submodules https://github.com/regulad/Blackb0x--.git
cd Blackb0x--
cmake -S . -B build
cmake --build build --target jailbreak -j"$(sysctl -n hw.ncpu)"   # jailbreak only: blackb0x and blackb0x-pwn
cmake --build build --target authoring -j"$(sysctl -n hw.ncpu)"   # authoring only: bake-firmware, vendored apt, tests, xpwntool

sysctl -n hw.ncpu is the macOS equivalent of nproc, which does not exist here.

bake-firmware must run as root, including --only bootchain. It writes into root-owned files on a mounted ramdisk. Its output in dist/ is handed back to the user who invoked sudo, so you will not need sudo to read or delete your own build artifacts.

Jailbreaking

  1. (3,1 only) Pwn DFU with the Arduino first.
  2. (Optional.) Nothing to do here if you have gh — blackb0x fetches the firmware it needs on its first run, as described under "Firmware" above (make sure you have logged into gh). To bake it yourself instead:
    sudo env "PATH=$PATH" "THEOS=$THEOS" ./build/bake-firmware
    
    That does every known device/firmware combination, which is far more than you need. Narrow it with --device and --build: when a suite is missing, blackb0x names the exact device and build it wants — and, if it cannot bake one itself, spells out the bake-firmware command for it. Existing output is skipped unless you pass --force.
  3. Connect the Apple TV by micro-USB and plug in its power cable. If you would like to see the jailbreak live, you'll also need to connect an HDMI cable. You may need to file down the top and bottom of the micro-USB-B male and HDMI male terminations respectively to get them to both fit in the confined space.
  4. Run ./build/blackb0x.
  5. Follow the in-terminal instructions to enter DFU mode.
  6. Let blackb0x attempt checkm8. This could take a couple of tries. If it fails, you will need to power-cycle your Apple TV.
  7. Once blackb0x has succeeded in sending the payload via checkm8, you'll see a screen similar to the one below after a minute or two. entrypoint
  8. Once the payload finishes injecting the jailbreak to your Apple TV's storage, your Apple TV should go to the "connect to iTunes for recovery" screen. Remove all cords from the Apple TV, then plug back in only power and HDMI.
  9. After you see the home screen, your Apple TV should be Jailbroken.
  10. You can now attempt to connect via SSH, user root. See scripts/ for a helper script that pushes your public key to the Apple TV. If you prefer to authenticate with password, the default password is alpine.
  11. If ssh is working, great! Kodi and nitoTV are being installed in the background, they should appear after a few minutes depending on your internet connection. If you do not have an internet connection, ssh will still work over usbmuxd, but installing Kodi will be deferred until the next boot.

Development

AGENTS.md has the repo conventions and build details. docs/HISTORY.md has the full port and debugging history.

Credits

NSSpiral

  • Original Blackb0x

dora2ios

  • iBSS loader for AppleTV3,1

tihmstar

  • etasonATV jsc untether
  • answering questions about patches

zzanehip

  • updated CBPatcher (Created by Jonathan Seals)
  • updated iBoot32Patcher (Created by iH8sn0w)
  • updated xpwntool (Created by planetbeing)

a1exdandy, synackuk, nyan_satan

  • checkm8-A5

axi0mx

  • checkm8

p0sixninja

  • SHAtter