forked from Matchstic/ReProvision
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Right now, everything mostly works as intended. I have yet to handle errors that present themselves in a UIAlertController within the Extender application, need to add support for revoking the current certificate if required, and need to ensure the alerting system I use shows up in-app.
- Loading branch information
0 parents
commit 87bf5c7
Showing
172 changed files
with
29,521 additions
and
0 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,3 @@ | ||
LatestBuild/ | ||
*.deb | ||
Working/ |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Extender Installer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+50.3 KB
....xcodeproj/project.xcworkspace/xcuserdata/Matt.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
80 changes: 80 additions & 0 deletions
80
...er Installer.xcodeproj/xcuserdata/Matt.xcuserdatad/xcschemes/Extender-Extensions.xcscheme
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,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0820" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C98D468F1EA0DF320052812C" | ||
BuildableName = "ExtenderExtensions.dylib" | ||
BlueprintName = "Extender-Extensions" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C98D468F1EA0DF320052812C" | ||
BuildableName = "ExtenderExtensions.dylib" | ||
BlueprintName = "Extender-Extensions" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C98D468F1EA0DF320052812C" | ||
BuildableName = "ExtenderExtensions.dylib" | ||
BlueprintName = "Extender-Extensions" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
80 changes: 80 additions & 0 deletions
80
...der Installer.xcodeproj/xcuserdata/Matt.xcuserdatad/xcschemes/Extender-Installer.xcscheme
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,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0820" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9BDFC5D1E9F8F610093CA81" | ||
BuildableName = "installdPatch.dylib" | ||
BlueprintName = "Extender-Installer" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9BDFC5D1E9F8F610093CA81" | ||
BuildableName = "installdPatch.dylib" | ||
BlueprintName = "Extender-Installer" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "C9BDFC5D1E9F8F610093CA81" | ||
BuildableName = "installdPatch.dylib" | ||
BlueprintName = "Extender-Installer" | ||
ReferencedContainer = "container:Extender Installer.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
47 changes: 47 additions & 0 deletions
47
Extender Installer.xcodeproj/xcuserdata/Matt.xcuserdatad/xcschemes/xcschememanagement.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,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>Extender-Extensions.xcscheme</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>1</integer> | ||
</dict> | ||
<key>Extender-Installer.xcscheme</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
</dict> | ||
<key>SuppressBuildableAutocreation</key> | ||
<dict> | ||
<key>C936D75A1E9F5FA900F23D85</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
<key>C936D7751E9F5FBD00F23D85</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
<key>C98D466D1EA0CC900052812C</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
<key>C98D468F1EA0DF320052812C</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
<key>C9BDFC5D1E9F8F610093CA81</key> | ||
<dict> | ||
<key>primary</key> | ||
<true/> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</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,30 @@ | ||
// | ||
// EEPackage.h | ||
// Extender Installer | ||
// | ||
// Created by Matt Clarke on 14/04/2017. | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
@class LSApplicationProxy; | ||
|
||
@interface EEPackage : NSObject { | ||
NSURL *_url; | ||
UIImage *_icon; | ||
NSDate *_installDate; | ||
LSApplicationProxy *_proxy; | ||
} | ||
|
||
-(instancetype)initWithURL:(NSURL*)fileURL andBundleIdentifier:(NSString*)bundleIdentifier; | ||
|
||
- (NSString*)bundleIdentifier; | ||
- (NSString*)applicationName; | ||
- (UIImage*)applicationIcon; | ||
- (NSDate*)applicationExpireDate; | ||
|
||
- (NSURL*)packageURL; | ||
|
||
@end |
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,74 @@ | ||
// | ||
// EEPackage.m | ||
// Extender Installer | ||
// | ||
// Created by Matt Clarke on 14/04/2017. | ||
// | ||
// | ||
|
||
#import "EEPackage.h" | ||
#import "EEResources.h" | ||
#import "PartialZip/PartialZip/PZFileBrowser.h" | ||
#import "SSZipArchive.h" | ||
#import "EEPackageDatabase.h" | ||
|
||
@interface Extender : UIApplication | ||
- (void)sendLocalNotification:(NSString*)title andBody:(NSString*)body; | ||
@end | ||
|
||
@interface LSApplicationProxy : NSObject | ||
@property (nonatomic, readonly) NSString *applicationIdentifier; | ||
@property (nonatomic, readonly) NSURL *bundleURL; | ||
- (id)localizedName; | ||
+ (instancetype)applicationProxyForIdentifier:(NSString*)arg1; | ||
- (id)primaryIconDataForVariant:(int)arg1; | ||
@end | ||
|
||
@implementation EEPackage | ||
|
||
-(instancetype)initWithURL:(NSURL*)fileURL andBundleIdentifier:(NSString*)bundleIdentifier { | ||
self = [super init]; | ||
|
||
if (self) { | ||
// Load Info.plist from the zip at this URL. | ||
_url = fileURL; | ||
|
||
_proxy = [LSApplicationProxy applicationProxyForIdentifier:bundleIdentifier]; | ||
} | ||
|
||
return self; | ||
} | ||
|
||
- (NSString*)bundleIdentifier { | ||
return [_proxy applicationIdentifier]; | ||
} | ||
|
||
- (NSString*)applicationName { | ||
return [_proxy localizedName]; | ||
} | ||
|
||
- (UIImage*)applicationIcon { | ||
if (!_icon) { | ||
_icon = [UIImage imageWithData:[_proxy primaryIconDataForVariant:1]]; | ||
} | ||
|
||
return _icon; | ||
} | ||
|
||
- (NSDate*)applicationExpireDate { | ||
// We find the application on-disk via MobileCoreServices, then read out it's provisioning profile. | ||
// Key is ExpirationDate | ||
|
||
LSApplicationProxy *proxy = [LSApplicationProxy applicationProxyForIdentifier:[self bundleIdentifier]]; | ||
NSString *provisionPath = [[proxy.bundleURL path] stringByAppendingString:@"/embedded.mobileprovision"]; | ||
|
||
NSDictionary *provision = [EEResources provisioningProfileAtPath:provisionPath]; | ||
|
||
return [provision objectForKey:@"ExpirationDate"]; | ||
} | ||
|
||
- (NSURL*)packageURL { | ||
return _url; | ||
} | ||
|
||
@end |
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,35 @@ | ||
// | ||
// EEPackageDatabase.h | ||
// Extender Installer | ||
// | ||
// Created by Matt Clarke on 20/04/2017. | ||
// | ||
// Manages the on-disk unsigned IPAs for local provisioned applications. | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
#define EXTENDER_DOCUMENTS @"/var/mobile/Documents/Extender" | ||
|
||
@class EEPackage; | ||
|
||
@interface EEPackageDatabase : NSObject { | ||
NSDictionary *_packages; | ||
dispatch_queue_t _queue; | ||
NSMutableArray *_installQueue; | ||
NSArray *_teamIDApplications; | ||
UIBackgroundTaskIdentifier _currentBgTask; | ||
} | ||
|
||
+ (instancetype)sharedInstance; | ||
|
||
- (NSArray *)retrieveAllTeamIDApplications; | ||
- (void)rebuildDatabase; | ||
- (EEPackage*)packageForIdentifier:(NSString*)bundleIdentifier; | ||
- (NSArray*)allPackages; | ||
|
||
- (void)resignApplicationsIfNecessaryWithTaskID:(UIBackgroundTaskIdentifier)bgTask; | ||
- (void)installPackageAtURL:(NSURL*)url withManifest:(NSDictionary*)manifest; | ||
|
||
|
||
@end |
Oops, something went wrong.