「IOS」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(序文を飜訳)
 
(同じ利用者による、間の1版が非表示)
12行目: 12行目:
 
{{Tip|[[KDE#KDE Con​​nect]] は、iOS と Linux 間のファイル転送にも使用できます。}}
 
{{Tip|[[KDE#KDE Con​​nect]] は、iOS と Linux 間のファイル転送にも使用できます。}}
   
== Installation ==
+
== インストール ==
   
[[Install]] the {{Pkg|libimobiledevice}} package.
+
{{Pkg|libimobiledevice}} パッケージを[[インストール]]します。
   
  +
== デバイスへの接続 ==
== Connecting to a device ==
 
   
=== Usbmux daemon ===
+
=== Usbmux デーモン ===
   
  +
''libimobiledevice'' パッケージは {{pkg|usbmuxd}} に依存しており、iOS デバイスへの低レベル接続を実行します。''usbmuxd'' パッケージには、デバイスが接続または切断されるたびにデーモンを自動的に開始および停止する [[udev]] ルールも含まれています。
The ''libimobiledevice'' package depends on {{pkg|usbmuxd}}, which is responsible for performing the low-level connection to iOS devices. The ''usbmuxd'' package also includes an [[udev]] rule that automatically starts and stops the daemon whenever a device is connected or disconnected.
 
   
Connect the iOS device and verify that {{ic|usbmuxd.service}} is automatically started.
+
iOS デバイスを接続し、{{ic|usbmuxd.service}} が自動的に開始されることを確認します。
   
 
{{hc|$ systemctl status usbmuxd.service|
 
{{hc|$ systemctl status usbmuxd.service|
30行目: 30行目:
 
}}
 
}}
   
=== Pairing ===
+
===ペアリング===
   
  +
iOS デバイスを接続して画面のロックを解除すると、デバイス上のポップアップで「このコンピューターを信頼しますか?」というメッセージが表示されます。 [信頼する] をタップし、デバイスのパスコードを入力してペアリングプロセスを完了します。
After connecting your iOS device and unlocking the screen, you should be presented with a "Trust This Computer?" popup on the device. Tap "Trust", then enter your device passcode to complete the pairing process.
 
   
  +
ポップアップが表示されない場合は、ペアリングプロセスを手動で開始できます。デバイスを接続し、画面のロックを解除して実行します。
If you do not see the popup, you can start the pairing process manually. Connect the device, unlock the screen and run:
 
   
 
{{hc|$ idevicepair pair|
 
{{hc|$ idevicepair pair|
40行目: 40行目:
 
}}
 
}}
   
  +
複数の iOS デバイスが接続されている場合、{{ic|--udid ''ios_udid''}} パラメータをターゲットの特定のデバイスに渡すことができます。
If you have multiple iOS devices connected {{ic|--udid ''ios_udid''}} parameter can be passed to target specific device.
 
   
  +
次のコマンドを実行して、ペアリングが成功したことを確認できます。
You can verify the pairing has succeeded by running:
 
   
 
{{hc|$ idevicepair validate|
 
{{hc|$ idevicepair validate|
48行目: 48行目:
 
}}
 
}}
   
=== Transferring data ===
+
=== データ転送 ===
   
After pairing, iOS exposes two different filesystems to the computer. One is the media filesystem, containing the device's photos, videos and music. The second filesystem is used for sharing files directly to certain apps. This is sometimes called "iTunes document sharing". [https://support.apple.com/en-us/HT201301] [https://www.hadess.net/2010/12/house-arrest-or-just-document-sharing.html]
+
ペアリング後、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]
   
  +
==== グラフィカルファイルマネージャーの使用 ====
==== Using a graphical file manager ====
 
   
  +
[[GVFS]] を使用するファイル マネージャーは、iOS デバイスとやり取りできます。メディアファイルシステムにアクセスするには、{{Pkg|gvfs-gphoto2}}を[[インストール]]します。アプリ文書ファイルシステムにアクセスするには、{{Pkg|gvfs-afc}} をインストールします。
File managers which use [[GVFS]] can interact with iOS devices. To access the media filesystem, [[install]] {{Pkg|gvfs-gphoto2}}. To access the app document filesystem, install {{Pkg|gvfs-afc}}.
 
   
  +
{{Note|メディアファイルシステムにアクセスする場合、GVFS はデバイスの写真とビデオのみを公開し、音楽は公開しません。}}
{{Note|When accessing the media filesystem, GVFS will only expose the device's photos and videos, not music.}}
 
   
To access iOS files using [[Dolphin]], install {{AUR|solid-git}} and {{AUR|kio-extras-git}}. This will expose both the media and app document filesystems. [https://blog.broulik.de/2022/11/introducing-kio-afc/]
+
[[Dolphin]] を使用して iOS ファイルにアクセスするには、{{AUR|solid-git}} {{AUR|kio-extras-git}} をインストールします。これにより、メディアとアプリ ドキュメントの両方のファイル システムが公開されます。 [https://blog.broulik.de/2022/11/introducing-kio-afc/]
   
==== Manual mounting ====
+
==== 手動でマウント ====
   
  +
{{Pkg|ifuse}} パッケージを[[インストール]]します。次に、以下のコマンドを実行して、iPhone のメディアファイルシステムをマウントします。
[[Install]] the {{Pkg|ifuse}} package. You can then run the following command to mount your iPhone's media filesystem:
 
   
 
$ ifuse ''mountpoint''
 
$ ifuse ''mountpoint''
   
  +
これを使用して、{{ic|''mountpoint''/DCIM}} 内のデバイスの写真にアクセスできます。
You can use this to access the device's photos inside {{ic|''mountpoint''/DCIM}}.
 
   
  +
{{Note|デバイスの音楽データベースは、{{ic|''mountpoint''/iTunes_Control}} でもアクセスできます。この方法でデバイスに新しい曲を追加することはできませんが、デバイスからコンピュータに曲をコピーすることはできます。}}
{{Note|The device's music database will also be accessible in {{ic|''mountpoint''/iTunes_Control}}. You cannot add new songs to the device this way, but you can copy songs from the device to your computer.}}
 
   
  +
{{Template:Warning|iTunes_Control 内のデータベースを手動で編集すると、データベースが破損し、同期された曲がシステムの復元によってのみ削除できる古いデータになります。}}
{{Template:Warning|Manually editing the databases inside iTunes_Control will result in their corruption, and turn your synced songs into stale data that can only be removed with a system restore.}}
 
   
  +
アプリの文書ファイルシステムにアクセスするには、まずアプリを識別する必要があります。
To access an app's document filesystem, first you need to identify the app:
 
   
 
{{hc|$ ifuse --list-apps|
 
{{hc|$ ifuse --list-apps|
82行目: 82行目:
 
}}
 
}}
   
  +
その後、以下を使用してアプリケーションのファイルをマウントできます。
You can then mount an application's files using:
 
   
 
$ ifuse --documents ''APPID'' ''mountpoint''
 
$ ifuse --documents ''APPID'' ''mountpoint''
   
Where ''APPID'' is the bundle identifier of the desired application, such as {{ic|org.videolan.vlc-ios}}.
+
''APPID'' {{ic|org.videolan.vlc-ios}} などの目的のアプリケーションのバンドル ID です。
   
  +
完了したら、ファイルシステムをアンマウントします。
After you're done, unmount the filesystem:
 
   
 
$ fusermount -u ''mountpoint''
 
$ fusermount -u ''mountpoint''

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