Microsoft Word - iOSAppReverseEngineering.docx

(Romina) #1

  1. Create tweak project “iOSREGreetings” using Theos


Use the following commands to create iOSREGreetings project:


snakeninnysiMac:Code snakeninny$ /opt/theos/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
[1.] iphone/application
[2.] iphone/cydget
[3.] iphone/framework
[4.] iphone/library
[5.] iphone/notification_center_widget
[6.] iphone/preference_bundle
[7.] iphone/sbsettingstoggle
[8.] iphone/tool
[9.] iphone/tweak
[10.] iphone/xpc_service
Choose a Template (required): 9
Project Name (required): iOSREGreetings
Package Name [com.yourcompany.iosregreetings]: com.iosre.iosregreetings
Author/Maintainer Name [snakeninny]: snakeninny
[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]:
com.apple.springboard
[iphone/tweak] List of applications to terminate upon installation (space-separated, '-'
for none) [SpringBoard]:
Instantiating iphone/tweak in iosregreetings/...
Done.


  1. Edit Tweak.xm


The edited Tweak.xm looks like this:


%hook SpringBoard


  • (void)applicationDidFinishLaunching:(id)application
    {
    %orig;


UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Come to
http://bbs.iosre.com for more fun!" message:nil delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}

%end


  1. Edit Makefile and control


The edited Makefile looks like this:


export THEOS_DEVICE_IP = iOSIP
export ARCHS = armv7 arm64
export TARGET = iphone:clang:latest:8.0

include theos/makefiles/common.mk

TWEAK_NAME = iOSREGreetings
Free download pdf