Take 2 Full Update

From AwkwardTV

What follows are step by step instructions for upgrading your Apple TV to the 2.0 (Take 2) software, and then loading back on all the "extras". First thing to do is grab all the required files and put them in a folder called AppleTVUpdate which is located on your desktop.

From Flip4Mac:
- Flip4Mac WMV Import.component - provides windows media support
Note: The above files (with exception of the .DMG) can be found under /Library/Audio/Plug-Ins/Components and /Library/QuickTime, if you have Perian (and Flip4Mac) installed on your Intel Mac.

--Emanuele.mazza 15:29, 6 August 2008 (CEST) I have downloaded the above and opened it with HFSExplorer, and neither mount_smbfs nor the other files are available. Any hint ?

Before you begin:

All commands are to be run one at a time. Do not try pasting everything in and running all at once.

If you plan on attaching an external USB drive to a 2.0/2.1 Apple TV, you probably want to be able to transfer files via AFP. If so, you need to create a restore.dmg from a 1.0 factory Apple TV before you go to step 1.

5) Install AFP

Both the processes listed below (Auto and Manual) presume a 1.0 recovery partition on the AppleTV, and have been tailored towards that. Many of the files can likely be gotten from the 10.4.9 combo updater, but probably not all (this needs to be verified)--BonesSK 03:16, 9 April 2008 (CEST). A full install of 10.4.9 on an Intel Mac would also do nicely, but both the script and the manual process would need to be tweaked in order to properly get and place the files.

If you are running leopard 10.5+, you may want to install 10.4 onto an external drive (USB drive, firewire, iPod etc) to get files. --BonesSK 03:30, 9 April 2008 (CEST)

At this time there seems to be more success with the manual process, than with the automatic process. --BonesSK 03:30, 9 April 2008 (CEST)

Make sure the path to OS.dmg is correct, then run sudo sh afpinstall.sh

For Apple TV v2.0 or later (including 3.0) - Out of the box

This is my trick to get AFP working on my AppleTV 2.3 and might also work on previous versions. Now i can mount my ATV disks and manage it's content more easy. It's inspired on kupan787's script. Instead of the 10.4.9 update.dmg that kupan787 uses i picked my 10.4.8 update DVD from my macbook.
It works on AppleTV 3.0

