Add to Technorati Favorites



 

...where sanity comes to die.
Visit my blogBlur the lines between genius, insanity, and utter stupidity.WALDOLand Music CentralDevelopment WorkAbout MeContact MeWALDOLand Site Map
 

 Saturday, March 22, 2008

Jailbroke, bitch!

Finally! It's been agonizing. I've been trying to jailbreak my brand new iPod Touch 32GB for the last couple of weeks. In fact, I've been trying with no success since the day I bought it.

Ironically enough, the first time I did it successfully, nearly right out of the box, using ZiPhone. Sweet, right? I dunno. I was watching some video on YouTube on how to jailbreak the 1.1.4 firmware. Of course me, having A.D.H.D. a short attention span and no patience, I got to doing half the steps before the video even mentioned them. For example, when it said, "Close iTunes" I didn't close iTunes. When it said, "iTunes will show you a dialog, just dismiss it and continue." I decided to Restore my iPod back to the 1.1.4 firmware after I had jailbroken it. Ooops, well whatever.

I figured I'd just jailbreak it again, right? Wrong. I tried jailbreaking it using the exact same ZiPhone method and ... holy shit! Oh, man did I eff this thing up. I saw the diagnostic info as usual during the alternate boot sequence, just like I did when I jailbroke it before, but this time when it got up to the MAC Address of the device, all I got was an infinite loop of messages reading, "BSD root: md0, major 2 minor 0"

Awww shit!

It took me a good long while to figure out how to even get my iPod to even boot normally after that. Dammit!

So I spent the last 3 weeks trying, ever so futily, to jailbreak my iPod. Every method I came across said, "Oh, that method doesn't work for the 32GB" or "This method only works on the iPhone, not the iPod" Oy vey! Most methods were derivations of the same method. Most told me to launch some combination of iPhuc and ZiPhone multiple concurrent times. Some of them told me to downgrade to a lower version of the firmware, jailbreak it and then upgrade through an installed app.

All of them claim to have been confirmed. Most of them even had video proving it. None of them worked for me. Every single time I get to the point where I'm trying to actually jailbreak it, I got the BSD error.

All of a sudden this Saturday I decided to go out and see of there was newer version of ZiPhone. Sure enough, there was! They must have released it in like the last week. Yay! I downloaded it installed it. I ran the jailbreak and sunnuvabitch it worked! I'm so happy.

The first thing I installed was BSD subsystem and OpenSSH. I don't actually know why, but that's what they tell me so I did. I installed all kinds of neat stuff. iPhysics is the most addictive game EVER. It's great. I've got all kinds of guitar and piano stuff for the musician on the go. Now that I've unlocked my iPod, I can install a plethora of meaningless crap. It's awesome!

Unfortunately whenever you jailbreak an iPod, it wipes all of your music and settings, so now I have to wait another 3 hours for my music to finish sync'ing. Oh well. Still worth it.

Labels: , ,

 Sunday, December 16, 2007

Facebook vs. MySpace

You know, Facebook kicks so much ass over MySpace.

MySpace is good for a public identity. Like if you're a band or a comic or a celebrity or something and you need a web presence, MySpace is the way to do it. It's a quick way to get a feature-laden web site up for free with built-in publicity. Easy. Simple. Done.

Facebook on the other hand is much better for the personal level of social networking. In stark contrast to MySpace, you're not riddled with random friend requests, otherwise known as MySpace Spam. Friends on Facebook are grouped by their affiliation with you (high school, college, job, etc.) making them much easier to find because they are targeted searches. you will actually have a network of your friends. MySpace is kind of a free-for-all. Any random schmuck will try to be your friend.

Facebook is MUCH cleaner, prettier, more functional than MySpace. MySpace offers its users the ability to customize their layout, but that usually leads to someone putting as much garbage as they can in a layout, which then makes the layout slower, offensive, or non-functional to the casual viewer. When I just want to add you as a friend, I don't want to sit and wait for your layout to load, with your f***ed up graphics and your music player blasting Omarion at me. I just want to add you ass a friend. Some of m best friends on MySpace have the poorest choices in layouts.

