So, Apple’s attempt to lock iPhone/iPod users to iTunes failed. Again. A solution for syncing from free Unix like platforms has existed for a few months now. Apple, please. Continuing this cat-and-mouse game is stupid. Stop it. Accessing the phones from other platforms than iTunes is fair usage.
This is how I got syncing my iPhone media database os 3.x from Fedora 12 to work. This is based on marcan’s blog. All kudos to marcan, the libgpod hackers and others who helped to hack the ipodhash. Please read his blog entry. The following concludes step 1-5 on a fedora 12 system.
Update: Got rhythmbox working on one box in addition to gtkpod.
In the following, I use sudo to gain root access.
If you have not got libusb installed yet, just install it. You also want gtkpod to do the actual ipod transfer.
sudo yum install libusb gtkpod
Get new versions of libiphone and dependencies from rawhide
sudo yum --enablerepo rawhide install usbmuxd-devel libplist-devel libiphone-devel ifuse
Set up usbmuxd. For security reasons, usbmuxd should run as its own user
sudo useradd -r -c "usbmuxd daemon user" -d /media -s /bin/false usbmux
Edit /lib/udev/rules.d/85-usbmuxd.rules as root, and add OWNER=”usbmux”.
ACTION=="add", SUBSYSTEM=="usb", OWNER="usbmux", ...
You can also add “-v -v” to the RUN string, to get more syslog info. run sudo tail -f /var/log/messages in a separate window to see for example how plugging and unplugging happen.
Force a udev rules reload (should happen automatically, actually).
sudo udevadm control --reload-rules
Edit /etc/fuse.conf as root, and add a line
user_allow_other
Now check that you can mount and umount your ipod via ifuse. Inside, you should see iTunes database files. You will need to do this to get gtkpod to access your phone. Plug the phone, and do
sudo mkdir /media/iphone
sudo chown $(whoami) /media/iphone
ifuse /media/iphone/
ls /media/iphone/iTunes_Control/iTunes/
fusermount -u /media/iphone
Download and install a preview version of libgpod from http://users.linpro.no/ingvar/libgpod.
Now, you need some setup on the phone
ifuse /media/iphone
mkdir /media/iphone/iTunes_Control/Device
Read the uuid of your phone (some 40 characters string), then use ipod-read-sysinfo-extended with that value.
sudo lsusb -v | grep -i iSerial
ipod-read-sysinfo-extended your_uuid_string /media/iphone
ls -sh /media/iphone/iTunes_Control/Device/SysInfoExtended
fusermount -u /media/iphone
/media/iphone/iTunes_Control/Device/SysInfoExtended should now be an 20k+ xml file.
If you have come this far without errors, you can start gtkpod, plug and mount (ifuse) your phone, and sync. Remember to unmount (fusermount -u) the phone before unplugging it.
As my iPhone had not yet been synced with iTunes (and probably never will). I got a HashInfo file from http://ihash.marcansoft.com/, and put it into iTunes_control/Device. Then I cleared out the content of the database (removed Music/*, iTunesCDB, iTunesDB, all .ext files and the .itlp directory). Finally I let gtkpod reinit the database, and hey presto, syncs like a dream. The usbmuxd sync is also a lot faster than the sshfs method I used for the iPhone os v2.x.
As expected, amarok-1.4 is still broken, and can’t use the changed libgpod, and since it has no upstream support, this will probably never be fixed. I’ll miss amarok-1.4, but I can live with gtkpod. Perhaps some day even amarok2 will become usable.
Installing gvfs-afc from rawhide, I got rhythmbox syncing with my i686 box at home, but not with my x86_64 box at work. I haven’t been able to track down why. With rhythmbox, you don’t have to use ifuse. It will happily pick up the phone via gvfs when it’s plugged. Press Cancel on the camera stuff, and don’t use ifuse and gvfs-afc at the same time. Rhythmbox can’t transfer other content than music, so if you want to transfer video or other stuff, you need to use gtkpod/ifuse.
I’d like feedback from others getting rhythmbox working on x86_64.
Great thanks to marcan and teuf for excellent help on irc.
Rhythmbox does work without modifications the the gvfs AFC backend. I’ve been using libgpod from git for 1-2 months to sync with my iPhone 3G (3.1.2). I’m hoping they do an official release soon so that the support will be available in the repos.
Thank you!
works perfectly with F12 and iPhone 3GS with latest software! You freed me from the iTunes slavery ;-)
Hi,
I am following your guide, and I don’t seem to have an /etc/fuse.conf
I am having trouble mounting the iphone once connected, my logs are:
Jan 8 13:00:46 localhost kernel: usb 2-2: new high speed USB device using ehci_hcd and address 12
Jan 8 13:00:46 localhost kernel: usb 2-2: New USB device found, idVendor=05ac, idProduct=1294
Jan 8 13:00:46 localhost kernel: usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 8 13:00:46 localhost kernel: usb 2-2: Product: iPhone
Jan 8 13:00:46 localhost kernel: usb 2-2: Manufacturer: Apple Inc.
Jan 8 13:00:46 localhost kernel: usb 2-2: SerialNumber: b7f2a134e043692c54739f0d12240e3f28ad5d41
Jan 8 13:00:46 localhost kernel: usb 2-2: configuration #1 chosen from 4 choices
Jan 8 13:00:46 localhost usbmuxd[11906]: [3] usbmuxd v1.0.0 starting up
Jan 8 13:00:46 localhost usbmuxd[11908]: [4] Creating socket
Jan 8 13:00:46 localhost usbmuxd[11908]: [3] Successfully dropped privileges to ‘usbmux’
Jan 8 13:00:46 localhost usbmuxd[11908]: [4] Initializing USB
Jan 8 13:00:46 localhost usbmuxd[11908]: [4] Found new device with v/p 05ac:1294 at 2-12
Jan 8 13:00:46 localhost usbmuxd[11908]: [2] Could not open device 2-12: -3
Jan 8 13:00:46 localhost usbmuxd[11908]: [4] 0 devices detected
Jan 8 13:00:46 localhost usbmuxd[11908]: [3] Initialization complete
Jan 8 13:00:46 localhost usbmuxd[11908]: [4] New client on fd 5
And when I try to mount the iphone:
[phil@maki ~]$ ifuse /media/iphone/
No device found, is it connected?
If it is make sure that your user has permissions to access the raw usb device.
If you’re still having issues try unplugging the device and reconnecting it.
The logs say:
Jan 8 13:01:30 localhost usbmuxd[11908]: [4] New client on fd 10
Jan 8 13:01:31 localhost usbmuxd[11908]: [4] Client 10 connection closed
Jan 8 13:01:31 localhost usbmuxd[11908]: [4] Disconnecting client fd 10
I’m a bit mystified. I have tried running ifuse /meda/iphone as root with no success, and checked the permissions of /media/iphone which are 777.
Also, just for completeness, the contents of /lib/udev/rules.d/85-usbmuxd.rules:
[phil@maki ~]$ cat /lib/udev/rules.d/85-usbmuxd.rules
# usbmuxd (iPhone “Apple Mobile Device” MUXer listening on /var/run/usbmuxd)
# Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3 and run usbmuxd
ACTION==”add”, SUBSYSTEM==”usb”, ATTR{idVendor}==”05ac”, ATTR{idProduct}==”129[0-9]“, ATTR{bConfigurationValue}!=”$attr{bNumConfigurations}”, ATTR{bConfigurationValue}=”$attr{bNumConfigurations}”, RUN+=”/usr/sbin/usbmuxd -u -U -v -v” OWNER=”usbmux”
# Exit usbmuxd when the last phone is removed
ACTION==”remove”, SUBSYSTEM==”usb”, ENV{PRODUCT}==”5ac/129[0-9]/*”, ENV{INTERFACE}==”255/*”, RUN+=”/usr/sbin/usbmuxd -x”
THanks,
Phil
OWNER must be in the right place. My first action line looks like this:
ACTION==”add”, SUBSYSTEM==”usb”, OWNER=”usbmux”, ATTR{idVendor}==”05ac”, ATTR{idProduct}==”129[0-9]“, ATTR{bConfigurationValue}!=”$attr{bNumConfigurations}”, ATTR{bConfigurationValue}=”$attr{bNumConfigurations}”, RUN+=”/usr/sbin/usbmuxd -u -U -v -v ”
I’m not sure if this helps. If not, you might want to run usbmuxd as root, just to test. Change RUN to use “-U root” or something like that.
I’d advice you to add more comments, and look at the other comments at marcan’s blog.
Good luck,
Ingvar
When I attempt to install a preview version of libgpod from http://users.linpro.no/ingvar/libgpod, as follow:
# rpm -i libgpod-0.7.3-0.git20100105.fc12.i686.rpm
I get the following error message:
file /usr/bin/ipod-read-sysinfo-extended from install of libgpod-0.7.3-0.git20100105.fc12.i686 conflicts with file from package libgpod-0.7.2-6.fc12.i686
file /usr/lib/hal/scripts/libgpod-callout from install of libgpod-0.7.3-0.git20100105.fc12.i686 conflicts with file from package libgpod-0.7.2-6.fc12.i686
file /usr/lib/libgpod.so.4 from install of libgpod-0.7.3-0.git20100105.fc12.i686 conflicts with file from package libgpod-0.7.2-6.fc12.i686
file /usr/share/hal/fdi/policy/20thirdparty/20-libgpod-sysinfo-extended.fdi from install of libgpod-0.7.3-0.git20100105.fc12.i686 conflicts with file from package libgpod-0.7.2-6.fc12.i686
file /usr/share/locale/de/LC_MESSAGES/libgpod.mo from install of libgpod-0.7.3-0.git20100105.fc12.i686 conflicts with file from package libgpod-0.7.2-6.fc12.i686
When I use the following command:
ipod-read-sysinfo-extended my_uuid_string /media/itouch
I get the following error message:
Couldn’t read xml sysinfo from 912817df64cbb1a2dded6719794d33187b3668b2
Any thoughts on how to fix?
* smconvey
> # rpm -i libgpod-0.7.3-0.git20100105.fc12.i686.rpm
>
> I get the following error message:
>
> file /usr/bin/ipod-read-sysinfo-extended from install of (…)
If you have an older version of libgpod installed, you want to upgrade, not install.
rpm -Uvh libgpod-0.7.3-0.git20100105.fc12.i686.rpm
> When I use the following command:
> ipod-read-sysinfo-extended my_uuid_string /media/itouch
>
> I get the following error message:
> Couldn’t read xml sysinfo from
> 912817df64cbb1a2dded6719794d33187b3668b2
>
> Any thoughts on how to fix?
Did you first mount your ipod with ifuse?
Do you have any directory /media/itouch/iTunes_Control/Device ? If not, create it.
# Make sure you have a valid mountpoint, accessible by your normal user
sudo mkdir -p /media/itouch
sudo chown `whoami` /media/itouch
# Mount your ipod
ifuse /media/itouch
# Check if you have a Device catalog. If not, create it
ls /media/itouch/iTunes_Control/Device || mkdir /media/itouch/iTunes_Control/Device
Good luck
Ingvar
# rpm -Uvh libgpod-0.7.3-0.git20100105.fc12.i686.rpm
error: Failed dependencies:
libgpod = 0.7.2-6.fc13 is needed by (installed) python-gpod-0.7.2-6.fc13.i686
libgpod = 0.7.2-6.fc13 is needed by (installed) libgpod-devel-0.7.2-6.fc13.i686
smconvey:
If you need those packages, you must update python-gpod and libgpod-devel as well. Matching packages at the same place:
http://users.linpro.no/ingvar/libgpod/0.7.3-0.git20100105/i686/
Ingvar
Awsome!! it works perfect!! thank you for this post! is fast, easy and well explained!
If you use Rhythmbox, do you still have to do the ipod-read-sysinfo-extended or can you just install te usbmux and libgpod stuff + gvfs-afc?
Philip,
I think you have to, but I’m not sure. It probably depends on if you have a working db, synced from iTunes or not. Please test and report back. The result will be interesting for others too, so drop a comment on marcan’s blog as well.
Ingvar
Just in the of trying this. Is there a typo for the OWNER= section of the rules. Should that be OWNER== (double equals sign)?
Philip,
No, I use a single equals sign.
Well I’ve got gtkpod working. But I can’t get Rhythmbox to load – it’s crashing on start due to the ipod. I even updated rhythmbox to rawhide. Trying to solve now.
Hello!
I’m using Fedora 12 and am following the steps in this tutorial.
However when I got to the point of installing your x86_64 RPMs in
http://users.linpro.no/ingvar/libgpod/0.7.3-0.git20100105/x86_64/
I hit a roadblock.
I did this:
yum –enablerepo rawhide install *.rpm
and got this:
…
–> Processing Dependency: pkgconfig(pixman-1) >= 0.12.0 for package: cairo-devel-1.8.8-3.fc12.x86_64
—> Package gtk2.i686 0:2.19.3-1.fc13 set to be updated
—> Package gtk2.x86_64 0:2.19.3-1.fc13 set to be updated
—> Package libXcomposite-devel.x86_64 0:0.4.1-2.fc13 set to be updated
–> Processing Dependency: libXcomposite = 0.4.1-2.fc13 for package: libXcomposite-devel-0.4.1-2.fc13.x86_64
—> Package libXcursor-devel.x86_64 0:1.1.10-3.fc13 set to be updated
–> Processing Dependency: libXcursor = 1.1.10-3.fc13 for package: libXcursor-devel-1.1.10-3.fc13.x86_64
—> Package libXi-devel.x86_64 0:1.3-1.fc13 set to be updated
–> Processing Dependency: libXi = 1.3-1.fc13 for package: libXi-devel-1.3-1.fc13.x86_64
—> Package libXinerama-devel.x86_64 0:1.1-1.fc13 set to be updated
–> Processing Dependency: libXinerama = 1.1-1.fc13 for package: libXinerama-devel-1.1-1.fc13.x86_64
—> Package libgpod.x86_64 0:0.7.3-0.git20100105.fc12 set to be updated
–> Processing Dependency: libplist.so.0()(64bit) for package: libgpod-0.7.3-0.git20100105.fc12.x86_64
—> Package pango-devel.x86_64 0:1.26.2-1.fc12 set to be updated
–> Running transaction check
—> Package atk.i686 0:1.29.4-2.fc13 set to be updated
—> Package atk.x86_64 0:1.29.4-2.fc13 set to be updated
—> Package libXcomposite.i686 0:0.4.1-2.fc13 set to be updated
—> Package libXcomposite.x86_64 0:0.4.1-2.fc13 set to be updated
—> Package libXcursor.i686 0:1.1.10-3.fc13 set to be updated
—> Package libXcursor.x86_64 0:1.1.10-3.fc13 set to be updated
—> Package libXi.i686 0:1.3-1.fc13 set to be updated
—> Package libXi.x86_64 0:1.3-1.fc13 set to be updated
—> Package libXinerama.i686 0:1.1-1.fc13 set to be updated
—> Package libXinerama.x86_64 0:1.1-1.fc13 set to be updated
—> Package libgpod.x86_64 0:0.7.3-0.git20100105.fc12 set to be updated
–> Processing Dependency: libplist.so.0()(64bit) for package: libgpod-0.7.3-0.git20100105.fc12.x86_64
—> Package pixman-devel.x86_64 0:0.17.4-1.fc13 set to be updated
–> Processing Dependency: pixman = 0.17.4-1.fc13 for package: pixman-devel-0.17.4-1.fc13.x86_64
–> Running transaction check
—> Package libgpod.x86_64 0:0.7.3-0.git20100105.fc12 set to be updated
–> Processing Dependency: libplist.so.0()(64bit) for package: libgpod-0.7.3-0.git20100105.fc12.x86_64
—> Package pixman.i686 0:0.17.4-1.fc13 set to be updated
—> Package pixman.x86_64 0:0.17.4-1.fc13 set to be updated
–> Finished Dependency Resolution
libgpod-0.7.3-0.git20100105.fc12.x86_64 from /libgpod-0.7.3-0.git20100105.fc12.x86_64 has depsolving problems
–> Missing Dependency: libplist.so.0()(64bit) is needed by package libgpod-0.7.3-0.git20100105.fc12.x86_64 (/libgpod-0.7.3-0.git20100105.fc12.x86_64)
Error: Missing Dependency: libplist.so.0()(64bit) is needed by package libgpod-0.7.3-0.git20100105.fc12.x86_64 (/libgpod-0.7.3-0.git20100105.fc12.x86_64)
You could try using –skip-broken to work around the problem
You could try running: package-cleanup –problems
package-cleanup –dupes
rpm -Va –nofiles –nodigest
[Exit 1]
Can you suggest a work-around?
Thanks again,
I feel like I’m so close to getting this working ….
I followed instructions to the word and read all the posts …
Everything is installed as far as I know …
I am able to mount and unmount and see all the files …
here is where i get hung up ….
[mark@scorpion ~]$ ls /media/iphone/iTunes_Control/iTunes/
IC-Info.sidb iTunesDB Rentals.plist VoiceMemos.plist
IC-Info.sidv iTunes Library.itlp Ringtones.plist
iTunesCDB iTunesPrefs ShowMarketing
iTunesControl iTunesPrefs.plist ShowRegistration
[mark@scorpion ~]$ sudo lsusb -v | grep -i iSerial iSerial 1 0000:00:1d.1
iSerial 3 8dc60b124e697aa33411cc5576b8365a257cfe07
iSerial 1 0000:00:1d.7
iSerial 1 0000:00:1d.2
iSerial 1 0000:00:1d.0
iSerial 1 0000:00:1d.3
iSerial 0
[mark@scorpion ~]$ ipod-read-sysinfo-extended 8dc60b124e697aa33411cc5576b8365a257cfe07 /media/iphone
Segmentation fault
update …
rebooted and now i can’t even mount device ???
[mark@scorpion ~]$ ifuse /media/iphone/
usbmuxd_get_device_list: error opening socket!
No device found, is it connected?
If it is make sure that your user has permissions to access the raw usb device.
If you’re still having issues try unplugging the device and reconnecting it.
Markus,
I have never seen that before. What Fedora version do you run? Please post to marcan’s blog. You should probably try to recompile the package for your platform yourself, using my src rpm. I have uploaded a couple of newer versions of the source rpm, you may try git20100113 (works for me) and git20100129 (untested).
rpmbuild –rebuild libgpod-0.7.3-0.1.git20100113.fc12.src.rpm
You may have to install some deps to be able to compile the package. rpmbuild will tell you.
I’m running Fedora 12 !!!
I now got iphone to mount and unmount sucessfully by removing and re-installing everything but i still can\’t get thru
ls -sh /media/iphone/iTunes_Control/Device/SysInfoExtended
here is my output …
[mark@scorpion ~]$ ipod-read-sysinfo-extended 8dc60b124e697aa33411cc5576b8365a257cfe07 /media/iphone
Couldn\’t read xml sysinfo from 8dc60b124e697aa33411cc5576b8365a257cfe07
any idea whats going on here?
i can’t rebuild your rpm without errors
what am i missing ??????
itdb_iphone.c: In function ‘itdb_iphone_post_notification’:
itdb_iphone.c:51: error: passing argument 3 of ‘lockdownd_start_service’ from incompatible pointer type
/usr/include/libiphone/lockdown.h:77: note: expected ‘uint16_t *’ but argument is of type ‘int *’
itdb_iphone.c: In function ‘itdb_iphone_start_sync’:
itdb_iphone.c:105: error: too few arguments to function ‘lockdownd_client_new’
itdb_iphone.c:111: error: passing argument 3 of ‘lockdownd_start_service’ from incompatible pointer type
/usr/include/libiphone/lockdown.h:77: note: expected ‘uint16_t *’ but argument is of type ‘int *’
itdb_iphone.c: In function ‘itdb_iphone_stop_sync’:
itdb_iphone.c:250: error: too few arguments to function ‘lockdownd_client_new’
make[2]: *** [libgpod_la-itdb_iphone.lo] Error 1
make[2]: Leaving directory `/home/mark/rpmbuild/BUILD/libgpod-0.7.3/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mark/rpmbuild/BUILD/libgpod-0.7.3′
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.H4pnHB (%build)
RPM build errors:
user ingvar does not exist – using root
group ingvar does not exist – using root
user ingvar does not exist – using root
group ingvar does not exist – using root
user ingvar does not exist – using root
group ingvar does not exist – using root
user ingvar does not exist – using root
group ingvar does not exist – using root
user ingvar does not exist – using root
group ingvar does not exist – using root
Bad exit status from /var/tmp/rpm-tmp.H4pnHB (%build)
Yeah, I get that
itdb_iphone.c:51: error: passing argument 3 of ‘lockdownd_start_service’ from incompatible pointer type
too, using archlinux. git from <20. january worked for me
Markus,
You may double-check that the phone is still mounted. I found that the mount is a bit flaky, and I often need to reestablish the connectino. try to unmount and remount it like this:
fusermount -u /media/iphone
# unplug the phone
# replug the phone
ifuse /media/iphone
Then retry the sysinfo command again
Note that I’m just a packager, that luckily got this to work. A more efficient support channel is probably one of these options:
- Comments on marcan’s blog – that’s where I got my info from
- The libgpod mailing list
- The #gtkpod irc channel on the Freenode irc network
Blogs Search Engine…
Blogs Search Engine…
any chance you could put packages for libimobiledevice (just a rename of libiphone) and libgpod 0.7.90 in your repository? This would probably make things much easier for some people.
Hello, Christophe.
First, this is not a repo, just a bunch of rpms that works for me.
Second, the software used here is in constant motion, and not stabilized yet. I’ll update the packages with current names when I build new packages for myself. The last time I did, latest git checkout of libgpod did not even compile against latest libiphone/libimobiledevice.
So, perhaps, later.