Skip to content

Commit

Permalink
Add restore symbol feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
betteray committed Jun 21, 2017
1 parent 139139f commit aa70b8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tools/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ cp -rf "$TEMP_APP_PATH/" "$TARGET_APP_PATH/"

APP_BINARY=`plutil -convert xml1 -o - $TARGET_APP_PATH/Info.plist|grep -A1 Exec|tail -n1|cut -f2 -d\>|cut -f1 -d\<`
OPTOOL="${SRCROOT}/Tools/optool"
RESTORE_SYMBOL_TOOL="${SRCROOT}/Tools/restore-symbol"
BLOCK_SYMBOL_JSON="${SRCROOT}/Assets/block_symbol.json"
## Restore Symbol to Add Breakpoint on Method. (http://blog.imjun.net/posts/restore-symbol-of-iOS-app/)
lipo "$TARGET_APP_PATH/$APP_BINARY" -thin arm64 -output "$TARGET_APP_PATH/$APP_BINARY"
"$RESTORE_SYMBOL_TOOL" "$TARGET_APP_PATH/$APP_BINARY" -o "$TARGET_APP_PATH/EXECUTABLE_WITH_SYMBOL" -j "$BLOCK_SYMBOL_JSON"
mv "$TARGET_APP_PATH/EXECUTABLE_WITH_SYMBOL" "$TARGET_APP_PATH/$APP_BINARY"
mkdir "$TARGET_APP_PATH/Dylibs"
cp "$BUILT_PRODUCTS_DIR/IPAPatch.framework/IPAPatch" "$TARGET_APP_PATH/Dylibs/IPAPatch"
Expand Down
Binary file added Tools/restore-symbol
Binary file not shown.

0 comments on commit aa70b8c

Please sign in to comment.