10/18/11

Apple TV Generation 2 - Windows Jailbreak and XBMC Install

Ok, I know this one is way off topic but I thought I would share it anyway, I picked up an Apple TV Gen 2 yesterday. After doing some research and talking with a friend that had already jail broken a few of them, I planned on jail breaking it.

Note: All links to software utilities are listed at the end of this post
Software needed for this guide....
  • Greenpois0n 
  • Seas0nPass 
  • Firmware(ipsw) 
  • iREB 
  • iFaith 
  • Putty


The process was supposed to be pretty straight forward, I downloaded the latest Greenpois0n jail break utility and thought I would be on my way. Don't bother following this as I only mention it because this is what I first tried and wanted to share my results.

I wanted to jail break mainly because with the stock ATV you have to play everything in Apple's approved formats, I like to keep my movies in AVI (mostly xvid) and don't want to have to convert them to view them through the ATV.

First thing to do when jail breaking an ATV is to back up the SHSH Blobs, I used a utility called iFaith. This will allow you to create signed ipsws (with iFaith) and return to previous versions of ios software.

Backing up SHSH Blobs - Open iFaith and select the Dump SHSH Blobs


Place these files in a secure location, they will be needed if you ever want to downgrade you ipsw version


So I started on the jail break, first thing I realized is that getting the ATV into DFU mode (the mode it has to be in for applying a jail break) is a little hard at first. Following the on screen instructions in Greenpois0n failed more times than it succeeded. Finally I got it and started with the jail break...


Now getting the ATV in DFU mode holding in the two small buttons on the remote


Ready...


Once the ATV gets into DFU mode the bottom left button will say jail break.


Failure!

So after clicking jail break and watching as the progress bars work their magic it would finish saying that the jail break was applied successfully. I disconnect the ATV and connected it to my TV and nothing had changed from the out of the box screens. I tried this several times even using earlier versions of GP and even on another computer, all had the same result. 

So my next Google search leads me to another utility called Seas0nPass


Seas0nPass works a little different, instead of modifying your existing ipsw (software) it actually will either automatically download the latest version of ios that is jail breakable or you can hold the shift key down and select an ipsw version that you have previously downloaded. Unlike Greenpois0n, Seas0nPass will only jailbreak your ATV so that you can install software to it, it will not install any software for you. Greenpois0n would have been nice because it gives you the option of inject software from the ATV menu. 

So I downloaded the latest version of ios that I knew could be jail broken which was AppleTV2,1_4.3_8F202_Restore.ipsw, and I proceeded to let Seas0nPass modify it.


Once Seas0nPass has modified the ipsw you can either let it automatically launch iTunes and install the custom firmware for you or you can manually do this. I tried both methods with no success, for the most part I kept getting the 3194 error which means that iTunes realizes this is not a correct ipsw that you can install on your device. I also saw error codes 21, 1600 and a few others. I struggled with these errors for hours trying every utility in every order and could not get past these errors.

FAILURE!

In the end there were three key things that got me past all of the errors, the first was to rename the custom ipsw that Seas0nPass creates, basically remove the SP from the filename so that it looks like the stock file name for that particular version of ios. 

The second was to get a utility called TinyUmbrella


Select the Advanced Tab and ensure that your checkboxes match mine...


Once your checkboxes are set to match mine from the General tab you will be able to start the TSS server, this will need to be running when you perform the last step of importing the ipsw into iTunes. (Note) that each time you attempt this I would recommend stopping and starting the TSS server as it seemed to have issues if I didnt do this.

The third step was to use a seperate utility called iREB to put the ATV into DFU mode, apparently it does matter how you do this and it can help get past some of the errors when restoring an ipsw in iTunes.

Launch iREB and select Apple TV 2


Follow the instructions to get the ATV into DFU mode


Now launch iTunes and you should immediately see the ATV screen with the restore button, hold down the shift key and select Restore. Browse to the modified ipsw file that Seas0nPass created, make sure you have removed the SP out of the title of the file and let iTunes restore the ipsw. 


When the installation is complete plug the Apple TV into a television and you should see a new menu item in the top navigation bar. 


Install Software

Now that your ATV is jailbroken, we’re going to install third-party software such as XBMC. First, we have to find out what IP address your ATV was assigned by your router. From the ATV homescreen navigate to the Settings menu. Select General and then Network. Next to IP Address is your ATV's IP address.



Download Putty for Windows and launch. Type in your ATV's IP address in the Host Name (or IP address) field. Click Open and you will be prompted to log in as a username. Type “root” as the username and type “alpine” for the password.

