summaryrefslogtreecommitdiffstats
path: root/README
blob: bce08082707db5255d852f831fae012d7a68daa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
INSTALLATION
================================================================================

For:
	Apple iPhone/iPod Touch 1.0/1.1/1.1.1/1.2/1.3/2.0+
	+ iPod USB cable

You must have:
	libgnutls-dev
	libusb-dev
	libfuse-dev (and the associated kernel modules)
	libglib2.0-dev
	libxml2-dev
	make
	autoheader
	automake
	autoconf
	gcc

To compile run:
	./autogen.sh
	./configure
	make
	sudo make install  # (if you want to install it into your system directories)
	libiphone-initconf  # (as the user you intend to user the library)

On Ubuntu/Debian, you can do:
	sudo apt-get install build-essential automake autoconf \
          libgnutls-dev libusb-dev libfuse-dev libglib2.0-dev libxml2-dev

USAGE
================================================================================

Now comes the fun bit!

== Generating keys ==

IMPORTANT: Before using the library you must run "libiphone-initconf"
as your own user (not root). It will generate keys and a host id for your
system to be able to communicate with 'lockdownd' on the iPhone.

It will probably take 5-10 minutes, but thankfully only needs to be
run _once_.   It MUST be run otherwise communication will not work:

	libiphone-initconf

The generated keys are saved in '~/.config/libiphone/' in your home directory.

== Tools ==

There are currently two more executables 'ifuse' and 'iphoneclient',
both located in src/.


=== iFuse ===

This is probably what you're after; this mounts a view of your
iPhone/iPod Touch's filesystem over the USB interface using the native
Apple protocol (AFC/"com.apple.afc").

ifuse is a Fuse filesystem which allows you to mount your iPhone to a directory
like this:

	./src/ifuse <mountpoint> -s

To unmount:
	umount <mountpoint>

(nb: '-s' is to force single-threaded mode, as ifuse maybe unstable without it).

Eg:
	mkdir ~/iphone

	ifuse ~/iphone -s
	ls -l ~/iphone
	...
	umount ~/iphone	

Currently ifuse (via the AFC protocol) only gives access to the
'/var/root/Media/' chroot on the iPhone (containing music/pictures).

If you have a device that has been jailedbreaked then an additional
("com.apple.afc2") service will have been installed, without the chroot.
On jailbroken devices only, you can do:

	ifuse ~/iphone --root -s

And this will mount a full view of the iPhone's filesystem.


==== Setting up FUSE ====

Note that on some systems, you may have to load the 'fuse' kernel
module first and to ensure that you are a member of the 'fuse' group:

	sudo modprobe fuse
	sudo adduser $USER fuse

You can check your membership of the 'fuse' group with:

	id | grep fuse && echo yes! || echo not yet...

If you have just added yourself, you will need to logout and log back
in for the group change to become visible.


=== iphoneclient ===

'iphoneclient' is a basic commandline interface for testing, it just
runs a few various test operations such as attempting to view/create a
test file in the iPhone, but is mainly a developer tool.


== Who/what/where? ==

wiki:
	http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page

code:
	git clone http://git.matt.colyer.name/2008/libiphone/

mailing list:
	http://lists.mattcolyer.com/listinfo.cgi/iphone-linux-dev-mattcolyer.com

updated:
	2008-09-02