## created by CousinCocaine
## spring 2009
## credits for the author below, cause this is based on his work
## Author: kupan787
## The files with: "##### NOT ON THE 10.4.8 DVD." are not necessary to get stuff working. I did not use them myself.
## my fix to get AFP running on ATV.
## from now on you can mount your ATV disks
## get the files from your OSX install DVD 10.4.8
## - extract the Archive.pax.gz achive.
## - copy the files to the right place on your ATV
## - edit /etc/hostconfig and set: AFPSERVER=-YES-
## - reboot your ATV
## - logon to your ATV -> Finder -> Command-K -> afp://appletv.local (frontrow:frontrow)
## - say thnx ;)
From archive to ATV -> System/Library/Frameworks/AppleShareClient.framework /System/Library/Frameworks/
From archive to ATV -> System/Library/Frameworks/AppleShareClientCore.framework /System/Library/Frameworks/
From archive to ATV -> System/Library/Frameworks/AppleTalk.framework /System/Library/Frameworks/
From archive to ATV -> System/Library/Filesystems/AppleShare /System/Library/Filesystems/
Create symbolic link -> System/Library/Filesystems/AppleShare/afpfs.kext /System/Library/Filesystems/afpfs.fs
From archive to ATV -> System/Library/CoreServices/Tokenizers /System/Library/CoreServices/
From archive to ATV -> System/Library/CoreServices/AppleFileServer.app /System/Library/CoreServices/
From archive to ATV -> System/Library/PrivateFrameworks/ByteRangeLocking.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/BezelServices.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/CommonCandidateWindow.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/DMNotification.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/OpenTransport.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/Calculate.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/ContentIndex.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/LatentSemanticMapping.framework /System/Library/PrivateFrameworks/
From archive to ATV -> System/Library/PrivateFrameworks/SystemUIPlugin.framework/ /System/Library/PrivateFrameworks/
From archive to ATV -> usr/bin/a2p /usr/bin/
From archive to ATV -> usr/bin/atlookup /usr/bin/ ##### NOT ON THE 10.4.8 DVD. It doesn't needed in my ATV 3.0
From archive to ATV -> usr/bin/certtool /usr/bin/
From archive to ATV -> usr/lib/libXplugin.1.0.dylib /usr/lib/
From archive to ATV -> usr/lib/libXplugin.1.dylib /usr/lib/
From archive to ATV -> usr/lib/libXplugin.dylib /usr/lib/
From archive to ATV -> usr/lib/pam/pam_afpmount.so /usr/lib/
From archive to ATV -> usr/lib/pngtclConfig.sh /usr/lib/
From archive to ATV -> usr/lib/sqlite3/libtclsqlite3.dylib /usr/lib/sqlite3/
From archive to ATV -> usr/lib/tcldomxmlConfig.sh /usr/lib/
From archive to ATV -> usr/lib/tdomConfig.sh /usr/lib/
From archive to ATV -> usr/lib/tifftclConfig.sh /usr/lib/
From archive to ATV -> usr/lib/tkimgConfig.sh /usr/lib/
From archive to ATV -> usr/lib/xsltConf.sh /usr/lib/
From archive to ATV -> usr/lib/zlibtclConfig.sh /usr/lib/
Create symbolic link -> System/Library/CoreServices/AppleFileServer.app/Contents/MacOS/AppleFileServer /usr/sbin/AppleFileServer
From archive to ATV -> usr/sbin/appletalk /usr/sbin/ ##### NOT ON THE 10.4.8 DVD. It doesn't needed in my ATV 3.0
From archive to ATV -> usr/sbin/automount /usr/sbin/ ##### NOT ON THE 10.4.8 DVD. It doesn't needed in my ATV 3.0
From archive to ATV -> usr/sbin/blued /usr/sbin/ ##### NOT ON THE 10.4.8 DVD. (bluetooth connection, not necessary i guess.). It doesn't needed in my ATV 3.0
From archive to ATV -> usr/sbin/named /usr/sbin/
From archive to ATV -> usr/sbin/named-checkconf /usr/sbin/
From archive to ATV -> usr/sbin/named-checkzone /usr/sbin/
From archive to ATV -> usr/sbin/portmap /usr/sbin/ ##### NOT ON THE 10.4.8 DVD. It doesn't needed in my ATV 3.0
From archive to ATV -> usr/sbin/slp_reg /usr/sbin/
From archive to ATV -> usr/sbin/slpd /usr/sbin/
From archive to ATV -> usr/sbin/tim /usr/sbin/
From archive to ATV -> usr/sbin/timutil /usr/sbin/
From archive to ATV -> usr/sbin/xinetd /usr/sbin/
From archive to ATV -> sbin/mount_afp /sbin/ ##### It doesn't needed in my ATV 3.0

--Yargok 18:49, 5 March 2008 (CET) Does anyone have a similar procedure for those who have a recovery partition of 1.1?
--pheno 14:20, 12 March 2008 (CET) Please note if you will use the command "sudo cp -pRvn /Volumes/OSBoot\ 1/* /" to run aftwards "/usr/sbin/diskutil repairPermissions"
--Elchubi 09:10, 6 April 2008 (CEST) With the "owners on" flag when attaching the OS.dmg, the repairPermissions it is no longer required. Take 2 plus all the 1.0 files ! :)

6) Reboot AppleTV

on AppleTV

sudo reboot

7) Install USB

on Mac