Now type the following commands right after each other, press Enter after each line:

echo "deb http://apt.awkwardtv.org ./" > /etc/apt/sources.list.d/awkwardtv.list
apt-get update
apt-get install com.nito.nitoTV
killall Lowtide
reboot

After you run the third command, you will notice it will ask if you want to continue. Type “y” and hit Enter. 


When your ATV restarts you will see that you installed nitoTV, which acts like Cydia on a jailbroken iPhone, nitoTV is a package management system that allows users to download packages. From the homescreen, select nitoTV and open it. You’ll see a list of packages that you can install. I suggest installing XBMC-ATV2, updateBeGone and Overflow at a minimum, you can highlight these and it will give you a description of what each is.

Enjoy!


Links

Greenpois0n -  http://greenpois0n.com/






9/30/11

VMWare ESXi Lab Improvements, separate storage network with Jumbo Frames enabled

I recently decided to upgrade my VSphere 5 Lab and move my storage off to a separate network. The following diagram describes my new topology.


Before doing this I had everything on the same network, by isolating all of the storage traffic I was able to enable Jumbo Frames and bring this environment a bit closer to VMWares best practices for NFS storage.

To create the new network first I changed the Iomega IX4 200D's network settings,


I put each Gigabit network card on a seperate network, the 192.x.x.x network is for managing the ESXi environment and the 10.x.x.x network is the storage network. Next I enabled Jumbo Frames on the NIC and set the size to 9000.

Following this change I created a new VMKernel on each ESXi host using the VSphere Client, I added 2 physical network cards to each VMKernel. 



I made sure to enable Jumbo Frames on both the new vSwitch that is created for the VMKernel and the VMKernel itself, I set them both to 9000 to match the Iomega settings.


I enabled NIC Teaming on the two network cards


Note: Although NIC Teaming will not increase speed for a single NFS Datastore, it will help when there are multiple NFS Datastores, VMWare recommends using multiple NFS Datastores.


Once the network and NAS settings are complete the NFS datastores can be created normally.









9/26/11

Sharepoint 2010 - Check assemblies for memory leaks / proper disposal

Found this tool today for checking all of the SPSite, SPWeb etc. objects in your custom code to ensure that proper disposal has been used. This tool can actually review a compiled assembly so this is great for checking your own code and any 3rd party tools.

" The output from the tool will contain messages that may indicate the SPSite and SPWeb Dispose() methods guidance are not being followed in the customers source code. While these messages need expert evaluation in order to determine if the software is not performing properly, in some cases just running the tool on your custom code can lead you to simple fixes that improve the quality and performance of custom code on SharePoint. "

The tool can be downloaded here - http://archive.msdn.microsoft.com/SPDisposeCheck

Best Practices for object disposal - http://msdn.microsoft.com/en-us/library/aa973248.aspx

Sharepoint 2010 - Hide the Quick Launch Navigation on a page

One possible way to hide the Quick Launch panel on a page is to modify the page layout for example of the default.aspx page.


<style type="text/css">
#LeftNavigationAreaCell { display: none !important; }
</style>

Another method for hiding the Quick Launch is to add a Content Editor Web Part to the page and add the following code to the webpart.

<style type="text/css">

/*--Hide Quick Launch Panel--*/
#s4-leftpanel{
display:none

}
.s4-ca{
margin-left:0px
}

</style>

The last method is to add the code to the Masterpage for the site (just before the closing head tag) and this will eliminate any extra space in the top left area. 

hide_the_quick_launch_in_sharepoint_2010_solutions

9/25/11

Passed the 70-567 PRO: Designing and Developing Microsoft Sharepoint 2010 Applications

This is the second Sharepoint 2010 Application Development Exam

Things to be proficient on

BCS - a few questions about setting up external lists, content types hosted in SQL or MS CRM, where to put the connection strings

Infopath - a few questions about Infopath forms, where to design your form and which version of Infopath to use - the client or Infopath services

Powershell - a few questions that have an answer of running a Powershell script to accomplish a task, I think every question that had this as an option that this was the answer. Know Add-SPUserSolution cmdlet

Authentication - know when to use NTLM, Kerberos, Claims and Forms based authentication

Site Columns - understand site columns and lookup columns

Content Types - understand Content Types, both internal and external, and Content Type hubs - syndication, know the Office Item Type option. Know what a sealed content type is, how to create it

Disposal - several questions about custom code and disposing of the objects you create, the answers were always to do your own garbage collection, do not rely on the managed framework to do this for you.

Logging - understand the ULS, what it is and where it is. Know what Event Log Flood Protection is

