Neil Schemenauer's Web Log

[Archives]

November 06, 2006

Hacking Ubuntu to support the 2nd generation iPod Nano

I don't have time to write a detailed story but hopefully this short note will help someone. The new iPod Nano (2G) is misdetected by HAL and that causes it not to work with higher-level apps like Banshee. The Banshee wiki has some useful debugging instructions. There's an Ubuntu patch that looks promising. Rebuilding the hal package looked like too much work and I didn't want to waste time installing all the required develpment packages on my sister's machine. BTW, like some other DDs, I hate CDBS. Just give me the damn unpacked source already! Anyhow, objdump -d /usr/lib/hal/hald-probe-volume and find the test for VIA_SIGNATURE (0xAA55). It looks like this:

804ceb1:       74 ae                   je     804ce61 <libhal_ctx_
804ceb3:       66 81 38 55 aa          cmpw   $0xaa55,(%eax)
804ceb8:       75 a7                   jne    804ce61 <libhal_ctx_
804ceba:       80 78 02 01             cmpb   $0x1,0x2(%eax)
804cebe:       89 f6                   mov    %esi,%esi

Next, use xxd to dump the library, search for the above section of code and change 55 aa to 55 ab. Use xxd -r to re-create the library. Do the same for hald-probe-storage, just for good measure. Banshee now works like a charm with the iPod. Oh yes, I had to add a fake SysInfo file in order to make it work with Amarok. I'm not sure if that trickery is necessary for Banshee.

[comments]