summaryrefslogtreecommitdiffstats
path: root/README
blob: ff28e1936a279da330ef85276befcbdc3ab5fae6 (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
Background
==========

'usbmuxd' stands for "USB multiplexing daemon".  To the user/developer
what it actually does is to proxy requests over a USB cable on directly
to a listening TCP port on the iPhone.

Multiple connections to different TCP ports can happen in parallel.
An example (and useful) tool called 'iproxy' is included that allows
you to forward localhost ports to the device---allows SSH over USB on
jailbroken devices, or allowing access the lockdown daemon (and then
to all of the file access, sync, notification and backup services
running on the device).

This higher-level layers are handled by libiphone.  The version of 
libiphone compatible with the 'usbmuxd' infrastructure is called
'libiphone-usbmuxd'.  'ifuse' is then able to sit on top of this.


Building
========

  ./autogen.sh
  ./configure --sysconfdir=/etc
  make
  sudo make install


Running (with magic)
====================

  (Unplug + replug your iPhone)
  ./iproxy 2222 22 &
  ssh -p 2222 root@localhost

Hopefully you get the normal SSH login prompt.  You may still lots of
debugging output for the moment.  If this is getting in the way of
your ssh login, then run the 'ssh' command from a different xterminal
or virtual console.


Running (without magic)
=======================

If 'udev' is _not_ automatically running on your machine and picking
up the new .rules file, you will need to start usbmuxd by hand first.
Check it's running and that there is only one copy with 'ps aux | grep
usbmuxd'.

  sudo usbmuxd &
  ./iproxy 2222 22 &
  ssh -p 2222 root@localhost


Tip: Starting SSH if disabled
=============================

If your iphone is rooted, but SSH isn't started and you _cannot_ (for
instance, cracked/broken screen) get to the Services control panel on
the device, then you can start the SSH service over the USB by
mounting the (jailbroken) filesystem.

You will need to mount it usbing 'ifuse --afc2' (to access the root
directory of the device), and then edit:

  /Library/LaunchDaemons/com.openssh.sshd.plist

to _remove_ the lines:

  <key>Diabled</key>
  <true/>

Reboot the device and then sshd should be running.