From AwkwardTV
Revision as of 23:12, 16 April 2007 by Alan quatermain (talk | contribs) (Updated video link to point to the latest ATVLoader video)
Jump to: navigation, search

This is the page about Project Patchstick, a 100% legal way to open up the ATV for hacking without having to open the case.


Proof of concept is found Here

Primary Goals

  • Build our own Darwin kernel that boots on the ATV (Booting from a USB Thumbdrive is a great help) (using semthex's kernel will do)
  • Build our own sshd (probably dropbear)
  • Install sshd on the ATV, enable it

Secondary goals

Steps to be taken

  • get a homebrew Darwin kernel to boot up (kernel boots, working on kexts -- macTijn)
  • build boot scripts that upload the sshd binary to the ATV, and enable it



XML format for fetching additional plugins

The idea is to have an XML format for fetching information on available plugins that is as easy as possible and as flexible as necessary. Please comment.

alan_quatermain is working on a frappliance that uses this data.

<?xml version="1.0" encoding="utf-8"?>
    <title>My Great New Frappliance</title>


Once the user clicks that, mygreatnewfrappliance XML gets loaded:

<?xml version="1.0" encoding="utf-8"?>
    <title>My Great New Frappliance</title>
    <author>Joe Doe</author>
    <icon url="" />
    <screenshot url="" />
    <enclosure url=""  md5="5655cc6f7d1ba118665fe14be41ad296" length="5650889" type="application/tgz" />
    <pubDate>Wed, 8 Jun 2005 19:00:00 GMT</pubDate>
    <copyright>© Copyright 2007 Joe Doe</copyright>
    <keywords>(set of keywords to be defined)</keywords>
            <subtitle>Cooking plugins is fun!</subtitle>
            <summary>This plugin doesn't really exist, but here we have one sentence of description saying what it does and why it is so insanely great.</summary>
            <description>A longer description here, up to one screen page</description>

Code ideas


# Initial ideas for AwkwardTV Patchstick Script to be done
# by phoem at
# v20070331.0
# V0.2 fixes path issues, since the system links /etc/ to the media volume thats where the configs need to be adjusted and set

# Set a source and target to make it easier to test the
# script's actions.

echo -n "Disabling watchdog..."
mkdir $media_target/Scratch/private/etc/mach_init.disabled
mv $media_target/Scratch/private/etc/mach_init.d/ripstop.plist $media_target/Scratch/private/etc/mach_init.disabled
echo "$source/sbin/kextunload -b" >> $media_target/Scratch/private/etc/rc.local 
echo "done"
echo -n "Installing sshd..."
cp $source/usr/sbin/sshd $target/usr/sbin/
cp $source/System/Library/LaunchDaemons/ssh.plist $target/System/Library/LaunchDaemons/ssh.plist
echo "done"
echo -n "Installing various programs..."
cp $source/usr/bin/sort $target/usr/bin/sort
cp $source/usr/bin/nidump $target/usr/bin/nidump
cp $source/usr/bin/passwd $target/usr/bin/passwd
cp $source/usr/bin/du $target/usr/bin/du
cp $source/usr/bin/kdump $target/usr/bin/kdump
cp $source/usr/bin/ktrace $target/usr/bin/ktrace
cp $source/usr/sbin/kextstat $target/usr/sbin/kextstat
cp $source/usr/bin/gdb $target/usr/bin/gdb
cp $source/usr/bin/vim $target/usr/bin/
cp $source/usr/bin/nc $target/usr/bin/
cp $source/usr/bin/diff $target/usr/bin/
cp $source/usr/bin/strings $target/usr/bin/
cp -pRvf $source/usr/libexec/gdb $target/usr/libexec/
cp -pRvf $target/System/Library/PrivateFrameworks/PlatformHardwareManagement.framework $target/System/Library/PrivateFrameworks/
cp $source/usr/bin/bspatch $target/usr/bin/
cp $source/usr/bin/bzip2 $target/usr/bin/
echo "done"

I've added a source and target variable to the script so you can test the script without having to clean up your Apple TV and restart. This should make testing on a dev box easier.

I also note that the line copying PlatformHardwareManagement.framework is a little confusing... Why are we copying this framework to itself? Running the cp will just complain that it's the same file, so should we be copying it elsewhere or from the source rather than the target?