-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dennis Torbichuk
committed
Feb 8, 2015
1 parent
e650ba5
commit 03a78a2
Showing
16 changed files
with
196 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../PonyDebugger/ObjC/DerivedSources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../PonyDebugger/ObjC/SocketRocket/SocketRocket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARCHS = armv7 armv7s arm64 | ||
include theos/makefiles/common.mk | ||
|
||
SDKVERSION = 8.1 | ||
INCLUDE_SDKVERSION = 8.1 | ||
TARGET_IPHONEOS_DEPLOYMENT_VERSION = 7.0 | ||
TARGET_CC = xcrun -sdk iphoneos clang | ||
TARGET_CXX = xcrun -sdk iphoneos clang++ | ||
TARGET_LD = xcrun -sdk iphoneos clang++ | ||
|
||
TWEAK_NAME = PonyDebuggerInjected | ||
PonyDebuggerInjected_FILES = Tweak.xm PonyDebugger/ObjC/DerivedSources/PDApplicationCacheDomain.m PonyDebugger/ObjC/DerivedSources/PDApplicationCacheTypes.m PonyDebugger/ObjC/DerivedSources/PDConsoleDomain.m PonyDebugger/ObjC/DerivedSources/PDConsoleTypes.m PonyDebugger/ObjC/DerivedSources/PDCSSDomain.m PonyDebugger/ObjC/DerivedSources/PDCSSTypes.m PonyDebugger/ObjC/DerivedSources/PDDatabaseDomain.m PonyDebugger/ObjC/DerivedSources/PDDatabaseTypes.m PonyDebugger/ObjC/DerivedSources/PDDebuggerDomain.m PonyDebugger/ObjC/DerivedSources/PDDebuggerTypes.m PonyDebugger/ObjC/DerivedSources/PDDOMDebuggerDomain.m PonyDebugger/ObjC/DerivedSources/PDDOMDomain.m PonyDebugger/ObjC/DerivedSources/PDDOMStorageDomain.m PonyDebugger/ObjC/DerivedSources/PDDOMStorageTypes.m PonyDebugger/ObjC/DerivedSources/PDDOMTypes.m PonyDebugger/ObjC/DerivedSources/PDFileSystemDomain.m PonyDebugger/ObjC/DerivedSources/PDFileSystemTypes.m PonyDebugger/ObjC/DerivedSources/PDIndexedDBDomain.m PonyDebugger/ObjC/DerivedSources/PDIndexedDBTypes.m PonyDebugger/ObjC/DerivedSources/PDInspectorDomain.m PonyDebugger/ObjC/DerivedSources/PDMemoryDomain.m PonyDebugger/ObjC/DerivedSources/PDMemoryTypes.m PonyDebugger/ObjC/DerivedSources/PDNetworkDomain.m PonyDebugger/ObjC/DerivedSources/PDNetworkTypes.m PonyDebugger/ObjC/DerivedSources/PDPageDomain.m PonyDebugger/ObjC/DerivedSources/PDPageTypes.m PonyDebugger/ObjC/DerivedSources/PDProfilerDomain.m PonyDebugger/ObjC/DerivedSources/PDProfilerTypes.m PonyDebugger/ObjC/DerivedSources/PDRuntimeDomain.m PonyDebugger/ObjC/DerivedSources/PDRuntimeTypes.m PonyDebugger/ObjC/DerivedSources/PDTimelineDomain.m PonyDebugger/ObjC/DerivedSources/PDTimelineTypes.m PonyDebugger/ObjC/DerivedSources/PDWebGLDomain.m PonyDebugger/ObjC/DerivedSources/PDWebGLTypes.m PonyDebugger/ObjC/DerivedSources/PDWorkerDomain.m PonyDebugger/ObjC/PonyDebugger/NSArray+PD_JSONObject.m PonyDebugger/ObjC/PonyDebugger/NSArray+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/NSData+PDDebugger.m PonyDebugger/ObjC/PonyDebugger/NSDate+PD_JSONObject.m PonyDebugger/ObjC/PonyDebugger/NSDate+PDDebugger.m PonyDebugger/ObjC/PonyDebugger/NSDictionary+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/NSError+PD_JSONObject.m PonyDebugger/ObjC/PonyDebugger/NSManagedObject+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/NSObject+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/NSOrderedSet+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/NSSet+PDRuntimePropertyDescriptor.m PonyDebugger/ObjC/PonyDebugger/PDConsoleDomainController.m PonyDebugger/ObjC/PonyDebugger/PDContainerIndex.m PonyDebugger/ObjC/PonyDebugger/PDDebugger.m PonyDebugger/ObjC/PonyDebugger/PDDefinitions.m PonyDebugger/ObjC/PonyDebugger/PDDomainController.m PonyDebugger/ObjC/PonyDebugger/PDDOMDomainController.m PonyDebugger/ObjC/PonyDebugger/PDDynamicDebuggerDomain.m PonyDebugger/ObjC/PonyDebugger/PDIndexedDBDomainController.m PonyDebugger/ObjC/PonyDebugger/PDInspectorDomainController.m PonyDebugger/ObjC/PonyDebugger/PDNetworkDomainController.m PonyDebugger/ObjC/PonyDebugger/PDObject.m PonyDebugger/ObjC/PonyDebugger/PDPageDomainController.m PonyDebugger/ObjC/PonyDebugger/PDPrettyStringPrinter.m PonyDebugger/ObjC/PonyDebugger/PDRuntimeDomainController.m PonyDebugger/ObjC/SocketRocket/SocketRocket/SRWebSocket.m | ||
PonyDebuggerInjected_FRAMEWORKS = UIKit CoreGraphics CoreData CFNetwork Security | ||
PonyDebuggerInjected_LIBRARIES = icucore | ||
|
||
ADDITIONAL_CFLAGS = -IPonyDebugger/ObjC/DerivedSources -IPonyDebugger/ObjC -IPonyDebugger/ObjC/SocketRocket -fobjc-arc -Os -IHeaders -IHeaders/PonyDebugger -Qunused-arguments -Wno-unused-const-variable -Wno-c++11-extensions -Xclang -fobjc-runtime-has-weak | ||
|
||
BUNDLE_NAME = PonyDebuggerInjectedBundle | ||
PonyDebuggerInjectedBundle_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries | ||
include $(THEOS)/makefiles/bundle.mk | ||
|
||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
|
||
|
||
after-install:: | ||
install.exec "killall -9 SpringBoard" |
Submodule PonyDebugger
updated
77 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ Filter = { Bundles = ("com.apple.UIKit"); }; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#import <dlfcn.h> | ||
#import <UIKit/UIKit.h> | ||
#include <notify.h> | ||
#include <objc/message.h> | ||
#import <PonyDebugger/PDDebugger.h> | ||
|
||
__attribute__((visibility("hidden"))) | ||
@interface PonyDebuggerInjected : NSObject { | ||
@private | ||
} | ||
@end | ||
|
||
#define kBundlePath @"/Library/MobileSubstrate/DynamicLibraries/PonyDebuggerInjectedBundle.bundle" | ||
|
||
@implementation PonyDebuggerInjected | ||
|
||
+ (instancetype)sharedInstance | ||
{ | ||
static PonyDebuggerInjected *_sharedFactory; | ||
static dispatch_once_t onceToken; | ||
|
||
dispatch_once(&onceToken, ^{ | ||
_sharedFactory = [[self alloc] init]; | ||
}); | ||
|
||
return _sharedFactory; | ||
} | ||
|
||
- (id)init | ||
{ | ||
if ((self = [super init])) | ||
{ | ||
|
||
} | ||
return self; | ||
} | ||
|
||
-(void)inject { | ||
|
||
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.daapps.PonyDebuggerInjected.plist"]; | ||
id setting = [settings objectForKey:[NSString stringWithFormat:@"PonyDebuggerInjectedEnabled-%@", [NSBundle mainBundle].bundleIdentifier]]; | ||
if (setting && [setting boolValue]) { | ||
|
||
PDDebugger *debugger = [PDDebugger defaultInstance]; | ||
|
||
// Enable Network debugging, and automatically track network traffic that comes through any classes that NSURLConnectionDelegate methods. | ||
[debugger enableNetworkTrafficDebugging]; | ||
[debugger forwardAllNetworkTraffic]; | ||
|
||
// Enable Core Data debugging, and broadcast the main managed object context. | ||
[debugger enableCoreDataDebugging]; | ||
[self performSelector:@selector(attachToCoreData) withObject:nil afterDelay:1.0]; | ||
|
||
// Enable View Hierarchy debugging. This will swizzle UIView methods to monitor changes in the hierarchy | ||
// Choose a few UIView key paths to display as attributes of the dom nodes | ||
[debugger enableViewHierarchyDebugging]; | ||
[debugger setDisplayedViewAttributeKeyPaths:@[@"frame", @"hidden", @"alpha", @"opaque"]]; | ||
|
||
// Connect to a specific host | ||
[debugger autoConnect]; | ||
|
||
} | ||
|
||
} | ||
|
||
-(void)attachToCoreData { | ||
|
||
PDDebugger *debugger = [PDDebugger defaultInstance]; | ||
|
||
id app = (id)[UIApplication sharedApplication]; | ||
if(app != nil) | ||
{ | ||
|
||
id appDelegate = (id)[app delegate]; | ||
if(appDelegate !=nil && [appDelegate respondsToSelector:@selector(managedObjectContext)]) { | ||
id ctx = [appDelegate managedObjectContext]; | ||
|
||
if(ctx != nil) { | ||
|
||
[debugger addManagedObjectContext:ctx withName:@"Application Context"]; | ||
NSLog(@"Adding application context to Core Data debugging"); | ||
|
||
} else { | ||
NSLog(@"** There is no UIApplication Delegate Managed Context for Core Data"); | ||
} | ||
|
||
} else { | ||
NSLog(@"** There is no UIApplication Delegate for Core Data or the delegate does not respond to managedObjectContext selector"); | ||
} | ||
|
||
} else { | ||
NSLog(@"** There is no UIApplication for Core Data"); | ||
} | ||
|
||
} | ||
|
||
@end | ||
|
||
|
||
%ctor { | ||
|
||
[[NSNotificationCenter defaultCenter] addObserver:[PonyDebuggerInjected sharedInstance] selector:@selector(inject) name:UIApplicationDidFinishLaunchingNotification object:nil]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: com.daapps.ponydebuggerinjected | ||
Name: PonyDebuggerInjected | ||
Depends: firmware (>= 6), mobilesubstrate, preferenceloader (>= 2.2), applist (>= 1.5.3) | ||
Architecture: iphoneos-arm | ||
Description: Injection library that allows inspection of 3rd party apps with PonyDebugger app | ||
Maintainer: Den | ||
Author: Den | ||
Section: Development | ||
Version: 0.0.1-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
killall -HUP SpringBoard |
28 changes: 28 additions & 0 deletions
28
layout/Library/PreferenceLoader/Preferences/PonyDebuggerInjected.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
entry = { | ||
bundle = AppList; | ||
cell = PSLinkCell; | ||
icon = "/Library/PreferenceLoader/Preferences/PonyDebuggerInjected.png"; | ||
isController = 1; | ||
label = PonyDebuggerInjected; | ||
ALSettingsPath = "/var/mobile/Library/Preferences/com.daapps.PonyDebuggerInjected.plist"; | ||
ALSettingsKeyPrefix = "PonyDebuggerInjectedEnabled-"; | ||
ALChangeNotification = "com.daapps.PonyDebuggerInjected.settingschanged"; | ||
ALSettingsDefaultValue = 0; | ||
ALSectionDescriptors = ( | ||
{ | ||
title = "System Applications"; | ||
predicate = "(isSystemApplication = TRUE)"; | ||
"cell-class-name" = "ALSwitchCell"; | ||
"icon-size" = 29; | ||
"suppress-hidden-apps" = 1; | ||
}, | ||
{ | ||
title = "User Applications"; | ||
predicate = "(isSystemApplication = FALSE)"; | ||
"cell-class-name" = "ALSwitchCell"; | ||
"icon-size" = 29; | ||
"suppress-hidden-apps" = 1; | ||
"footer-title" = "© 2010-2013 Dennis Torbichuk\n© 2013 Square Inc."; | ||
} | ||
); | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.