Download the update DMG that corresponds to the 2.x version you are currently running on your Apple TV. For example if you are running 2.3 download Take 2.3 DMG and mount it.Apple doesn't keep online older update DMGs, Apple TV firmwares has links to most versions that are still available from Apple.

Copy the file mach_kernel.prelink from the mounted image (it is in the root directory) and place it in the same folder as the kernel patcher files you just extracted.

Open up terminal and do the following:

cd (to the directory you have the kernel patching files)
./do_usb_patch.sh

--Bloo 08:49, 9 March 2008 (CET) Running ./prelink_tool -d mach_kernel.prelink mach_kernel_patched.bin fails with: Bus error.. thoughts?
--blues 08:46, 16 March 2008 (CET) Problem occurs because of binary incompatibility with the tools. One solution is to recompile source on your system.
--topshotta 17:09, 19 April 2008 (EST) If you don't have a recovery dmg see iClarified for instructions. Works for 2.0.2 as well.

Note: the offsets have changed in 2.0.1 and higher (tested up to 2.3), thanks to jphelp32 on the forum for clarifying this.

The 2.0.1 patch is tested and works! --Nito 12:28, 1 April 2008 (CEST)
I also tried it on 2.0.2 and 2.1: it works. --FCorthay
The patch works on 2.3 --Olethros
It doesn't works on 3.0

Once the kernel is patched, rename it to mach_kernel.prelink and place it in your AppleTVUpdate folder on your desktop

Download Turbo's Apple TV kernel extension enabler turbo_atv_enabler.bin and place it in your AppleTVUpdate folder on your desktop. Rename it to turbo_kext_enabler.bin (this is for compatibility as most guides and scripts refer to this enabler by it's old file name)

To obtain the kexts, use Pacifist and it's search function to extract only the needed files. They can be found in either 10.4.9 Combo Update (Intel) or the recovery.dmg created earlier in this guide.

Once all the files are ready in the AppleTVUpdate folder on your desktop, copy them to your Apple TV using scp:

8) Install MacFUSE/sshfs

This will allow you to access appletv files from your mac. If you have an external hard disk, instead of attaching it to your machine, attach it to your apple tv. Your apple tv can access the media and your laptop can access the files wirelessly from anywhere. Also avoids using the command line and good for copying files back to your laptop from your apple tv.

One problem with Take 2 is that installing kerberos is a big pain, so you always need to use ssh v1. To make sure sshfs understands this, edit your ~/.ssh/config (or create it) and add

Host appletv.local
HostName appletv.local
User frontrow
Protocol 1

After that, you can run sshfs and in connect dialog, put in hostname as AppleTV.local, password as frontrow. I put in the optional root dir as / but you can leave it empty and it will default to the home dir on apple tv.

If the above command is not set to allow all users it will not possible to use screen sharing in OS X but you will need a dedicated client

--ColdCowboy 06:06, 11 September 2008 (CEST) Once you're sharing a screen with your ATV how do you control it? Keyboard and mouse don't work

11 September 2008 - Ya how do you control it, i tried rebooting finder but no luck is there something im missing? all i want to do is install SimplifyMedia.dmg so i can share my music with my iPhone

12) Disable Updates

To prevent future updates from breaking your custom Apple TV don't forget to add the Apple update site to your hosts file as a loop back:

a) on AppleTV

sudo bash -c 'echo "127.0.0.1 mesu.apple.com" >> /etc/hosts'

13) Reboot the AppleTV

a) on AppleTV

sudo reboot

Watchdog

--Elchubi 09:55, 6 April 2008 (CEST) Success! Watchdog is on the kernel... Just replace /mach_kernel.prelink with the one from 1.0 and follow the same steps from that version. Some things stop working like AirTunes, so it is a tradeoff

Aftermath

At this point your AppleTV should come back up with full 1080i/1080p support, AirTunes working, HD Rentals working, AFP running, USB working (and the drive should automount), ATVFiles should be running, and ssh should be working. You can access your apple tv from your laptop just like some other shared disk.