josephw / titl

Tools for iTunes Libraries
60 stars 12 forks source link

Endianness on x64 #28

Open josephw opened 9 years ago

josephw commented 9 years ago

Original issue 28 created by josephw on 2013-12-09T07:33:28.000Z:

It seems that iTunes x64 on Windows 7 x64 uses a different endianness in the itl file. As a result, 4-byte integers and header identifiers are inverted (hdsm --> msdh etc)

An inspection with a hex editor confirmed this.

This makes running the TITL tools impossible on these platforms due to incorrect fixed byte ordering assumption.

What version of the product are you using? On what operating system?

TITL latest version with the patch from http://code.google.com/p/titl/issues/detail?id=18 Environment: iTunes x64 11.1.3.8 on Windows 7 x64

I wrote a rudimentary debug dumper with a proof of concept endianness change feature, which I can provide on request.

josephw commented 9 years ago

Comment #1 originally posted by josephw on 2013-12-20T20:25:06.000Z:

Same on Mac OS X Mavericks, with iTunes version 11.1.3. The hdfm header at the start of the file looks OK, but the blocks in the encrypted part use a different endianness. See attachment for a minimal file that demonstrates this.

josephw commented 9 years ago

Comment #2 originally posted by josephw on 2013-12-22T22:34:54.000Z:

So does it appear that iTunes 11.1.3 changed the endianness?

Either way, I can provide demo code that is endianness aware (and can reproduce the header tree structure from the .itl file). It's not release quality, it's rather hacked together (sort of).

josephw commented 9 years ago

Comment #3 originally posted by josephw on 2014-03-09T10:25:41.000Z:

Issue 27 has been merged into this issue.

schep commented 8 years ago

I am interested in helping with the use of Win x64 10 and current iTunes 12.1.4.6. Is project still active. Current release downloaded 2016-07-02 is throwing following error: at org.kafsemo.titl.tools.Main.main(Main.java:42) Caused by: java.io.IOException: Expected zero for inline HDFM length (was 55593006) at org.kafsemo.titl.Hdfm.readInline(Hdfm.java:131)