Facebook has the ability to add and or design fun web applications which can be installed like plug-ins to a user's profile. This alone creates business/developer/strategic partnerships with Facebook, something MySpace is currently unable to capitalize on.

Facebook is geared much more to Web 2.0. If you don't know or understand what Web 2.0 is, then don't bother reading this section. Rather than having pages laden with large blocky advertisements and javascript errors like MySpace does, Facebook is slick, easy to use, easy to navigate, and takes advantage of those things that should be used when designing in Web 2.0, like AJAX. The bottom line is that Web 2.0 is supposed to be all about the user experience (usability). MySpace is clunky kludgy, hard to use, riddled with errors, and undergoes maintenance nearly every other week, which usually doesn't fix some of its major issues. Facebook on the other hand is clean, cutting edge, feature rich, functional, and very rarely (although I have spotted a few, no question) has errors. Or at least has significantly fewer errors than MySpace.

I've even heard multiple companies (including the one I work for) including Facebook applications as part of their overall product base. How often does that happen? Although, granted a lot of media (TV/Film/Radio/Music/Comedy) includes MySpace as part of publicity campaigns, so I will give them credit for that.

It seems like you could break down your major social networking sites like this:
Professional: LinkedIn
Media/Entertainment: MySpace
Personal: Facebook

Facebook just seems like more of a personal touch to me. Although yes, I will continue to use both, I'm going to begin gravitating more toward Facebook.

Labels: , , , , , , , , , , ,

 Thursday, July 19, 2007

Apple ITC File Format (revised)

I recently updated this article with new information and new code samples. Enjoy.

I've been developing some projects relating to iTunes lateley. iTunes 7.0.1 has a new feature called CoverFlow. It is the ability to view your music library by its album art. I thought this was phenomenal. In fact it almost has made a convert out of me, using iTunes almost exclusively now.

iTunes CoverFlow

Having the ability to see all of your album art at once is fantastic, but it also shows you how woefully incomplete your library is. Of course, me being the obsessive-compulsive perfectionist/completionist that I am, I had to find album artwork for EVERY song in my library.

I used the 'Get Album Artwork' function in iTunes to obtain my missing artwork. Everything was going swimmingly. iTunes found and downloaded high resolution album artwork for nearly every album I had in my library (over 8,500 songs). I was doing fine until I began playing those same songs in MusicMatch Jukebox and noticed that the artwork that iTunes had just downloaded was not showing up in MusicMatch.

Was this a coincidence? I had to be sure. I discovered that the 'Get Album Artwork' function in iTunes DOES NOT save the downloaded artwork into the actual MP3 files. Instead it creates .itc files in the folder

%USERPROFILE%\My Documents\My Music\iTunes\Album Artwork

The .itc files contain images and metadata for each album which has downloaded artwork. CoverFlow reads the files into memory and holds them there until the application quits, so that it can display album art images quickly and smoothly.

That's fine. Good for Apple. They have their own system for optimizing album artwork images. But what about poor little ole' me, who wants those images embedded in his MP3 files?

There have been a number of suggested ways to accomplish this thrown about the web. The easiest I can think of is to use the 'Get Info...' command in iTunes, switch to the Artwork tab, Cut the downloaded image from the viewer and re-paste the same image. This will embed the image in the actual MP3 file. This is effective, but also very tedious if you have a large number of files.

Another suggested way was to write a program which hacks the .itc files themselves. For some reason, this appealed to me.

Many places where I've found ways to carve up an .itc file suggest simply removing the first 492 bytes and the rest of the file is JPEG/PNG image data. That would be great if it worked consistently. What I've discovered on my own is that it does not work 100% of the time. Frequently I have found .itc files where the image data did not start until after the first 500 bytes, or other variations on that number.