Exception Handling - a question that asks what you should do to trap an error, log it and throw an exception

Page Layouts - know when you can use a Page Layout and when you should use a Site Definition or Masterpage or a Site Theme

Performance - A few questions on optimization, know disk-based caching and Remote Blob storage and how to configure each. Know what filestream storage on the database server is an how to enable it

Workflow - know the differences between workflow types, Sequential and know what a Composite Activity is and a Task Form. One question on creating and validating a workflow in Visio, know how to do this

Object Model - know when to use the Sharepoint Foundation 2010 Managed Client Object Model in your application. Know what SP.UI.ModelDialog class is

Deployment - several questions about deploying a new version of your solution, webpart, workflow etc. Things like you already have a solution deployed and you don't want to affect existing users using the current version, how do you deploy a new version etc. Understand when to deploy a Sandboxed solution, know all of the limitations of this type of solution

Scope - huge thing to know, understand where to scope your solutions based on requirements e.g. Farm, Web Application, Site Collection, Site

Features - know how to create and deploy features, understand scope and how to upgrade to new versions. Understand feature dependencies


Found an excellent video series on Youtube that really helped with the exam preparation: http://www.youtube.com/watch?v=fEtOf7Hq4yw

9/23/11

Sharepoint 2010 Web Application Modes - Classic vs Claims

Sharepoint web applications can be configured in one of two modes for authentication, here are a few of the differences between these modes

1. Classic - supports Windows Authentication NTLM

2. Claims

  1. Windows Authentication NTLM
  2. Windows Authentication Kerberos
  3. Forms Based
  4. External Auth(e.g. Windows Live ID)
Microsoft's instructions for changing the mode of a Sharepoint web application

To convert Web applications to claims-based authentication

From the Windows PowerShell command prompt, type the following:

 $WebAppName = "http:// yourWebAppUrl"
 $account = "yourDomain\yourUser"
 $wa = get-SPWebApplication $WebAppName
 Set-SPwebApplication $wa -AuthenticationProvider (New-SPAuthenticationProvider) -Zone Default

At the Migration prompt, click Yes to continue.

From the Windows PowerShell command prompt, type the following to set the user as an administrator for the site:

 $wa = get-SPWebApplication $WebAppName
 $account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()

From the Windows PowerShell command prompt, type the following to configure the policy to enable the user to have full access:

 $zp = $wa.ZonePolicies("Default")
 $p = $zp.Add($account,"PSPolicy")
 $fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
 $p.PolicyRoleBindings.Add($fc)
 $wa.Update()

From the Windows PowerShell command prompt, type the following to perform user migration:

 $wa = get-SPWebApplication $WebAppName
 $wa.MigrateUsers($true)

Additional migration guidelines

After you perform the steps in the previous procedures, you might experience one or more of the following issues.

Users who submit valid credentials might be notified that they do not have permissions. If this occurs, the portalsuperuseraccount property and the portalsuperreaderaccount property of the Web application were probably configured prior to migration. If this is the case, you must update the portalsuperuseraccount property and the portalsuperreaderaccount property to use the new claims-based account name. After migration, you can find the new claims-based account name in the Web application policy for the migrated Web application.

If existing alerts are not invoked after migration, you might have to delete and recreate the alerts.

If Search crawl does not function after migration, make sure the Search crawl account lists the new converted account name. If the new converted account name is not listed, you must manually create a new policy for the crawl account.

9/21/11

VMWare Workstation 8 New Features

Just started playing with VMWare Workstation 8 today, lots of  really cool new features.

1. Connect to your VCenter and ESX(i) Hosts, manage autostart vms, configure roles and permissions
2. Copy VM's from Workstation to ESX(i) - Tested this with no issues, no timeouts etc.
3. Run workstation as a server - Nice for those vm's you want to leave running while users log on and off of host
4. 3d graphics, HD audio
5. USB 3 and Bluetooth support
6. Search for VMs
7. Live thumbnail bar
8. Virtual machine library
9. VM Sharing, can grant access to your virtual machines, for other team members etc.
10. P2V right from workstation - includes the latest version of VMWare Converter
11. New agent keeps all vmware tools up to date on all virtual machines
12. Connect to other workstation 8 installs on your network and manage them along side with your local VMs
13. Support for virtualized 64 bit ESX(i) guests
14. Map vmdk files to drive letters on your desktop, full read/write support
15. Teams are gone, folders have taken over, you can power on a folder - power all vms on or configure individually, you can drag and drop vms into folders
16. New interface has the look and feel of VSphere 5

Thats all for now, I'll list more as I start to become more familiar with it.