├── .gitignore ├── CCRevealLoader.plist ├── Makefile ├── Readme.md ├── Tweak.xm ├── control └── layout └── Library └── PreferenceLoader └── Preferences ├── CCRevealLoader.plist ├── ccreveal-logo.png └── ccreveal-logo@2x.png /.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | obj 3 | *.deb 4 | .theos/ 5 | .DS_Store 6 | *.dylib 7 | *.app 8 | *.ipa 9 | RevealServer.framework 10 | 11 | #fastlane 12 | fastlane/README.md 13 | fastlane/report.xml 14 | fastlane/test_output/ 15 | -------------------------------------------------------------------------------- /CCRevealLoader.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.UIKit" ); }; } 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | THEOS_DEVICE_IP = 172.30.7.222 2 | THEOS_DEVICE_PORT = 22 3 | ARCHS = armv7 arm64 4 | TARGET = iphone:latest:8.0 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | 8 | TWEAK_NAME = CCRevealLoader 9 | CCRevealLoader_FILES = Tweak.xm 10 | 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | 13 | before-package:: 14 | @echo "Downlading reveal server framework..." 15 | mkdir -p ./layout/Library/Application\ Support/CCRevealLoader/ 16 | cp -r /Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/RevealServer.framework ./layout/Library/Application\ Support/CCRevealLoader/ 17 | lipo -remove i386 ./layout/Library/Application\ Support/CCRevealLoader/RevealServer.framework/RevealServer -o ./layout/Library/Application\ Support/CCRevealLoader/RevealServer.framework/RevealServer 18 | lipo -remove x86_64 ./layout/Library/Application\ Support/CCRevealLoader/RevealServer.framework/RevealServer -o ./layout/Library/Application\ Support/CCRevealLoader/RevealServer.framework/RevealServer 19 | codesign -f -s "iPhone Developer: ChengFang Chen (4YVJ336CK2)" ./layout/Library/Application\ Support/CCRevealLoader/RevealServer.framework 20 | after-install:: 21 | install.exec "killall -9 SpringBoard" 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | ## CCRevealLoader Tweak 2 | 3 | CCRevealLoader is inspired by [RevealLoader](https://github.com/heardrwt/RevealLoader) 4 | 5 | CCRevealLoader dynamically loads RevealServer.framework (Reveal.app support) into iOS apps on jailbroken devices. Configuration is via the CCRevealLoader menu in Settings.app 6 | 7 | Reveal is an OS X application that allows you to remotely introspect a running applications view hierarchy and edit various view properties. 8 | 9 | Generally you have to include their debugging framework in your application at build time in-order to perform debugging actions, however with this tweak installed this is no longer necessary. 10 | 11 | For more info see [revealapp.com](http://revealapp.com) 12 | 13 | 14 | ## Build Requirements 15 | 16 | - Theos 17 | - Reveal.app installed 18 | 19 | ## Install tweak 20 | 21 | Change the value of `THEOS_DEVICE_IP` to your jailbreak device's ip in the `Makefile` file at first line, then execute command: 22 | 23 | ``` 24 | make package install 25 | ``` 26 | 27 | **Note:** To make sure this tweak work correctly. Before install this tweak, change the command `codesign` in the `before-package` section of `Makefile`,use your develop certificate. If you dont have a certificate, you can remove the three command lines which begin with `lipo` and `codesign`. 28 | 29 | ## How to Use 30 | Open 'Settings > CCRevealLoader > Enabled Applications' and toggle the application or applications that you want to debug to on. 31 | 32 | Launch the target application and it should appear inside Reveal.app on your Mac. 33 | 34 | (You will likely need to quit and relaunch the target application) 35 | 36 | ## Be Social 37 | Follow me on [Twitter](https://twitter.com/intent/follow?screen_name=nswebfrog) (@nswebfrog) 38 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | %ctor { 4 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 5 | NSDictionary *prefs = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.nswebfrog.revealloader.plist"] ; 6 | NSString *libraryPath = @"/Library/Application Support/CCRevealLoader/RevealServer.framework/RevealServer"; 7 | 8 | NSString *keyPath = [NSString stringWithFormat:@"CCRevealEnabled-%@", [[NSBundle mainBundle] bundleIdentifier]]; 9 | NSLog(@"CCRevealLoader before loaded %@,keyPath = %@,prefs = %@", libraryPath,keyPath,prefs); 10 | if ([[prefs objectForKey:keyPath] boolValue]) { 11 | if ([[NSFileManager defaultManager] fileExistsAtPath:libraryPath]){ 12 | void *haldel = dlopen([libraryPath UTF8String], RTLD_NOW); 13 | if (haldel == NULL) { 14 | char *error = dlerror(); 15 | NSLog(@"dlopen error: %s", error); 16 | } else { 17 | NSLog(@"dlopen load framework success."); 18 | [[NSNotificationCenter defaultCenter] postNotificationName:@"CCRevealLoaderRequestStart" object:nil]; 19 | } 20 | 21 | NSLog(@"CCRevealLoader loaded %@", libraryPath); 22 | } else { 23 | NSLog(@"CCRevealLoader file not exists %@", libraryPath); 24 | } 25 | } 26 | else { 27 | NSLog(@"CCRevealLoader not enabled %@", libraryPath); 28 | } 29 | 30 | NSLog(@"CCRevealLoader after loaded %@", libraryPath); 31 | 32 | 33 | [pool drain]; 34 | } -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.nswebfrog.revealloader 2 | Name: CCRevealLoader 3 | Depends: mobilesubstrate, preferenceloader, applist 4 | Version: 1.0.2 5 | Architecture: iphoneos-arm 6 | Description: Dynamically loads Reveal server framework into iOS applications. 7 | CCRevealLoader dynamically loads RevealServer.framework (Reveal.app version 7 support) into iOS apps 8 | on jailbroken devices. Configuration is via the CCRevealLoader menu in Settings.app 9 | For more info, see https://github.com/webfrogs/CCRevealLoader and http://revealapp.com 10 | Maintainer: Carl Chen 11 | Author: Carl Chen 12 | Section: Tweaks 13 | -------------------------------------------------------------------------------- /layout/Library/PreferenceLoader/Preferences/CCRevealLoader.plist: -------------------------------------------------------------------------------- 1 | { 2 | entry = { 3 | cell = PSLinkCell; 4 | label = CCRevealLoader; 5 | icon = "ccreveal-logo.png"; 6 | items = ( 7 | { 8 | bundle = AppList; 9 | isController = 1; 10 | cell = PSLinkCell; 11 | label = "Enabled Applications"; 12 | ALSettingsPath = "/var/mobile/Library/Preferences/com.nswebfrog.revealloader.plist"; 13 | ALSettingsKeyPrefix = "CCRevealEnabled-"; 14 | ALSettingsDefaultValue = 0; 15 | ALAllowsSelection = 1; 16 | ALChangeNotification = "com.nswebfrog.revealloader.settingschanged"; 17 | ALSectionDescriptors = ( 18 | { 19 | items = (); 20 | "footer-title" = "Select which applications to load Reveal into."; 21 | }, 22 | { 23 | title = "User Applications"; 24 | predicate = "isSystemApplication = FALSE"; 25 | "icon-size" = 29; 26 | "suppress-hidden-apps" = 1; 27 | "cell-class-name" = ALSwitchCell; 28 | }, 29 | { 30 | title = "System Applications"; 31 | predicate = "isSystemApplication = TRUE AND NOT (displayIdentifier IN {'com.iptm.bigboss.sbsettings', 'com.booleanmagic.overboard', 'eu.heinelt.ifile'})"; 32 | "icon-size" = 29; 33 | "suppress-hidden-apps" = 1; 34 | "cell-class-name" = ALSwitchCell; 35 | }, 36 | ); 37 | }, 38 | { 39 | cell = PSGroupCell; 40 | footerText = "This tweak is not officially supported. For more information about Reveal.app and runtime debugging see http://revealapp.com"; 41 | }, 42 | { 43 | cell = PSGroupCell; 44 | footerText = "\nCCRevealLoader\n\nCopyright (c) 2017 Carl Chen. All rights reserved.\n \nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n"; 45 | }, 46 | ); 47 | }; 48 | } -------------------------------------------------------------------------------- /layout/Library/PreferenceLoader/Preferences/ccreveal-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webfrogs/CCRevealLoader/a0482d14621e25c0a3c3c7636e22ce9fd8a2f722/layout/Library/PreferenceLoader/Preferences/ccreveal-logo.png -------------------------------------------------------------------------------- /layout/Library/PreferenceLoader/Preferences/ccreveal-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webfrogs/CCRevealLoader/a0482d14621e25c0a3c3c7636e22ce9fd8a2f722/layout/Library/PreferenceLoader/Preferences/ccreveal-logo@2x.png --------------------------------------------------------------------------------