「IOS」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(訳追加)
 
(4人の利用者による、間の17版が非表示)
1行目: 1行目:
 
{{Lowercase title}}
 
{{Lowercase title}}
[[Category:サウンド]]
+
[[Category:IOS]]
  +
[[en:iOS]]
[[Category:携帯端末]]
 
[[en:iPod]]
 
[[fr:iPod]]
 
 
{{Related articles start}}
 
{{Related articles start}}
  +
{{Related|オーディオブック}}
{{Related4|Audiobook}}
 
{{Related|iOS のアップレード}}
+
{{Related|iPhone テザリング}}
  +
{{Related|iPod}}
 
{{Related articles end}}
 
{{Related articles end}}
この記事では Arch Linux で idevice を使用する方法を説明します。
 
   
  +
[https://www.apple.com/ios/ iOS] は、Apple Inc.が開発した iPhone シリーズのスマートフォン向け OS です。 iOS デバイスを Linux に接続することは Apple によってサポートされていませんが、[https://libimobiledevice.org/ libimobiledevice] プロジェクトは、iOS デバイスと Linux マシン間で接続してデータを転送するためのライブラリとツールを提供します。
== 必要なパッケージ ==
 
[[Thunar]] や [[GNOME Files]] で iOS デバイスを扱うには、{{pkg|gvfs-afc}} と {{pkg|usbmuxd}} をインストールして下さい。インストール後 X を再起動します。それで Thunar や Files に iOS デバイスが表示されるはずです。KDE のファイルマネージャではテストしていません。
 
   
  +
{{Tip|[[KDE#KDE Con​​nect]] は、iOS と Linux 間のファイル転送にも使用できます。}}
{{Note|全ての依存パッケージは gvfs-afc をインストールする際に同時にインストールされます。}}
 
   
== iPod のマウントポイントの変更 ==
+
== インール ==
   
  +
{{Pkg|libimobiledevice}} パッケージを[[インストール]]します。
伝統的に iPod は vfat ファイルシステム (稀に {{ic|hfsplus}}) が入っている普通の USB ストレージデバイスと[[USB ストレージデバイス|同じようにアクセス]]することができます。詳しい説明は[[USB ストレージデバイス]]の記事を見て下さい。
 
   
  +
== デバイスへの接続 ==
udisks2 が動作している場合、接続された iPod は {{ic|/run/media/''$USER''/''iPod name''}} にマウントされます (古い udisks は {{ic|/media/''<iPod name>''}} を使います)。
 
   
  +
=== Usbmux デーモン ===
iPod のボリュームラベルが長くて、空白や大文字・小文字が混じっていると、不便なことがあります。{{pkg|dosfstools}} パッケージの {{ic|dosfslabel}} を使うことでボリュームを簡単に好都合なように変更することが可能です:
 
   
  +
''libimobiledevice'' パッケージは {{pkg|usbmuxd}} に依存しており、iOS デバイスへの低レベル接続を実行します。''usbmuxd'' パッケージには、デバイスが接続または切断されるたびにデーモンを自動的に開始および停止する [[udev]] ルールも含まれています。
* 現在のボリュームラベルを取得・確認:
 
# dosfslabel /dev/sd''XY''
 
* 新しいボリュームラベルを設定:
 
# dosfslabel /dev/sd''XY'' ArchPod
 
* デバイスをアンマウント:
 
$ udisksctl unmount -b /dev/sd''XY''
 
* もう一度マウントしなおす:
 
$ udisksctl mount -b /dev/sd''XY''
 
{{ic|/dev/sdxx}} は iPod の現在のデバイスノードに置き換えてください。
 
   
  +
iOS デバイスを接続し、{{ic|usbmuxd.service}} が自動的に開始されることを確認します。
== 動画や写真のインポート ==
 
   
  +
{{hc|$ systemctl status usbmuxd.service|
通常は {{ic|''<mountpoint>''/DCIM/100APPLE}} で動画と写真の両方が見つかります。
 
  +
''...''
  +
Active: active (running) since Sun 2020-01-19 19:23:18 UTC; 22s ago
  +
''...''
  +
}}
   
=== HTML5 動画 ===
+
===ペアリング===
   
  +
iOS デバイスを接続して画面のロックを解除すると、デバイス上のポップアップで「このコンピューターを信頼しますか?」というメッセージが表示されます。 [信頼する] をタップし、デバイスのパスコードを入力してペアリングプロセスを完了します。
ffmpeg2theora を使って MOV ファイルを OGV などの HTML5 動画フォーマットに変換したいということもあるでしょう。作成日のメタデータは変換された動画に含まれないので、以下のようなスクリプトを使う必要があります:
 
   
  +
ポップアップが表示されない場合は、ペアリングプロセスを手動で開始できます。デバイスを接続し、画面のロックを解除して実行します。
find -name "*.MOV" | while read mov
 
do
 
d=$(gst-discoverer-0.10 -v $mov | awk '/datetime:/{print $2}' | tr -d \")
 
base=${mov%.*}
 
if test -f $base.ogv
 
then
 
touch -d${d} $base.ogv
 
ls -l $base.ogv
 
else
 
echo $base.ogv missing
 
fi
 
done
 
   
  +
{{hc|$ idevicepair pair|
And use {{ic|cp -a}} or {{ic|rsync -t}} in order to preserve the file's date & time.
 
  +
SUCCESS: Paired with device d8e8fca2dc0f896fd7cb4cb0031ba249
  +
}}
   
  +
複数の iOS デバイスが接続されている場合、{{ic|--udid ''ios_udid''}} パラメータをターゲットの特定のデバイスに渡すことができます。
=== 写真をインポートして削除する ===
 
   
  +
次のコマンドを実行して、ペアリングが成功したことを確認できます。
{{ic|''<mountpoint>''/DCIM/100APPLE}} から写真や動画を移動することはできますが、古いデータベースを削除して "Camera Roll" データベースを再作成させる必要があります。
 
   
  +
{{hc|$ idevicepair validate|
PhotoData$ sudo rm Photos* com.apple.photos.caches_metadata.plist
 
  +
SUCCESS: Validated pairing with device 00008030-001D3562367A402E
  +
}}
   
  +
=== データ転送 ===
== iPod 用に動画を変換 ==
 
   
  +
ペアリング後、iOS は 2 つの異なるファイルシステムをコンピューターに公開します。 1 つは、デバイスの写真、ビデオ、および音楽を含むメディア ファイル システムです。 2 番目のファイルシステムは、ファイルを特定のアプリと直接共有するために使用されます。これは「iTunes ドキュメント共有」と呼ばれることもあります。 [https://support.apple.com/en-us/HT201301] [https://www.hadess.net/2010/12/house-arrest-or-just-document-sharing.html]
=== 第 5/5.5 世代 ===
 
   
  +
==== グラフィカルファイルマネージャーの使用 ====
=== Handbrake ===
 
   
  +
[[GVFS]] を使用するファイル マネージャーは、iOS デバイスとやり取りできます。メディアファイルシステムにアクセスするには、{{Pkg|gvfs-gphoto2}}を[[インストール]]します。アプリ文書ファイルシステムにアクセスするには、{{Pkg|gvfs-afc}} をインストールします。
[http://handbrake.fr/ Handbrake] は様々なバージョンの iPod 用のプリセットが入っている気の利いたツールです。CLI と GTK 版がそれぞれ {{pkg|handbrake-cli}} と {{pkg|handbrake}} として pacman でインストールできます。
 
   
  +
{{Note|メディアファイルシステムにアクセスする場合、GVFS はデバイスの写真とビデオのみを公開し、音楽は公開しません。}}
CLI で使うときは、http://trac.handbrake.fr/wiki/CLIGuide にガイドがあります。
 
   
  +
[[Dolphin]] を使用して iOS ファイルにアクセスするには、{{AUR|solid-git}} と {{AUR|kio-extras-git}} をインストールします。これにより、メディアとアプリ ドキュメントの両方のファイル システムが公開されます。 [https://blog.broulik.de/2022/11/introducing-kio-afc/]
==== DVD to iPod ====
 
'''Get from:''' {{AUR|podencoder}}<br>
 
'''Depends on:''' aur/gpac mplayer
 
   
  +
==== 手動でマウント ====
Has detailed help, and is fairly self explanatory.
 
   
  +
{{Pkg|ifuse}} パッケージを[[インストール]]します。次に、以下のコマンドを実行して、iPhone のメディアファイルシステムをマウントします。
もしくは [[光学ディスクドライブ#DVD|DVD リッピング]]に書かれている方法を使って、iPod が対応しているフォーマットに変換することもできます。
 
   
  +
$ ifuse ''mountpoint''
==== Video File to iPod ====
 
'''Get from:''' http://thomer.com/howtos/mp4ize<br>
 
'''Depends on:''' {{pkg|mplayer}}
 
   
  +
これを使用して、{{ic|''mountpoint''/DCIM}} 内のデバイスの写真にアクセスできます。
iPod や iPhone に対応する mp4 に動画ファイルを変換する Ruby スクリプトです。
 
   
  +
{{Note|デバイスの音楽データベースは、{{ic|''mountpoint''/iTunes_Control}} でもアクセスできます。この方法でデバイスに新しい曲を追加することはできませんが、デバイスからコンピュータに曲をコピーすることはできます。}}
=== 高度な方法 ===
 
   
  +
{{Template:Warning|iTunes_Control 内のデータベースを手動で編集すると、データベースが破損し、同期された曲がシステムの復元によってのみ削除できる古いデータになります。}}
==== Avidemux ====
 
公式リポジトリから {{Pkg|avidemux-gtk}} または {{Pkg|avidemux-qt}} をインストールしてください。
 
   
  +
アプリの文書ファイルシステムにアクセスするには、まずアプリを識別する必要があります。
Avidemux は mp4 ファイルに変換することができます。最大ビットレート @ 700 で動画サイズを 720x480 または 320x240 にすることで上手く動画ファイルを抽出できます。
 
   
  +
{{hc|$ ifuse --list-apps|
==== Mencoder ====
 
  +
"CFBundleIdentifier","CFBundleVersion","CFBundleDisplayName"
  +
"org.videolan.vlc-ios","432","VLC"
  +
"org.wikimedia.wikipedia","1932","Wikipedia"
  +
"org.kde.kdeconnect","2","KDE Connect"
  +
[...]
  +
}}
   
  +
その後、以下を使用してアプリケーションのファイルをマウントできます。
公式リポジトリから {{pkg|mplayer}} パッケージを[[インストール]]してください。
 
   
  +
$ ifuse --documents ''APPID'' ''mountpoint''
Has ''extremely'' comprehensive configuration support, which will be able to spit out iPod-compatible video files. Check out {{ic|man mencoder}}; a lot of MPlayer opts will also affect encoding.
 
   
  +
''APPID'' は {{ic|org.videolan.vlc-ios}} などの目的のアプリケーションのバンドル ID です。
基本的なガイドは [[MEncoder]] を見てください。
 
   
  +
完了したら、ファイルシステムをアンマウントします。
iPhone/iPod Touch に対応する動画をエンコードするコマンドの例:
 
   
  +
$ fusermount -u ''mountpoint''
mencoder INPUT -o output.mp4 \
 
-vf scale=480:-10,harddup \
 
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \
 
-of lavf -lavfopts format=mp4 \
 
-ovc x264 -x264encopts nocabac:level_idc=30:bframes=0
 
   
  +
== Importing videos and pictures ==
==== FFMpeg ====
 
   
  +
Both videos and photos can be found in typically in {{ic|''&lt;mountpoint&gt;''/DCIM/100APPLE}}.
公式リポジトリから {{pkg|ffmpeg}} パッケージを[[インストール]]してください。
 
   
  +
=== HTML5 videos ===
様々な設定をサポートしているエンコーダーです。第5世代 iPod 用にエンコードするコマンドの例:
 
   
  +
Typically you want to convert MOV files to a HTML5 video format like OGV using {{Pkg|ffmpeg2theora}}. Note that the creation date metadata is not in the converted video, so you need to use a script like:
ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 \
 
-g 300 -acodec aac -ab 96 -i INPUT -s 320x240 \
 
-aspect 4:3 output.mp4
 
   
  +
{{bc|1=
iPod Touch/iPhone 対応の動画を出力する例:
 
  +
#!/usr/bin/sh
   
  +
find -name "*.MOV" {{!}} while read mov
ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5\
 
  +
do
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i INPUT output.mp4
 
  +
d=$(gst-discoverer-1.0 -v $mov {{!}} awk '/datetime:/{print $2}' {{!}} tr -d \")
  +
base=${mov%.*}
  +
if test -f $base.ogv
  +
then
  +
touch -d${d} $base.ogv
  +
ls -l $base.ogv
  +
else
  +
echo $base.ogv missing
  +
fi
  +
done
  +
}}
   
  +
And use {{ic|cp -a}} or {{ic|rsync -t}} in order to preserve the file's date & time.
== iPhone/iPod Touch ==
 
 
=== イントロダクション ===
 
デフォルトでは、iPhone も iPod Touch も USB によるマスストレージ機能が存在しませんが、ファイルにアクセスするための方法が2つ存在しています。
 
 
一つ目は FUSE ファイルシステム SSHFS でデバイスをマウントする方法です。jailbreak をする必要があります。最近の iOS バージョンなら [http://www.ijailbreak.com/how-to/how-to-jailbreak-iphone-4s-absinthe-linux/ Absinthe] などを使うことで jailbreak をすることが出来ます。jailbreak した後、デバイスに SSH サーバーをインストールする必要があります。SSH サーバーのインストールは Cydia プログラムによって行うことが可能で、Cydia は jailbreak するときにデバイスにインストールされます。
 
 
もう一つの方法は [http://www.libimobiledevice.org/ iFuse] という名前の FUSE ファイルシステムを使う方法で、通常どおりに、USB でデバイスをマウントすることができるようになります。この方法はハックを必要とせず、大抵の場合は SSHFS による方法よりも簡単ですが、iFuse ソフトウェアはまだ開発初期段階であるということに注意する必要があります。ただし、最近は安定して使えるようになってきてはいます。
 
 
{{Note|The current releases of {{pkg|libgpod}} and {{pkg|gtkpod}} support the iPod Touch and the iPhone OS 3.1.x up to iOS 4.3.x. It is possible to transfer pictures and music without limitations.}}
 
 
次のページを参照: [https://help.ubuntu.com/community/PortableDevices/iPhone]
 
 
=== Making Friends with the Device ===
 
 
==== SSHFS ====
 
 
After this the easiest way to properly initialise a few things on the device's side is with the [http://launchpad.net/ipod-convenience iPod convenience script]. This is available in the AUR as {{AUR|ipod-convenience}}
 
 
Next do {{ic|modprobe fuse}} to actually load the fuse module. You may also want to add it to your MODULES array in {{ic|/etc/rc.conf}} to have it loaded on boot.
 
 
A few things may need changing in the script, depending on your setup. If you do not use sudo, replace:
 
sudo lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf "FirewireGuid: 0x%s" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo
 
with:
 
su -c "lsusb -v -d 05ac: | grep iSerial | awk '{print $3}' | cut -b1-16 | xargs printf \"FirewireGuid: 0x%s\" >> $MOUNTPOINT/iTunes_Control/Device/SysInfo"
 
in the file /usr/share/ipod-convenience/mount-umount. You may also need to replace:
 
PROCESS=`ssh root@$IPADDRESS ps x | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`
 
with:
 
PROCESS=`ssh root@$IPADDRESS ps ax | grep MobileMusicPlayer | grep -v grep | awk '{print $1}'`
 
(I'm not sure under what circumstances this is necessary; it was on my iPod Touch running 2.2.1, and it will not have any adverse affect under other firmware version)
 
 
After that, edit the {{ic|/etc/default/ipod-convenience}} file with details of your device's IP address, and create the mount point, which is {{ic|/media/ipod}} by default (make sure to set the permissions correctly if you want it accessible by a regular user)
 
 
To actually mount the device, run {{ic|ipod-touch-mount}} or {{ic|iphone-mount}} (they both do exactly the same thing so it doesn't matter which). This should prompt for the root password of the device twice, which is 'alpine' by default in firmware versions 1.1 and up. This will need to be done every time you want to sync. (This can be done without having to type the password each time by using SSH keys - see [[Using SSH Keys]] for more information)
 
 
==== iFuse ====
 
{{Note|If using an iPad/iPad2 that has a screen password, one must unlock the device to gain access through the USB interface.}}
 
{{Note|The current version of ifuse is unable to mount an iPad2 using iOS v5.0.1. The git version of libimobiledevice in AUR works with an iPod using iOS v5.1.1}}
 
 
{{Pkg|usbmuxd}}, {{Pkg|libplist}}, {{Pkg|libimobiledevice}}, {{Pkg|ifuse}} をインストールする必要があります。libimobiledevice は ifuse と usbmuxd から依存されているので、次のコマンドで4つのパッケージがインストールできます:
 
# pacman -S ifuse usbmuxd libplist
 
Now make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in {{ic|/etc/rc.conf}} already.
 
 
You can now mount your device. Make sure it is unlocked before you plug it in, or it won't be recognized.
 
# ifuse <mountpoint>
 
The mountpoint field is where you want to have it mounted.
 
 
And you're done! You should be able to point your syncing software of choice to the mount point and be able to transfer files.
 
 
To unmount your device:
 
# umount <mountpoint>
 
 
==== HashInfo ファイルの生成 ====
 
If you have not previously synced your device using iTunes specifically, you will get error messages telling you that the HashInfo file is missing. This can be fixed by making an iTunes installation on MacOS or Windows create it (by plugging in the iPod there). Alternatively you can create this file yourself, instructions can be found on [http://ihash.marcansoft.com/ this website].
 
 
=== データベースの難読化解除 ===
 
 
ファームウェアバージョン 2.0 から、Apple は音楽データベースを難読化しています。最近のファームウェアを使っている場合、{{ic|/System/Library/Lockdown/Checkpoint.xml}} ファイルを修正することで、昔の、簡単に読むことができるデータベースを有効にできます。以下の行を:
 
<key>DBVersion</key>
 
<integer>4</integer>
 
次のように置き換えてください:
 
<key>DBVersion</key>
 
<integer>2</integer>
 
その後、デバイスを再起動してください。
 
 
"ERROR: Unsupported checksum type '0' in cbk file generation!" と表示されて同期が失敗する場合、上記の値を4にしておく必要があります。libgpod は [http://gitorious.org/libgpod/libgpod/blobs/b9b83dc8b6c3d1f0c53ed32f05279ca838d54e02/src/itdb_sqlite.c#line2064 ハッシュ化されたデータベースを使うようです] 。
 
 
=== 同期 ===
 
 
[[#iPod 管理アプリ|iPod に対応しているお好きなプログラム]]を使って下さい。アプリケーションの設定はそれぞれ別ですが、大抵は、マウントポイントをプログラムに指定することで上手く動作するはずです。
 
 
同期後は、{{ic|ipod-touch-umount}} (または {{ic|iphone-umount}}) を実行して SSHFS ファイルシステムをアンマウントしてからデバイス上の {{ic|MobileMusicPlayer}} プロセスを再起動させることで、新しい音楽データベースが読み込まれます。
 
 
iFuse を使用している場合は、次を入力するだけです:
 
# umount <mountpoint>
 
You will still need to reload the MobileMusicPlayer process. If your device is not jailbroken, then you are stuck restarting it.
 
 
=== iFuse - iPhone OS 3.x と 4.x ===
 
{{Warning|このソフトウェアは不安定だとされており、本番環境で使うのは推奨されません。}}
 
 
Make sure you already installed base-devel, which contains several programs needed to compile your new components. If you did not, just run:
 
 
# pacman -S base-devel
 
 
which will install everything you will need.
 
 
You will need to install {{Pkg|libplist}}, {{Pkg|libimobiledevice}}, {{Pkg|libgpod}}, {{Pkg|usbmuxd}} and {{Pkg|ifuse}}.
 
 
Now make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in /etc/rc.conf already.
 
Check if the group "usbmux" has been created and add your user using
 
# gpasswd -a <user> usbmux
 
 
To make sure the new rules apply, execute
 
$ udevadm control --reload-rules
 
and plug in your iPod/iPhone.
 
 
Run as ROOT:
 
# usbmuxd
 
Now you should the be able to mount your device by running
 
$ ifuse ~/ipod
 
or similar. Make sure the directory used exists and is accessible to your user.
 
 
Mount the device and create the iTunes_Control/Device directory. Then, get your UUID. It should be in the syslog from usbmuxd, or you can find it by running
 
$ lsusb -v | egrep "iSerial.*[a-f0-9]{40}"
 
It should be 40 characters long. Then, run
 
$ ipod-read-sysinfo-extended <uuid> <mountpoint>.
 
This should generate a file named {{ic|iTunes_Control/Device/SysInfoExtended}}.
 
 
Now, start up your favourite app, it should detect the device via libgpod.
 
I recommend using gtkpod-git for the time being, as that is what the libgpod developers seem to be using for debugging purposes.
 
 
{{Note|If gtkpod/gtkpod-git seems to work only from root/sudo while your user only gets the slash screen, you can delete your {{ic|~/.gtkpod}} folder and retry. Note that gtkpod will forget your preferences.}}
 
 
=== Rhythmbox ===
 
 
Rhythmbox は Gnome Virtual File System を使ってモバイルデバイスを検出します。iFuse を使っている場合、{{Pkg|gvfs-afc}} をインストールする必要があります:
 
# pacman -S gvfs-afc
 
 
== iPod Classic/Nano3g ==
 
 
You need to set up the iPod to make libgpod able to find its FireWire ID. For this, you will need to get your FireWire ID manually
 
 
1) Mount the iPod as a rw mount point. In the following example, I will use {{ic|/mnt/ipod}}.
 
 
2 ) Find the serial number by typing
 
 
sudo lsusb -v | grep -i Serial
 
 
this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens)
 
 
3) Once you have that number, create or edit {{ic|/mnt/ipod/iPod_Control/Device/SysInfo}}. Add to that file the line below:
 
 
FirewireGuid: 0xffffffffffffffff
 
 
(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and do not forget the leading 0x before the string)
 
 
Your iPod can now be managed with Amarok or gtkpod.
 
 
== iPod 管理アプリ ==
 
*[http://live.gnome.org/Rhythmbox Rhythmbox]
 
**GTK インターフェイス ([[GNOME|GNOME]])
 
**公式の GNOME プロジェクトに入っています。
 
**高速で軽量なインターフェイス。
 
**コンピュータと iPod の音楽を管理
 
**Download or stream podcasts and video podcasts
 
**Queue up songs and podcasts
 
**Last.fm integration
 
**Live radio stations
 
**Jamendo and Magnatune support
 
**Audio CD burning
 
**Album cover display
 
**Song lyrics display
 
**DAAP sharing
 
   
  +
== Troubleshooting ==
*[http://banshee.fm Banshee]
 
**GTK インターフェイス (GNOME)
 
**Mono を使っているため、やや重く、rhythmbox よりもリソースを消費します
 
**Device Sync: Sync your music and videos to your Android, iPod, or other device - or import its media
 
**Podcasts: Download or stream podcasts and video podcasts
 
**Play Queue: Queue up songs, videos, and podcasts, or let the Auto DJ take over
 
**Shuffle Modes: Shuffle (or Auto DJ) by artist, album, rating, or even songs' acoustic similarity
 
**Album Art: Artwork is automatically fetched as you listen
 
**Powerful Search, Smart Playlists: Find exactly what you want, fast
 
**Video Support: All the power of Banshee, now for your videos
 
   
  +
=== ifuse fails to mount application directories ===
*[http://www.yamipod.com Yamipod]
 
**GTK インターフェイス (GNOME)
 
**super lightweight application for managing ONLY music on your iPod (not on your computer)
 
**easy ratings edit
 
**PC から iPod に同期
 
**News RSS and podcasts to iPod upload
 
**Last.fm サポート
 
**playlist サポート
 
   
  +
When using ''ifuse'' to mount application directories, you may run into the following error when trying to list the contents of the mountpoint:
*[http://www.gtkpod.org gtkpod]
 
**GTK インターフェイス (GNOME)
 
**Read your existing iTunesDB (i.e. import the existing contents of your iPod including play counts, ratings and on-the-go playlists).
 
**Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the **iPod. You need a third party product to download podcasts, like 'bashpodder' or 'gpodder'
 
**View, add and modify Cover Art
 
**Browse the contents of your local hard disk by album/artist/genre by adding all your songs to the 'local' database. From there the tracks can be **dragged over to the iPod/Shuffle easily.
 
**Create and modify playlists, including smart playlists.
 
**You can choose the charset the ID3 tags are encoded in from within gtkpod. The default is the charset currently used by your locale setting.
 
**Extract tag information (artist, album, title...) from the filename if you supply a template.
 
**Detect duplicates when adding songs (optional).
 
**Remove and export tracks from your iPod.
 
**Modify ID3 tags -- changes are also updated in the original file (optional).
 
**Refresh ID3 tags from file (if you have changed the tags in the original file).
 
**Sync directories.
 
**Normalize the volume of your tracks (uses mp3gain or the replay-gain tag)
 
**Write the updated iTunesDB and added songs to your iPod.
 
**Work offline and synchronize your new playlists / songs with the iPod at a later time.
 
**Export your korganizer/kaddressbook/Thunderbird/evocalendar/evolution/webcalendar... data to the iPod (scripts for other programs can be added).
 
   
  +
".": Input/output error (os error 5)
*[http://www.floola.com Floola]
 
**GTK インターフェイス (GNOME)
 
   
  +
This is a [https://github.com/libimobiledevice/ifuse/issues/63 known issue] that has been fixed in the current development version of libimobiledevice, but has not been released in a stable version yet. A workaround is to install {{Aur|libimobiledevice-git}}.
*[http://amarok.kde.org/ Amarok]
 
**KDE/qt インターフェイス
 
   
  +
=== Device cannot be redirected to a virtual machine ===
*[http://qpod.sourceforge.net qPod]
 
**KDE/qt インターフェイス
 
**GNUpod のフロントエンド
 
   
  +
If you use a Windows virtual machine to sync your device via USB, trying to redirect it may fail with a "device is in use by another application" message. This is due to {{ic|usbmuxd.service}} starting automatically when the device is connected. This can be solved by either [[systemd#Using units|stopping or masking]] {{ic|usbmuxd.service}}.
*[http://www.gnu.org/software/gnupod/ GNUpod]
 
**コマンドラインのみ
 
   
  +
== See also ==
*[http://www.jakpod.de/ jakpod]
 
** JakPod は Java で書かれており、音楽や動画ファイルを iPod にコピーすることができます。
 
** 第6世代 iPod Nano サポート
 
** {{AUR|jakpod}}
 
   
  +
* [https://help.ubuntu.com/community/PortableDevices/iPhone Ubuntu documentation for iPhone and iPod Touch] (not updated since 2014)
== 参照 ==
 
  +
* [http://wiki.gotux.net/code/perl/atget Apple trailers downloader script]{{Dead link|2020|03|29|status=domain name not resolved}}
* [http://help.ubuntu.com/community/PortableDevices/iPhone iPhone/iPod Touch のサポートに関する詳細情報]
 
* [http://wiki.gotux.net/code/perl/atget Apple トレイラーのダウンロードスクリプト]
 

2022年12月17日 (土) 09:04時点における最新版

関連記事

iOS は、Apple Inc.が開発した iPhone シリーズのスマートフォン向け OS です。 iOS デバイスを Linux に接続することは Apple によってサポートされていませんが、libimobiledevice プロジェクトは、iOS デバイスと Linux マシン間で接続してデータを転送するためのライブラリとツールを提供します。

ヒント: KDE#KDE Con​​nect は、iOS と Linux 間のファイル転送にも使用できます。

インストール

libimobiledevice パッケージをインストールします。

デバイスへの接続

Usbmux デーモン

libimobiledevice パッケージは usbmuxd に依存しており、iOS デバイスへの低レベル接続を実行します。usbmuxd パッケージには、デバイスが接続または切断されるたびにデーモンを自動的に開始および停止する udev ルールも含まれています。

iOS デバイスを接続し、usbmuxd.service が自動的に開始されることを確認します。

$ systemctl status usbmuxd.service
...
Active: active (running) since Sun 2020-01-19 19:23:18 UTC; 22s ago
...

ペアリング

iOS デバイスを接続して画面のロックを解除すると、デバイス上のポップアップで「このコンピューターを信頼しますか?」というメッセージが表示されます。 [信頼する] をタップし、デバイスのパスコードを入力してペアリングプロセスを完了します。

ポップアップが表示されない場合は、ペアリングプロセスを手動で開始できます。デバイスを接続し、画面のロックを解除して実行します。

$ idevicepair pair
SUCCESS: Paired with device d8e8fca2dc0f896fd7cb4cb0031ba249

複数の iOS デバイスが接続されている場合、--udid ios_udid パラメータをターゲットの特定のデバイスに渡すことができます。

次のコマンドを実行して、ペアリングが成功したことを確認できます。

$ idevicepair validate
SUCCESS: Validated pairing with device 00008030-001D3562367A402E

データ転送

ペアリング後、iOS は 2 つの異なるファイルシステムをコンピューターに公開します。 1 つは、デバイスの写真、ビデオ、および音楽を含むメディア ファイル システムです。 2 番目のファイルシステムは、ファイルを特定のアプリと直接共有するために使用されます。これは「iTunes ドキュメント共有」と呼ばれることもあります。 [1] [2]

グラフィカルファイルマネージャーの使用

GVFS を使用するファイル マネージャーは、iOS デバイスとやり取りできます。メディアファイルシステムにアクセスするには、gvfs-gphoto2インストールします。アプリ文書ファイルシステムにアクセスするには、gvfs-afc をインストールします。

ノート: メディアファイルシステムにアクセスする場合、GVFS はデバイスの写真とビデオのみを公開し、音楽は公開しません。

Dolphin を使用して iOS ファイルにアクセスするには、solid-gitAURkio-extras-gitAUR をインストールします。これにより、メディアとアプリ ドキュメントの両方のファイル システムが公開されます。 [3]

手動でマウント

ifuse パッケージをインストールします。次に、以下のコマンドを実行して、iPhone のメディアファイルシステムをマウントします。

$ ifuse mountpoint

これを使用して、mountpoint/DCIM 内のデバイスの写真にアクセスできます。

ノート: デバイスの音楽データベースは、mountpoint/iTunes_Control でもアクセスできます。この方法でデバイスに新しい曲を追加することはできませんが、デバイスからコンピュータに曲をコピーすることはできます。
警告: iTunes_Control 内のデータベースを手動で編集すると、データベースが破損し、同期された曲がシステムの復元によってのみ削除できる古いデータになります。

アプリの文書ファイルシステムにアクセスするには、まずアプリを識別する必要があります。

$ ifuse --list-apps
"CFBundleIdentifier","CFBundleVersion","CFBundleDisplayName"
"org.videolan.vlc-ios","432","VLC"
"org.wikimedia.wikipedia","1932","Wikipedia"
"org.kde.kdeconnect","2","KDE Connect"
[...]

その後、以下を使用してアプリケーションのファイルをマウントできます。

$ ifuse --documents APPID mountpoint

APPIDorg.videolan.vlc-ios などの目的のアプリケーションのバンドル ID です。

完了したら、ファイルシステムをアンマウントします。

$ fusermount -u mountpoint

Importing videos and pictures

Both videos and photos can be found in typically in <mountpoint>/DCIM/100APPLE.

HTML5 videos

Typically you want to convert MOV files to a HTML5 video format like OGV using ffmpeg2theora. Note that the creation date metadata is not in the converted video, so you need to use a script like:

#!/usr/bin/sh

find -name "*.MOV" | while read mov
do
    d=$(gst-discoverer-1.0 -v $mov | awk '/datetime:/{print $2}' | tr -d \")
    base=${mov%.*}
    if test -f $base.ogv
    then
        touch -d${d} $base.ogv
        ls -l $base.ogv
    else
        echo $base.ogv missing
    fi
done

And use cp -a or rsync -t in order to preserve the file's date & time.

Troubleshooting

ifuse fails to mount application directories

When using ifuse to mount application directories, you may run into the following error when trying to list the contents of the mountpoint:

".": Input/output error (os error 5)

This is a known issue that has been fixed in the current development version of libimobiledevice, but has not been released in a stable version yet. A workaround is to install libimobiledevice-gitAUR.

Device cannot be redirected to a virtual machine

If you use a Windows virtual machine to sync your device via USB, trying to redirect it may fail with a "device is in use by another application" message. This is due to usbmuxd.service starting automatically when the device is connected. This can be solved by either stopping or masking usbmuxd.service.

See also