<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>William Zhou &#187; appletv</title>
	<atom:link href="http://williamzhou.com/blog/tag/appletv/feed/" rel="self" type="application/rss+xml" />
	<link>http://williamzhou.com/blog</link>
	<description>My personal blog with a touch of the latest technology news.</description>
	<lastBuildDate>Wed, 24 Dec 2008 04:38:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hackin&#8217; the AppleTV</title>
		<link>http://williamzhou.com/blog/2008/12/hackin-the-appletv/</link>
		<comments>http://williamzhou.com/blog/2008/12/hackin-the-appletv/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 04:15:21 +0000</pubDate>
		<dc:creator>William</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[appletv]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://williamzhou.com/blog/?p=497</guid>
		<description><![CDATA[It&#8217;s been a while since my last post (as usual). In the past month, while I was bored, I was hacking away with my AppleTV. I wanted to accomplish a few things:

Live TV
Web browsing


Ever since I bought my AppleTV, I cancelled my cable television since I usually digest news from the Internet; not to mention [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since my last post (as usual). In the past month, while I was bored, I was hacking away with my AppleTV. I wanted to accomplish a few things:</p>
<ol>
<li><strong>Live TV</strong></li>
<li><strong>Web browsing</strong></li>
</ol>
<p><img class="aligncenter size-full wp-image-498" title="overview_hero1_20080929" src="http://williamzhou.com/blog/wp-content/uploads/2008/12/overview_hero1_20080929.jpg" alt="overview_hero1_20080929" width="474" height="328" /></p>
<p>Ever since I bought my AppleTV, I cancelled my cable television since I usually digest news from the Internet; not to mention that Global News puts out a <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=192755304">video podcast</a> every day so I don&#8217;t miss out on traditional daily news. Alright, after a month or so, I started to miss live television (even the ads!). So I was thinking how I can utilize my AppleTV to achieve this. I could obviously just run a program on my desktop machine and plug the monitor cable (VGA) into my TV, but I don&#8217;t want to do that. Why? Because I own a hacked AppleTV! Other than that, many other people don&#8217;t have a VGA ports for their TV. So the hack begins&#8230;</p>
<p>First, I looked at Joost, a peer-to-peer TV technology to distribute content. It&#8217;s great because the Joost Team actually <a href="http://www.joostteam.com/2007/03/27/joost-successfully-run-on-apple-tv/">state</a> that it works on a hacked AppleTV, but I soon realized that it&#8217;s not live, and they have recently <a href="http://lifehacker.com/5112494/joost-discontinues-its-desktop-client-now-web-only">discontinued their desktop version</a> so I gave up on it quickly. I searched around for some P2P live TV application. It has to be a Mac application but they are all for Windows (TVAnts, PPLive, etc). I figure that AppleTV can&#8217;t handle WINE and Windows Apps since it doesn&#8217;t have &#8220;real&#8221; hardware. Just as I was about to give up the whole project, I saw a tweet about a new application called Livestation, a P2P live television program which works on many platforms. Now, assuming that your AppleTV is &#8220;hacked,&#8221; you may now proceed which these instructions. If it&#8217;s not, there are many <a href="http://wiki.awkwardtv.org/wiki/Main_Page">tutorials</a> on how to do this as well as a <a href="http://www.atvflash.com/index.php">paid solution</a>.</p>
<ol>
<li> Download the Mac version of <a href="http://www.livestation.com/account/get_file?platform=MACOSX-I386">Livestation</a> on to your computer</li>
<li> SSH in to your AppleTV. Or FTP/SFTP/whatever. Just get in there so you can transfer a file.</li>
<li> I have a Applications directory inside frontrow&#8217;s home directory. You can create this or you can put the app somewhere else as long as you know the path to it.</li>
<li> Transfer your Livestation.app to your Applications folder in your AppleTV. And yes, you will discover that apps are actually folders.</li>
<li> /Users/frontrow/Documents/Applist.plist</li>
<li> If you don&#8217;t have the file I mentioned in 5, create it.</li>
<li> Copy these in there:</li>
</ol>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;!DOCTYPE plist PUBLIC &#8220;-//Apple Computer//DTD PLIST 1.0//EN&#8221; &#8220;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#8221;&gt;<br />
&lt;plist version=&#8221;1.0&#8243;&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;Applications&lt;/key&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;0&lt;/key&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;args&lt;/key&gt;<br />
&lt;string&gt;&lt;/string&gt;<br />
&lt;key&gt;remotewatcher&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;fireandforget&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;menu&lt;/key&gt;<br />
&lt;string&gt;Livestation&lt;/string&gt;<br />
&lt;key&gt;killfinder&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;path&lt;/key&gt;<br />
&lt;string&gt;/Users/frontrow/Applications/Livestation.app/Contents/MacOS/Livestation&lt;/string&gt;<br />
&lt;/dict&gt;<br />
&lt;/dict&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;</p></blockquote>
<p>It&#8217;s pretty obvious that after you hacked your AppleTV, you will find an Application Menu buried somewhere in the menu. Go there, press on Livestation. It should load up now. Enter your credentials, which you registered freely on their <a href="http://livestation.com/account/register">website</a>. You can use this to manage your channels. Except&#8230; how do you control the app itself? You have a few options: install VNC or to enable USB keyboard and mouse. I will be talking about the VNC way since all the keyboards that I have are PS/2. However, you can always go old fashioned with keyboard and mouse. In fact, you can either <a href="http://wiki.awkwardtv.org/wiki/Firefox#Enabling_USB_for_keyboard_and_mouse_support">patch the kernel</a> yourself or you can use the smart installer. Chances are that you can just plug in  that USB keyboard since you already have done parts of this hack before. Just full screen Livestation and enjoy live TV channels! Throughout the testing stage, I did notice some stutters in fast motion. This is because of AppleTV&#8217;s weak hardware. It&#8217;s not too bad &#8211; definitely not too bad for this little AppleTV. At the end, I am very happy with Livestation on my AppleTV.</p>
<p>Next, web browsing. Let me just give you an overview of what I am going to do.</p>
<ol>
<li> Install a browser</li>
<li> Install <a href="http://en.wikipedia.org/wiki/Vnc">VNC</a> for 2.x firmware AppleTV&#8217;s</li>
<li> Use iPod Touch or iPhone to control it</li>
</ol>
<p>No. 1 is very simple. In fact, it&#8217;s the same step as installing Livestation since that&#8217;s how you &#8220;install&#8221; any applications on to your AppleTV.<br />
After moving your browser application to your AppleTV under that Applications folder. I am using Opera (Mac version duh!) here since it&#8217;s actually lighter than another of the other browsers (but I am a huge Firefox fan on the desktop!). Add these lines to that plist file just before the last &lt;/dict&gt;.</p>
<blockquote><p>&lt;key&gt;2&lt;/key&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;args&lt;/key&gt;<br />
&lt;string&gt;&lt;/string&gt;<br />
&lt;key&gt;remotewatcher&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;fireandforget&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;menu&lt;/key&gt;<br />
&lt;string&gt;Opera&lt;/string&gt;<br />
&lt;key&gt;killfinder&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;path&lt;/key&gt;<br />
&lt;string&gt;/Users/frontrow/Applications/Opera.app/Contents/MacOS/Opera&lt;/string&gt;<br />
&lt;/dict&gt;</p></blockquote>
<p>If you do want Firefox on your AppleTV, go <a href="http://wiki.awkwardtv.org/wiki/Firefox">here</a>. In fact, read how to enable USB for keyboard and mouse, installing System Preferences and mouse pointer. You are done with no. 1. Don&#8217;t bother starting the browser since you can&#8217;t control it. Getting VNC running on your AppleTV can be a little tricky so you may want to use a old fashioned USB keyboard.<br />
I don&#8217;t remember where I got this from since I have looked through so many sites to get information about VNC on AppleTV 2.x firmware. Whoever posted the instructions, kudos to him or her.</p>
<p>Again, this is for AppleTV 2.x firmware. If you have 1.0 firmware you are lucky. Search around on Google and it&#8217;s just a few command lines to enable VNC!</p>
<ol>
<li> Get the 1.0 recovery disk. Its name is OS-dot-DMG 1.0.dmg.</li>
<li> Transfer the file to frontrow&#8217;s home directory.</li>
<li> If you are on Mac, open Terminal.app. If you are on PC. Download <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">putty</a>. Then SSH (using version 1) to your AppleTV. Command: ssh -1 frontrow@*address here* Usually the address is just 192.168.1.x</li>
<li> Password is frontrow. I think you know this already. Once you are in, run the command &#8220;ls&#8221; to verify that OS-dot-DMG 1.0.dmg is in fact in the directory.</li>
<li> Time to enter some commands:<br />
First, we mount the dmg, then we move some files to the local drive. After that, we configure VNC (RemoteManagement) and we run it!</li>
</ol>
<blockquote><p>sudo hdiutil mount OS-dot-DMG\ 1.0.dmg<br />
sudo cp -pr /Volumes/OSBoot\ 1/System/Library/CoreServices/RemoteManagement/ /System/Library/CoreServices/RemoteManagement<br />
sudo cp -pr /Volumes/OSBoot\ 1/System/Library/Perl/ /System/Library/Perl/<br />
sudo cp -pr /System/Library/Perl/Extras/5.8.6/ /System/Library/Perl/5.8.6/<br />
echo 71463E00FFDAAA95FF1C39567390ADCA &gt; /Library/Preferences/com.apple.VNCSettings.txt<br />
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes<br />
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users frontrow -privs -all -restart -agent -menu<br />
/System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/MacOS/AppleVNCServer &amp;</p></blockquote>
<p>Once VNC is started, you may now close your SSH connection and head to your iPhone or your iPod Touch. I use <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=299002339&amp;mt=8">Jaadu VNC</a>, which I think, is by far the best VNC for iPhone/iPod Touch. You can use any other VNC applications. You can even use a computer, but that defeats the purpose of this since you want to be sitting on the couch controlling your AppleTV remotely. Using your iPhone or iPod Touch, hop on your home WiFi connection and connect to your AppleTV with the password, &#8220;frontrow&#8221;. Voila. You are now controlling your AppleTV. I also installed the mouse <a href="http://wiki.awkwardtv.org/wiki/Firefox#Enable_the_Mouse_Poiner">cursor</a> and disabled the screen on my mobile device. So now, I can sit on the couch, and move my fingers on a mobile device to control my TV! I can even type with the keyboard on Jaadu. You can extend this hack even further by installing Flash plugin so you can watch videos. It&#8217;s well documented so I won&#8217;t spend any time talking about it here.</p>
<p>Excuse me for any mistakes that I have made (if any). Also, since this is the first tutorial that I have written, some steps may be unclear, if you have trouble understanding, just leave me a comment and hopefully, I&#8217;ll get back to you. Other than that, you can also find me on <a href="http://twitter.com/Shadowz">Twitter</a>. Finally, you may be thinking why have I not bought a Mac Mini instead. Well, I went for the AppleTV for simplicity thinking that I won&#8217;t ever mess with it, but I ended up hacking it for fun. The AppleTV has a lot of potentials, by that, I mean <em>A LOT</em>. As you may have noticed just by this article, you can run any Mac applications. Of course, many won&#8217;t run because we don&#8217;t have the core services built in. But hey, there&#8217;s hack which allows you to install a full blown OS on there! The possibilities are just endless.</p>
]]></content:encoded>
			<wfw:commentRss>http://williamzhou.com/blog/2008/12/hackin-the-appletv/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>
