28

I recently got an iPhone 6s. Is there a way to transfer files (music, photos, PDF, or really anything actually) between Ubuntu and the phone? It should not involve syncing via an internet service, as I may have the need to transfer large or private files. Also, I do not want to jailbreak the device.

There are a few results when searching for this on Google, but none seems very up to date.

Andrea
  • 1,339

8 Answers8

11

I don't know whether there's any difference between versions, but I can simply access the files of my iPhone 5s via the file manager when it's plugged over USB (using the AFC protocol).

I'm using iOS 9.2 beta, I have no idea whether it works on 9.1 or earlier. I can access the device from Nautilus' sidebar, if it doesn't show up, try navigating to the following address:

afc://<your iPhone's UDID>/

Also, most music players (at least Rythmbox, Banshee and Clementine) support music synchronization over AFC (Apple File Conduit).

EDIT: I just learned I can easily synchronize my pictures using tools like gThumb.

s3lph
  • 14,644
  • 12
  • 60
  • 83
4

libimobiledevice can be installed via a graphics package mgr. or by terminal.

sudo apt install usbmuxd libimobiledevice6 libimobiledevice-utils
mkdir ~/iPhone
ifuse ~/iPhone

(mount directory)

Here

QRCP link

Nishnabe
  • 398
3

Apple constantly breaks Linux applications' access to iPhones. As of 2019, the best way of uploading and downloading files is to use a 3rd party app on iOS. Apparently, the file you upload is only accessible by that 3rd app.

Phone Drive is a good app for this. First, take note of the IP address of your iPhone, then, when PhoneDrive is in the foreground, typing the IP address of the iPhone from a PC connected to the same local area network would give you a website where you can upload and download files. You can also use FTP protocol on the same iPhone IP address. Phone Drive supports playback of a lot of video and music formats.

https://itunes.apple.com/us/app/phone-drive-file-storage-sync/id431033044

1

Sandisk now makes a USB device that plugs directly into the iphone and can backup and move pictures, music, calendar items, and some file items. It can't do notes and some other items, but what it does it does very well. It is especially nice for multiple large video files. Just dump it on the usb pen drive and plug it into whatever and move the files over.

Barry
  • 11
1

Try LocalSend.

  • Decentralized: Share files without a central server. The file transfer is completely peer-to-peer.

  • Cross-platform: Available for Windows, macOS, Linux, Android, and iOS.

  • Free to use: No ads, no tracking, no hidden costs.

  • Open Source: The source code is publicly available. Everyone can contribute to the project.

  • Secure: End-to-end encryption ensures that only you and the recipient can access your files.

  • Easy to Use: A simple user interface without registration. Other devices are discovered automatically.

https://news.ycombinator.com/item?id=39662721

Nirmal
  • 111
0

FREE and best way for me is installing a webserver in your local machine and share everything via Safari browser on the iPhone, this are the steps YMMV

sudo apt install nginx php-fpm git
mkdir ~/iphoneFiles
sudo nano /etc/nginx/sites-available/default

Delete everything in there and put something like this, remember to modify <YOUR-USER> and if necessary change the php version php7.4-fpm.sock

server {
    listen 80;
    server_name localhost;
root /home/&lt;YOUR-USER&gt;/iphoneFiles/elFinder;

index elfinder.src.html;

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
 }

}

Installing https://github.com/Studio-42/elFinder

cd ~/iphoneFiles
git clone https://github.com/Studio-42/elFinder.git

Configuring elFinder

mv elFinder/php/connector.minimal.php-dist connector.minimal.php

Setting the (probably) right permissions for the upload folder

sudo usermod -a -G www-data $USER
sudo chown -R $USER:www-data elFinder/files/
sudo chmod a+rwx,o-rwx,ug+s elFinder/files/
ln -s ~/iphoneFiles/elFinder/files/ ~/Documents/iphoneFiles

Making nginx to load the new set directives

sudo service nginx reload

Now get your local network IP

hostname -i | awk '{print $1}'

Enter with your iPhone to that IP and start uploading pictures or whatever you want

note: you will need to modify elFinder setting to allow upload of all types of files

sed -i 's/.*uploadDeny.*/'uploadDeny' => array(''),/' elFinder/php/connector.minimal.php
sed -i 's/.*uploadDeny.*/'uploadAllow' => array('all'),/' elFinder/php/connector.minimal.php

If you did everything good you should have your files in:

~/Documents/iphoneFiles
D.Snap
  • 333
0

To achieve this goal for my girlfriend I prepared a local Nextcloud docker-compose.yml : https://github.com/jclaveau/nextcloud-localhost-docker-compose

Simply clone it, install docker, run start.sh then you can access it with http://your.local.network.ip.

As credentials use:

  • username: the logged user running start.sh
  • password: same as username
0

It is not easy to send the music to your iTunes library, but you can install VLC from the Appstore. You will find a "Documents" folder in another Bookmark on the left next to the "iPhone" Bookmark in Ubuntus Filemanager (Nautilus)

Note that you should manage your id3-tags correctly, otherwise you get a mess in VLC which cannot sort by Foldernames

rubo77
  • 34,024
  • 52
  • 172
  • 299