Based on that inconsistency, I decided to inspect the format of an .itc file myself and see if I could infer a file specification myself. The .itc file seems to consist of four sections: a File Signature, a "Null Buffer", a Data Header, and Image Data.

File Signature

The fourth byte of the file would seem to be self describing, indicating the length of the entire File Signature. In the sample file below, the fourth byte has a value of 1C (28). The File Signature itself seems to have a fairly consistent structure, which has the sequence 69 74 63 68 (itch) beginning at index 4 and 61 72 74 77 (artw) beginning at index 24, terminating the File Signature.

"Null Buffer"

Following the File Signature is 256 bytes of 00 (null).

Data Header

The Data Header contains metadata about the file/artwork itself. So far, every .itc file I have inspected has had the fixed-length signature of 28 bytes, followed by the fixed-length null buffer of 256 bytes. Here is where the variable file size comes into play.

Just like the File Signature, the Data Header is self-describing. The length of the Data Header is a factor in determining where the actual image data begins. This is important because this is where the .itc files I have inspected may vary from the norm.

NEW!

Disposable information (4 bytes)
The first four bytes of the Data Header would seem to be disposable information for our purposes.

"item" sequence (4 bytes)
The next four bytes of the Data Header is the sequence 69 74 65 6D (item).

Data Header Length (4 bytes)
The next four bytes are an unsigned integer value indicating the overall length of the Data Header. In the sample file below, the Data Header length has a value of 00 00 00 D8 (216).

Disposable information (16 bytes)
Immediately following the Data Header length is 16 bytes of disposable information.

Disposable information (0-4 bytes)
When the value of the Data Header length is 212, the next section of metadata begins immediately. If it is 216, the next section is offset by an additional four bytes of disposable information.

Library Persistent ID (8 bytes)
The next 8-byte sequence is the iTunes Music Library Persistent ID to which this track belongs. The Library Persistent ID is a hexadecimal string converted from those bytes. In the example below, you can see the sequence D4 CC CA A6 22 F6 CD DC, which corresponds to my Library Persistent ID (which is the first part of the .itc file name).

Track Persistent ID (8 bytes)
The next 8-byte sequence is the Track Persistent ID if this track. Like the Library Persistent ID, Track Persistent ID is also a hexadecimal string converted from those bytes. In the example below, you can see the sequence 3D 82 AC 91 DD 2D 58 B0, which corresponds to the Track Persistent ID (which is the second part of the .itc file name). You can use the Library and Track Persistent IDs together to discover information about the track, using the iTunes Music Library.xml file.

Download/persistence indicator (4 bytes)
The next 4 bytes are either the string sequence 64 6F 77 6E (down) or 6C 6F 63 6C (locl), which when "down", indicates that the CoverFlow artwork was downloaded and not persisted in a music file's tag information. It also corresponds to the appropriate subfolder beneath the Album Artwork folder. The opposite is true of "locl".

Pseudo-File Format (4 bytes)
The next 4 bytes would seem to give a hint as to the format of the embedded image. When the four bytes equate to the string sequence 50 4E 47 66 (PNGf), the image format will be of PNG (portable network graphics) type. When the sequence is 00 00 00 0D, the image is a JPEG (joint photographics experts group) image.

Disposable information (4 bytes)
Four more bytes of disposable information.

Image Width (4 bytes)
The next four bytes are an unsigned integer value indicating the width of the embedded image.

Image Height (4 bytes)
The next four bytes are an unsigned integer value indicating the height of the embedded image.

Image Data

Once the size of the Data Header has been determined, the next block is the actual Image Data, starting immediately after the Data Header, and continuing to the end of the file. In the sample below, the next four bytes are the sequence FF D8 FF E0 (ÿØÿà) which, as some of you may know, are the signature for a JPEG image.

Apple ITC file strucure



So far, I have been able to consistently extract the image data from .itc files on my own machines. This has been very useful to me in collecting album artwork downloaded from iTunes without having to automate iTunes itself.


