Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
b61d63f4
Commit
b61d63f4
authored
16 years ago
by
Paul Sladen
Committed by
Matt Colyer
16 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --root option to use afc2, expand README
parent
2b05e48c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
12 deletions
+124
-12
README
README
+94
-9
ifuse.c
src/ifuse.c
+30
-3
No files found.
README
View file @
b61d63f4
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
...
...
@@ -17,25 +21,106 @@ 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)
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
================================================================================
IMPORTANT: Before using the library you must run "libiphone-initconf". It will
generate keys and a host id for your system. It only needs to be run once but
it MUST be run.
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 2 executables iphoneclient and ifuse, located in src/.
There are currently two more executables 'ifuse' and 'iphoneclient',
both located in src/.
iphoneclient is a basic commandline interface, it just runs a few various operations.
=== 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
./src/ifuse
<mountpoint> -s
To unmount:
umount mountpoint
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
This diff is collapsed.
Click to expand it.
src/ifuse.c
View file @
b61d63f4
...
...
@@ -169,7 +169,7 @@ static int ifuse_release(const char *path, struct fuse_file_info *fi)
return
0
;
}
void
*
ifuse_init
(
struct
fuse_conn_info
*
conn
)
void
*
ifuse_init
_with_service
(
struct
fuse_conn_info
*
conn
,
const
char
*
service_name
)
{
int
port
=
0
;
iphone_afc_client_t
afc
=
NULL
;
...
...
@@ -191,7 +191,7 @@ void *ifuse_init(struct fuse_conn_info *conn)
return
NULL
;
}
if
(
IPHONE_E_SUCCESS
==
iphone_lckd_start_service
(
control
,
"com.apple.afc"
,
&
port
)
&&
!
port
)
{
if
(
IPHONE_E_SUCCESS
==
iphone_lckd_start_service
(
control
,
service_name
,
&
port
)
&&
!
port
)
{
iphone_lckd_free_client
(
control
);
iphone_free_device
(
phone
);
fprintf
(
stderr
,
"Something went wrong when starting AFC."
);
...
...
@@ -298,6 +298,16 @@ int ifuse_mkdir(const char *dir, mode_t ignored)
return
-
1
;
}
void
*
ifuse_init_normal
(
struct
fuse_conn_info
*
conn
)
{
return
ifuse_init_with_service
(
conn
,
"com.apple.afc"
);
}
void
*
ifuse_init_jailbroken
(
struct
fuse_conn_info
*
conn
)
{
return
ifuse_init_with_service
(
conn
,
"com.apple.afc2"
);
}
static
struct
fuse_operations
ifuse_oper
=
{
.
getattr
=
ifuse_getattr
,
.
statfs
=
ifuse_statfs
,
...
...
@@ -314,11 +324,28 @@ static struct fuse_operations ifuse_oper = {
.
rename
=
ifuse_rename
,
.
fsync
=
ifuse_fsync
,
.
release
=
ifuse_release
,
.
init
=
ifuse_init
,
.
init
=
ifuse_init
_normal
,
.
destroy
=
ifuse_cleanup
};
int
main
(
int
argc
,
char
*
argv
[])
{
char
**
ammended_argv
;
int
i
,
j
;
// Parse extra options
if
(
argc
>
2
&&
(
ammended_argv
=
malloc
((
argc
+
1
)
*
sizeof
(
*
ammended_argv
))))
{
for
(
i
=
j
=
0
;
ammended_argv
[
j
]
=
argv
[
i
],
i
<
argc
;
i
++
)
{
// Try to use the (jailbroken) com.apple.afc2 if requested by the user
if
(
argv
[
i
]
&&
(
!
strcmp
(
"--root"
,
argv
[
i
])
||
!
strcmp
(
"--afc2"
,
argv
[
i
])))
{
ifuse_oper
.
init
=
ifuse_init_jailbroken
;
continue
;
}
j
++
;
}
argv
=
ammended_argv
;
argc
=
j
;
}
return
fuse_main
(
argc
,
argv
,
&
ifuse_oper
,
NULL
);
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment