LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2018, 01:05 PM   #1
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Question: Getting files from Linux to iOS (iPhone)


I'm trying to get files to an iPhone without using iTunes, which is not supported on Linux.

I can physically get the files to the iPhone (I'm using WebDAV and a client app on the iPhone for this). But I can't figure out how to get the files to the correct location.

Specifically, I'm trying to put an audiobook (an .m4b file) into a place on the iPhone where the default iBooks app can access it. I can get the file to some directory on the iPhone (iOS seems to work really really hard to obliterate the concept of files and directories). So I don't know where on the iPhone I actually got this file to. However, the WebDAV client that I used to move it from Linux can access the audiobook file. So I know it's on the iPhone ... somewhere. But the iBooks app cannot access the audiobook. Probably because it's walled off somewhere within iOS.

So my question is, (1) How do I move this audiobook from Linux to the iPhone where iBooks can access it (but without iTunes, since we don't have that on Linux)?, or, alternately, (2) How do I move it to the correct place for iBooks after I've already successfully gotten it down to the iPhone (but in what directory I have it in now, I haven't a clue). Looking into alternate (2), I've tried some "file manager" apps on the iPhone (most recently one named "Documents"), but these apps seem to be quite limited in how they can access the filesystem - no doubt this is iOS saying "my way, or the highway" - but I don't really know this for sure, it could be some user error on my part. I am brand new to iOS.

Last edited by haertig; 04-19-2018 at 01:07 PM.
 
Old 04-19-2018, 01:34 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
fat chance with every upgrade IOs does it outdates ilibimobile whatever that/them files are called that allows Linux to talk to iPhone. I did have a script I found On the internet using ifuse to mount the iPhone. Don't know if that still works. or where it is at even. Let me go look,
Code:
#!/bin/sh
#
# mount-iphone.sh
# This script attempts to mount or unmount the first connected ipod/iphone.
# Usage: ./mount-iphone.sh [mount | umount | echo_serial]
# It should be dash-friendly
#
# Written by Mohamed Ahmed, Dec 2010
#
# Refactored and extended by David Emerson, Feb 2012
#
# You can configure send_msg to use either a console echo, or notify-send.
# notify-send is part of the debian package, libnotify-bin
# The apple pictures in /usr/share/pixmaps are part of the gnome-desktop-data package
#
# uncomment the following if you want to see the mount command used:
# show_mount_cmd=1

# you can uncomment this line to see all the commands sh executes:
# set -x

show_msg ()
{
  # notify-send -t 4000 -u normal "mount-iphone" "$1" -i "/usr/share/pixmaps/apple-$2.png"
  echo "$1" >&2
}

get_device_ids ()
{
  # get the Apple vendor id (idVendor) from lsusb
  idVendor=$(lsusb -v 2>/dev/null | awk '/idVendor.*Apple/{print $2; exit}')
  [ -z "$idVendor" ] && { show_msg "Cannot find any Apple device" "red"; exit 1; }
  # get the device serial number (iSerial)
  iSerial=$(lsusb -v -d $idVendor: 2>/dev/null | awk '/iSerial/{print $3; exit}')
  [ -z "$iSerial" ] && { show_msg "Cannot find serial number of Apple device $idVendor" "red"; exit 1; }
}

is_mounted ()
{
  gvfs-mount -l | grep -i "mount.*$1" >/dev/null
}

mount_iphone ()
{
  [ -z $show_mount_cmd ] || echo gvfs-mount afc://$1/ >&2
  if gvfs-mount afc://$1/; then
    show_msg "mounted iphone with serial $1" "green"
  else
    show_msg "iphone mount failed" "red"
    exit 1
  fi
}

unmount_iphone ()
{
  ## now gvfs unmount the device
  [ -z $show_mount_cmd ] || echo gvfs-mount -u afc://$1/ >&2
  if gvfs-mount -u afc://$1/; then
    show_msg "unmounted iphone with serial $1" "red"
  else
    show_msg "iphone umount failed" "red"
    exit 1
  fi
}

case $1 in
  mount)
    get_device_ids
    is_mounted && { show_msg "$iSerial is already mounted" 'green'; exit; }
    mount_iphone $iSerial
    ;;
  umount|unmount)
    get_device_ids
    is_mounted || { show_msg "$iSerial is not mounted" 'red'; exit; }
    unmount_iphone $iSerial
    ;;
  echo_serial)
    get_device_ids
    echo $iSerial
    ;;
  '')
    get_device_ids
    is_mounted && show_msg "$iSerial is mounted" 'green' || show_msg "$iSerial is not mounted" 'red'
    ;;
  *)
    echo "Usage: $0 [mount | umount | echo_serial]"
    exit 1
    ;;
esac

exit 0
give it a try...

as far as putting stuff in like you're trying to do, I do believe they keep a xml type file that keeps track of that stuff added to the iPhone as well. I have not been able to get into my iPhone on Linux in a long while whenever I did to go looking around inside of it to see where everything is at. So I couldn't tell you.

Last edited by BW-userx; 04-19-2018 at 01:37 PM.
 
Old 04-19-2018, 08:29 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Airdroid supports IOS. I've been using it on my Android for several years, primarily for file transfer, and it works quite nicely. I have no way of testing it on an iPhone, though, as I refuse to enter the walled orchard. (I entered the Googleplex instead.)

You can use Airdroid locally without creating an Airdroid account. When you start Airdroid on your phone, it grabs an ip address from your wireless router; open that ip address in a browser on a computer and point it to port 8888 (eg., xxx.xxx.xxx.xxx:8888), and you can transfer files to and from computers in your LAN.

Last edited by frankbell; 04-19-2018 at 08:34 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connect Iphone iOS 11 with CentOS7 borisb2 Linux - Software 4 02-22-2018 06:35 AM
LXer: Apple engineers rebel, refuse to work on iOS amid FBI iPhone battle LXer Syndicated Linux News 0 03-19-2016 01:31 AM
LXer: Delicious irony: iPhone 5S and iOS 7 plagued by Blue Screen of Death LXer Syndicated Linux News 0 10-12-2013 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration