Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Various updates for debugging, device support, makefile, etc. #16

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9423d1b
Fixed bug in Makefile
ntherning Apr 24, 2012
976f852
Added -u/--unbuffered option which disables buffering of stdout.
ntherning Apr 24, 2012
e2bb4a2
Changed gdb command line arguments (changed --arch to amrv7f and adde…
ntherning Apr 26, 2012
44a529b
Falling back to getpwuid() to determine user's home directory if HOME…
ntherning Apr 26, 2012
bdff62f
The child process and gdb process will now be killed when the parent …
ntherning Apr 27, 2012
9f69369
Add even more search paths for Xcode. Added a command-line argument …
Sep 13, 2012
4885b97
Updated makefile to tolerate different xcode paths better.
Sep 13, 2012
05f934d
Updated the readme.
Sep 13, 2012
24ee594
Combine various commits from different forks (use xcode-select, add u…
Sep 25, 2012
25f7952
Merge in changes from ntherning (some changes already applied manually).
Sep 25, 2012
9faf60c
Add function to find a file within Xcode, searching several locations…
Sep 26, 2012
3b1a23d
Merge in unprompted's fork, updates Makefile and adds -x option.
Sep 26, 2012
add97f6
Remove incorrect comments.
Sep 26, 2012
d4ebc90
Add back in searching for DeviceSupport in the home directory as it i…
Sep 27, 2012
ef6d787
Build with iOS 6.0 SDK for iOS 5.1.
unprompted Sep 28, 2012
114dc35
Fixed some warnings.
unprompted Sep 28, 2012
cb0619d
Removed "-x" option. It only existed because I hadn't written the co…
unprompted Sep 28, 2012
8be8529
Made extra arguments to gdb optional and stripped off recent changes …
unprompted Sep 28, 2012
9be3579
Add min OS X version to support Lion when building on Mountain Lion, …
Oct 1, 2012
e534f43
added make target for building list-devices-compatible executable
filmaj Oct 29, 2012
8159bb4
package json for good times
filmaj Oct 29, 2012
98ff34a
Allow certificate configurable from make command line via make CERT="…
mpurland Nov 14, 2012
f3cc105
Allow fruitstrap to be installed to /usr/local/bin through make insta…
mpurland Nov 14, 2012
3b8d971
Added install instructions for make install_os
mpurland Nov 14, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 19 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
IOS_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
IOS_CC = xcrun -sdk iphoneos clang
IOS_MIN_OS = 5.1
IOS_SDK = 6.0
OSX_MIN = 10.7

CERT="iPhone Developer"

all: demo.app fruitstrap

demo.app: demo Info.plist
mkdir -p demo.app
cp demo demo.app/
cp Info.plist ResourceRules.plist demo.app/
codesign -f -s "iPhone Developer" --entitlements Entitlements.plist demo.app
codesign -f -s $(CERT) --entitlements Entitlements.plist demo.app

demo: demo.c
$(IOS_CC) -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -framework CoreFoundation -o demo demo.c
$(IOS_CC) -isysroot `xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK).sdk -mios-version-min=$(IOS_MIN_OS) -arch armv7 -framework CoreFoundation -o demo demo.c

fruitstrap: fruitstrap.c
gcc -o fruitstrap -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks fruitstrap.c
clang -o fruitstrap -mmacosx-version-min=$(OSX_MIN) -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks fruitstrap.c

listdevices: listdevices.c
gcc -g -o listdevices -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks listdevices.c

install: all
./fruitstrap demo.app
./fruitstrap -b demo.app

install_os: fruitstrap
sudo mkdir -p /usr/local/bin
sudo cp fruitstrap /usr/local/bin/fruitstrap

debug: all
./fruitstrap -d demo.app
./fruitstrap -d -b demo.app

clean:
rm -rf *.app demo fruitstrap
rm -rf *.app demo fruitstrap
7 changes: 6 additions & 1 deletion MobileDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ void AMDAddLogFileDescriptor(int fd);
//kern_return_t AMDeviceSendMessage(service_conn_t socket, void *unused, CFPropertyListRef plist);
//kern_return_t AMDeviceReceiveMessage(service_conn_t socket, CFDictionaryRef options, CFPropertyListRef * result);

typedef int (*am_device_install_application_callback)(CFDictionaryRef, int);

mach_error_t AMDeviceInstallApplication(service_conn_t socket, CFStringRef path, CFDictionaryRef options, am_device_install_application_callback callback, void *user);
mach_error_t AMDeviceTransferApplication(service_conn_t socket, CFStringRef path, CFDictionaryRef options, am_device_install_application_callback callbackj, void *user);

/* ----------------------------------------------------------------------------
* Semi-private routines
* ------------------------------------------------------------------------- */
Expand Down Expand Up @@ -486,4 +491,4 @@ typedef unsigned int (*t_performOperation)(struct am_restore_device *rdev,
}
#endif

#endif
#endif
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
## This project is no longer maintained.

fruitstrap
==========
Install and debug iPhone apps without using Xcode. Designed to work on unjailbroken devices.

## Requirements

* Mac OS X. Tested on Snow Leopard only.
* You need to have a valid iPhone development certificate installed.
* Mac OS X. Tested on Lion/Mountain Lion.
* You need to have a valid iPhone development certificate installed (or at least a correctly signed iOS app).
* Xcode must be installed, along with the SDK for your iOS version.

## Install

* `make install_os` will compile and install fruitstrap to /usr/local/bin

## Usage

* `fruitstrap [-d] -b <app> [device_id]`
* `fruitstrap [-d/--debug] [-i/--id device_id] -b/--bundle <app> [-a/--args arguments] [-t/--timeout timeout(seconds)] [-u/--unbuffered] [-g/--gdbargs gdb_arguments]`
* Optional `-d` flag launches a remote GDB session after the app has been installed.
* `<app>` must be an iPhone application bundle, *not* an IPA.
* Optional `device_id`; useful when you have more than one iPhone/iPad connected.
* Optional device id, useful when you have more than one iPhone/iPad connected to your computer
* `<arguments>` are passed as argv to the running app.
* `<gdb_arguments>` are passed to gdb.

## Demo

Expand Down