Skip to content

Commit

Permalink
Use lldb instead of gdb debugger
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Jura <markus.jura@googlemail.com>
  • Loading branch information
Markus Jura committed Oct 14, 2013
1 parent 3b8d971 commit 621f67b
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 249 deletions.
28 changes: 13 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
IOS_CC = xcrun -sdk iphoneos clang
IOS_MIN_OS = 5.1
IOS_SDK = 6.0
OSX_MIN = 10.7

IOS_SDK = 6.1
CERT="iPhone Developer"

fruitstrap: fruitstrap.c
clang -o fruitstrap -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks fruitstrap.c

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

uninstall: fruitstrap
sudo rm -f /usr/local/bin/fruitstrap

all: demo.app fruitstrap

demo.app: demo Info.plist
Expand All @@ -16,20 +24,10 @@ demo.app: demo Info.plist
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
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
install_demo: all
./fruitstrap -b demo.app

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

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

clean:
Expand Down
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
fruitstrap
==========
Install and debug iPhone apps without using Xcode. Designed to work on unjailbroken devices.
Install and debug iPhone apps without using Xcode 5. Designed to work on unjailbroken devices.

## Requirements

* 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.
* Xcode 5 with the lldb debugger must be installed, along with the SDK for your iOS version.

## Install

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

## Usage

* `fruitstrap [-d/--debug] [-i/--id device_id] -b/--bundle <app> [-a/--args arguments] [-t/--timeout timeout(seconds)] [-u/--unbuffered] [-g/--gdbargs gdb_arguments]`
```
Usage: ./fruitstrap [OPTION]...
-d, --debug launch the app in GDB after installation
-i, --id <device_id> the id of the device to connect to
-c, --detect only detect if the device is connected
-b, --bundle <bundle.app> the path to the app bundle to be installed
-a, --args <args> command line arguments to pass to the app when launching it
-t, --timeout <timeout> number of seconds to wait for a device to be connected
-u, --unbuffered don't buffer stdout
-g, --gdbargs <args> extra arguments to pass to GDB when starting the debugger
-x, --gdbexec <file> GDB commands script file
-n, --nostart do not start the app automatically when debugging
-v, --verbose enable verbose output
```
* 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 to your computer
* `<arguments>` are passed as argv to the running app.
* `<gdb_arguments>` are passed to gdb.
* -a `<args>` are passed as argv to the running app.
* -g `<args>` are passed to gdb.
* `-c` exits with return status `SUCCESS` if device is found, `ERROR` if not.

## Demo

* The included demo.app represents the minimum required to get code running on iOS.
* `make install` will install demo.app to the device.
* `make debug` will install demo.app and launch a GDB session.
* `make install\_demo` will install demo.app to the device.
* `make debug\_demo` will install demo.app and launch a GDB session.

## Notes

Expand Down
Loading

0 comments on commit 621f67b

Please sign in to comment.