Since this is by no means official and an inference of the structure, it is entirely possible that you may find the structure to be different. I simply look for patterns in the chaos. If you find that this does not give you the ability to consistently extract album artwork then please let me know.

Labels: , , , , , ,

 Friday, May 04, 2007

Request for CoverFlow

I LOOOOOOOOOOOOOOOOVE the coverflow feature. It has made an iTunes convert out of me. My album artwork is very important to me. I absolutely love the ability to view my entire library by its artwork. It makes me spend HOURS making sure I have the best quality album artwork for my thousands of songs. (I haven't broken the 100,000 mark quite yet, but I'm close.)

I feel a great swell of disappointment when I connect my 80GB iPod to my machine, or any other, and I can't view it by its artwork, like I can my library. All that work manicuring my album artwork goes for nothing. Yes, I can see the artwork for individual songs when I play them, but that's it.

I do all that work, take my iPod on the road with me, then when I connect it to iTunes, the two CoverFlow buttons are disabled. It's such a drag, man.

Why would it be so hard to give that same feature that exists on the library, to the iPod?

God, that's a feature I really really want and I'm patiently waiting for Apple to implement it.

Does anyone else feel the same way?

Labels: , , ,

 Monday, July 24, 2006

QuickTime & Windows Server 2003 - The Secret

I was just happy as a clam until a couple of weeks ago when my iTunes told me "There is a new version of iTunes. Would you like to download it?" Dunce that I am, I replied yes.

iTunes is bundled with QuickTime, and as you may or may not know, the latest version of QuickTime (version 7.0.3) from Apple is fairly incompatible with Windows 2003 Server. Ordinarily, I could give less than a fuck, but iTunes requires QuickTime to run. The only reason I EVER use iTunes is to put music onto my iPods, and since iTunes was to ONLY thing that I could use, you can imagine how pissed I was.

After doing a little research, I came across several threads like this one in the Apple support forums. It seems that one of the Security patches (KB908531) for Windows Server 2003 issued by Microsoft, creates a situation where parts of QuickTime's normal operation (including install) are now "privileged instructions".

You could uninstall this security patch and the latest versions of QuickTime and iTunes will work just fine. The problems with this are that 1) you leave your Windows 2003 Server vulnerable to attack, and 2) If you have your Windows Update set to automatically download, you will be consatntly downloading and re-installing this security patch.

The latest version of QuickTime claims to have corrected a vulnerability as well. Personally I would rather go with a secure Windows server and a vulnerable older version of QuickTime, so that's what I did.


So here's how to clean and revert QuickTime.

First, let's get down to the uninstall. Since the latest version of QuickTime fouls up the install, it fails to make the registry entries that would allow the uninstall to show up in Add/Remove Programs. OK, so then what? You could try using the Start Menu item to uninstall QuickTime (Start -> All Programs -> QuickTime -> Uninstall QuickTime). For the same reason (the catastrophic failure during install), it fails to make registry entries that would allow the InstallShield kernel to run the MSI package which would uninstall QuickTime.

Download the Windows Installer CleanUp Utility from Microsoft. This will find the MSI installer package and allow you to uninstall its contents fairly quietly.

It may still leave the files in place so be sure to delete those files manualy. Usually they are stored in C:\Program Files\QuickTime

Here is the step that is really important and must be done before proceeding any further. Open your system folder (usually C:\Windows\system32) and find 2 files, QuickTime.qts and QuickTimeVR.qtx. You must delete these files. They are Apple extensions for QuickTime that function like DLLs. Any QuickTime installer will search for the existence of these files and read the version information out of these files. Don't believe me? Run a file monitor during the install process.

OK, so now you have successfully cleaned off QuickTime. If you inadvertently uninstalled iTunes, you must install the latest version of iTunes (which will attempt to reinstall the latest version of QuickTime) and repeat the process.

QuickTime 7.0.1 Reinstaller (link no longer available)

So now you should have the latest version of iTunes and the not so latest version of QuickTime.

Labels: , ,