Sunday, January 08, 2012

Jailbreaking your Apple TV 2 to watch Hulu


Below are the steps I took to get Hulu up and running on my Apple TV 2 (hereafter referred to as ATV) using the latest firmware 4.4.4.

Since it took some effort to get all the steps right, I figured I'd try to save someone else some time and post the instructions here.

(Credit where credit is due: This post has been largely based on an anonymous post at the Firecore blog comments section.  That original post is available here:
The anonymous post was left at Tue Aug 30, 2011 6:51 pm, but was based on the 4.3 Firmware. So thanks to that anonymous poster!)

What you will need:

-Apple TV2 (Black)
 with aluminum remote.
-Mac

-Latest version of iTunes

-Latest version of Seasonpass from Firecore, available for free download here: http://support.firecore.com/entries/387605 
-A micro USB cable to fit the back of ATV
(This did NOT come with your Apple TV, and is required to connect the ATV directly to your computer so you can perform the jailbreak. You can get this online cheap. Or perhaps you already have such a cable. . . they are often sold with Blackberry phones. Just make sure it’s a “micro” cable, NOT a “mini” cable.  Here’s an example of one: http://www.amazon.com/gp/product/B001K7I62Q?ie=UTF8&tag=atfl-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001K7I62Q  )

1. Download and install the untethered “Seasonpass” – Latest Version – from http://support.firecore.com/entries/387605.  This is the software that will “jailbreak” your ATV, so that you can install non-Apple software on it.  You can also read about this process to see what it does here: http://blog.firecore.com/6434
 
2. Run Seasonpass and follow instructions at this site: http://support.firecore.com/entries/387605 
This may take 20 minutes or so.  When you are done, read on below.

Your ATV is now jailbroken. (Don’t worry, if you decide you want to go back to the original factory settings, you can always go to “Restore” in the Settings section of your Apple TV.)

3. Hook your ATV back up to your TV and make sure it can successfully connect to the internet/your network. You should see a temporary Firecore emblem in the lower right corner of the menu, indicating the unit was successfully jailbroken.

Now you want to install some software on your jailbroken ATV. This will require the use of the Terminal app on your mac to SSH into your ATV.  For that you’ll need to know your ATV’s IP address.

4. On your Apple TV go to Settings à General à Network and note the IP address.  Should be something similar to 192.168.0.186

5. Open the Terminal application on your mac and type the following:
“ssh –l root 192.168.0.186” and hit return.
(Don’t actually type the quotes, just what’s inside them. And use the actual IP address of your particular ATV, which is likely different from the number I used above)

6. You will be asked for a password.  Unless you have changed it, the default password is “alpine”. You are free to change this later if you wish, using the command “passwd”.  But it’s not necessary.

7. Update apt sources - type “apt-get update”


8. Install NitoTV - type “apt-get install com.nito.nitoTV”

(NitoTV is a feature that allows you to easily install other programs on your ATV from the ATV’s menu system, so you won’t have to use the command line as much.)

9.  Type “killall AppleTV”.  This will restart the Apple TV menu system so you can see the new software (NitoTV) you just installed.

10. On your ATV, go to NitoTV and install XBMC, updatebegone, and openSSH.  XBMC is the Xbox Media Center software which will allow you to watch Hulu.  updatebegone stops the ATV from auto updating or nagging you about updating to the next Apple Firmware update, since you won’t want to update the firmware until the next jailbreak update comes out.  (Otherwise you’d lose your jailbreak when updating to the next Apple firmware.) OpenSSH just makes it easier to install the Hulu plugin for XBMC later.  (not completely sure that openSSH is necessary, but oh well)

XBMC has now been installed! But it’s not ready to stream Hulu just yet. . .

Now we need to install the bluecop repository, which is just a zip file containing “add-ons” that will augment XBMC and allow it to stream Hulu.  You can see a post about this plugin, with instructions on how to install it, here:

If you are savvy enough with SFTP and the command line to follow the instructions at the link above, go for it and you are done!  If you need a bit more explanation, see below.

11.  Download the .zip file for the bluecop repository from the above link to your mac.

12. In the terminal application on your mac, exit out of the SSH session you started earlier with your ATV by typing “exit”.  Then navigate to wherever the zip file you just downloaded is.  For example, if the zip file went into your Downloads directory, you would type: “cd” and hit return to change directory to your home directory, and then “cd Downloads” (and hit return) to go to your Downloads directory.  Make sure the zip file is in there by typing “ls repository*”.  This will display the file (full name is repository.bluecop.xbmc-plugins.zip) if it is there.  It will display nothing if you are in the wrong directory.

13. Type the following: “sftp root@192.168.0.186” (again, use the correct IP address) This sets up a SFTP: secure file transfer protocol session which will allow you to transfer the zip file from your mac to the ATV.

14. Type “cd /private/var/mobile/Media” (this will change directory to a Media folder on the ATV where XBMC will know to look for this zip file.)

15. Type “put repository.bluecop.xbmc-plugins.zip” (this will actually transfer the zip file from your mac to the ATV)

16. Type “quit” to exit SFTP.

17. On the ATV, go to XBMC.  Then go to System --> Add-ons --> “Install from zip file”


18. Browse to var/mobile/media (the folder where you put the zip file), find “repository.bluecop.xbmc-plugins.zip” and press OK (Bluecop is already enabled)


19. Go to System --> Add-ons --> get add-ons, find “bluecop Add-on Repository” click OK, choose video add-ons, find Hulu and install it. Note that after it is “enabled”, you can select the plugin again and select “configure” to enter your Hulu login information.  Whether you are a HuluPlus subscriber or just a user of free Hulu, the login can be handy because it allows you to configure your “subscriptions” (which shows you like) on Hulu.com via a computer and web browser, and then you can conveniently access just those subscriptions in XBMC on the ATV, instead of having to search or browse through thousands of shows using the remote.

20. Finally, back out to the front XBMC main menu and go to Videos -> Video add-ons. Find Hulu and enjoy (should work with both regular Hulu and Hulu Plus).

At this point you should be able to watch free Hulu on XBMC on your ATV! Life now has meaning.

P.S.: You may have noticed there are other video add-ons in the bluecop repository besides Hulu.  For example there is one that is supposed to let you watch Amazon OnDemand content, one for ESPN that claims to allow you to watch live streaming sporting events via ESPN.com on the ATV.  Feel free to install these and try them out for yourself.

12 comments:

Anonymous said...

im using a Windows system and when it comes to step 5 im not sure what to do?

please help

David said...

For windows I think you will need to download a terminal application. I haven't used it myself, but I hear that Putty is a good option.

http://kb.mediatemple.net/questions/1595/Using+SSH+in+PuTTY+%28Windows%29#gs
or here:

http://www.chiark.greenend.org.uk/~sgtatham/putty/

Anonymous said...

will this work outside of the US as well?

David said...

I don't know.

The plugin scrapes the Hulu stream from Hulu's servers. If your region is blocked from accessing Hulu's content based on your IP, I doubt this method would be able to get around that.

I expect that, if accessing Hulu via your computer web browser works outside the U.S., then this will as well. If not, then this probably won't work.

But I live in the U.S. so I can't test it myself.

nathan said...

On step 13, when I type sftp root@192.168.2.4 (my IP address), I receive
"ssh: connect to host 192.168.2.4 port 22: Connection refused
Connection closed"

Any ideas?

Thanks so much, I'm so close!

David said...

@nathan:

Are you able to successfully connect to your ATV as root using ssh? (as in step 5) If you were able to ssh into the Apple TV's IP address I don't see why you wouldn't be able to sftp into it as well. Make sure you are using the Apple TV's IP address, the same one you used when you ssh'd.

Not sure if this matters, but did you install "OpenSSH" from NitoTV on the ATV? (step 10) I'm unsure, but that may make sftp possible.

Another thing you might try is using a GUI FTP client to transfer the zip file instead of sftp on the command line. Here are some instructions for that; you would do this instead of steps 12-16 in my original post, (these instructions were put together by a commenter on the macrumors forum, comment #22 by CocoaPuff, here: http://forums.macrumors.com/showthread.php?t=1305573 ):

1. Download a copy of free FTP software called FileZilla.

2. Load up FileZilla, select Site Manager under File, and add a New Site.

3. Enter the LAN IP address in Host, select SFTP as Servertype, enter "root" as user and "alpine" as password, and connect.

4. Copy and paste: /private/var/mobile/Media into "Remote site:" box, press enter and it will take you directly to the necessary folder.

5. Drag and drop the bluecop repository from "Local site" into the folder.

Then follow directions from 17 and onward.

nathan said...

Thanks so much for your reply. I got it working! After many failed attempts in terminal and using filezilla, I shut everything down. It started working after a restart!

One more side note, I needed to restart XBMC before step 19 for it to show the add-on. I think this might be necessary, not sure though.

Thanks for your post! Now I can go OD on TV.

Anonymous said...

Hi there, great tutorial.

Unfortunately I think I totally botched this before I found this page. I tried to jailbreak on an old mac (10.4) using PwnageTool. It was really hard to get it into DFU mode, and when I finally did iTunes only detected the ATV as an iphone.

I didn't know what to do so I left it for awhile, and now iTunes wont detect it at all, and neither will the jailbreak programs. I've tried plugging/unplugging power, different jailbreak utilities, disk utility, etc...

I got itunes to detect the ATV for a moment, but now I can't seem to get it back. SeasonPass and PwnageTool don't detect DFU mode now either, I can't get PT to even recognize that I've plugged in the ATV...

What should I do?

David said...

one thing you can try is to plug the ATV into your TV set and go to Settings --> General --> Restore. This will restore your ATV to factory default setting, erasing whatever changes your use of Pwnage tool might have done to it. Then you can start over and use SeasonPass to connect it to your computer and jailbreak it.

As far as properly getting into DFU mode, others have reported that it is best not to have the ATV plugged into power when you have it plugged into your computer. If you do have it plugged into power, that might prevent it from entering DFU mode. On the other hand, I've seen other people say the exact opposite: that they couldn't get it into DFU mode until they DID plug in the power.

Also, see this thread I posted on macrumors, which has more people who have made this change to their ATV's, and subsequent asked-and-answered questions:
http://forums.macrumors.com/showthread.php?t=1305573

Faslane said...

I installed everything correctly and configured my account in the setting "congfiguration" tab in the XBMC plug in settings....However, when I fgo to video/addons/hulu it tries to start and then gives a script error...I downloaded the latest version and installed the repo as well...any ideas?

please email me @ fastrip66@gmail.com

Much appreciated!!! Thanks

natarie said...

when I try to get bluecop from the add-ons mobile/Media, it says add=0n does not have correct structure. what should i do?

natarie said...

when i try to get bluecop from mobile/Media is says the add-on has an invalid format. what should i do?