├── .github └── FUNDING.yml ├── .gitignore ├── .gitmodules ├── .vscode └── settings.json ├── FLEXing.plist ├── Interfaces.h ├── Licenses ├── DatabaseBrowser_LICENSE ├── FLEX_LICENSE ├── FLEXing_LICENSE └── PonyDebugger_LICENSE ├── Makefile ├── README.md ├── SpringBoard.xm ├── Tweak.xm ├── control ├── depiction ├── libflex ├── Makefile ├── control ├── depiction ├── libFLEX.h ├── libFLEX.plist └── libFLEX.x └── libreflex ├── Makefile ├── control ├── depiction └── libReflex.plist /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [NSExceptional] 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ._* 2 | *.deb 3 | .debmake 4 | _ 5 | obj 6 | .theos 7 | .DS_Store 8 | /FLEX.xcworkspace 9 | packages/ 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libflex/FLEX"] 2 | path = libflex/FLEX 3 | url = https://github.com/FLEXTool/FLEX 4 | branch = flexing 5 | 6 | [submodule "libreflex/Reflex"] 7 | path = libreflex/Reflex 8 | url = https://github.com/FLEXTool/Reflex 9 | branch = libreflex 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | ".vscode": true, 4 | "*.plist": true, 5 | "**/.git*": true, 6 | "**/.theos": true, 7 | "**/.travis.yml": true, 8 | "**/*.xcodeproj": true, 9 | "**/*.xcworkspace": true, 10 | "**/LICENSE": true, 11 | "Licenses": true 12 | } 13 | } -------------------------------------------------------------------------------- /FLEXing.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Bundles = ( 4 | "com.apple.UIKit" 5 | ); 6 | }; 7 | } -------------------------------------------------------------------------------- /Interfaces.h: -------------------------------------------------------------------------------- 1 | // 2 | // Interfaces.h 3 | // FLEXing 4 | // 5 | // Created by Tanner Bennett on 2016-07-11 6 | // Copyright © 2016 Tanner Bennett. All rights reserved. 7 | // 8 | 9 | #pragma mark Imports 10 | 11 | #import 12 | #include 13 | 14 | 15 | #pragma mark Globals 16 | 17 | #define kFLEXLongPressGesture 0xdeadbabe 18 | 19 | extern BOOL initialized; 20 | extern id manager; 21 | extern SEL show; 22 | 23 | // TODO: activator support 24 | // static NSString * const kFLEXingShow = @"com.pantsthief.flexing.show"; 25 | // static NSString * const kFLEXingToggle = @"com.pantsthief.flexing.toggle"; 26 | 27 | 28 | #pragma mark Macros 29 | 30 | #define Alert(TITLE,MSG) [[[UIAlertView alloc] \ 31 | initWithTitle:(TITLE) \ 32 | message:(MSG) \ 33 | delegate:nil \ 34 | cancelButtonTitle:@"OK" \ 35 | otherButtonTitles:nil] show \ 36 | ] 37 | 38 | #define Async(block) dispatch_async(dispatch_get_main_queue(), block) 39 | #define After(seconds, block) dispatch_after( \ 40 | dispatch_time(DISPATCH_TIME_NOW, (int64_t)(seconds * NSEC_PER_SEC)), \ 41 | dispatch_get_main_queue(), ^block \ 42 | ); 43 | 44 | 45 | #pragma mark Interfaces 46 | 47 | @interface UIStatusBarWindow : UIWindow @end 48 | 49 | @interface UIApplication (Private) 50 | - (id)displayIdentifier; 51 | @end 52 | 53 | @interface SBApplication 54 | - (NSString *)bundleIdentifier; 55 | @end 56 | 57 | @interface SpringBoard : UIApplication 58 | - (SBApplication *)_accessibilityFrontMostApplication; 59 | @end 60 | 61 | // iOS 13 // 62 | 63 | @interface UIStatusBarTapAction : NSObject 64 | @property (nonatomic, readonly) NSInteger type; 65 | @end 66 | 67 | @interface SBMainDisplaySceneLayoutStatusBarView : UIView 68 | - (void)_statusBarTapped:(id)sender type:(NSInteger)type; 69 | @end 70 | 71 | @interface _UISheetDetent : NSObject 72 | + (instancetype)_mediumDetent; 73 | + (instancetype)_largeDetent; 74 | @end 75 | 76 | @interface _UISheetPresentationController : UIPresentationController 77 | @property (setter=_setDetents:) NSArray *_detents; 78 | @property (setter=_setWantsFullScreen:) BOOL _wantsFullScreen; 79 | @property (setter=_setIndexOfCurrentDetent:) BOOL _indexOfCurrentDetent; 80 | @property (setter=_setDimmingViewTapDismissing:) BOOL _isDimmingViewTapDismissing; 81 | @property (setter=_setIndexOfLastUndimmedDetent:) BOOL _indexOfLastUndimmedDetent; 82 | @property (setter=_setAllowsInteractiveDismissWhenFullScreen:) BOOL _allowsInteractiveDismissWhenFullScreen; 83 | @property (setter=_setPresentsAtStandardHalfHeight:) BOOL _presentsAtStandardHalfHeight; 84 | @property (setter=_setPrefersScrollingExpandsToLargerDetentWhenScrolledToEdge:) 85 | BOOL _prefersScrollingExpandsToLargerDetentWhenScrolledToEdge; 86 | @end 87 | -------------------------------------------------------------------------------- /Licenses/DatabaseBrowser_LICENSE: -------------------------------------------------------------------------------- 1 | 2 | FMDB 3 | Copyright (c) 2008-2014 Flying Meat Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Licenses/FLEX_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2016, Flipboard 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | * Neither the name of Flipboard nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /Licenses/FLEXing_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Tanner Bennett 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | * Neither the name of Flipboard nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /Licenses/PonyDebugger_LICENSE: -------------------------------------------------------------------------------- 1 | 2 | PonyDebugger 3 | Copyright 2012 Square Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = arm64 armv7 armv7s arm64e 2 | export TARGET = iphone:latest:9.0 3 | INSTALL_TARGET_PROCESSES = SpringBoard 4 | include $(THEOS)/makefiles/common.mk 5 | 6 | TWEAK_NAME = FLEXing 7 | $(TWEAK_NAME)_GENERATOR = internal 8 | $(TWEAK_NAME)_FILES = Tweak.xm SpringBoard.xm 9 | $(TWEAK_NAME)_CFLAGS += -fobjc-arc -w 10 | 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | 13 | before-stage:: 14 | find . -name ".DS_Store" -delete 15 | 16 | # For printing variables from the makefile 17 | print-% : ; @echo $* = $($*) 18 | 19 | # The SUBPROJECTS feature bundles both projects into 20 | # one package. We want two separate packages. 21 | # 22 | # SUBPROJECTS += libflex 23 | # include $(THEOS_MAKE_PATH)/aggregate.mk 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FLEXing 2 | 3 | FLEXing is a basic tweak to activate the FLEX explorer via Activator, long pressing on the status bar, or holding the screen with 3 fingers (depending on your iOS version you will want to use the appropriate version from the releases tab). 4 | 5 | ### Isn't this the same thing as FLEXible? 6 | 7 | Well, yes, but FLEXible 1) isn't open source, and 2) forces you turn it on on a per-application basis and deal with re-opening the explorer every time you start or return to an application unless you want to turn it back off. 8 | 9 | For someone like me who uses FLEX all the time in the apps I also use all the time, it's a little more than annoying to turn it on every time I want to use it or to have it pop up every time I open the app. 10 | 11 | # License 12 | 13 | BSD for my code and for FLEX itself. 14 | -------------------------------------------------------------------------------- /SpringBoard.xm: -------------------------------------------------------------------------------- 1 | // 2 | // SpringBoard.xm 3 | // FLEXing 4 | // 5 | // Created by Tanner Bennett on 2019-11-25 6 | // Copyright © 2019 Tanner Bennett. All rights reserved. 7 | // 8 | 9 | //-------------------------------// 10 | // This file is for iOS 13+ only // 11 | // Credit: DGh0st/FLEXall // 12 | //-------------------------------// 13 | 14 | #import "Interfaces.h" 15 | 16 | %group iOS13StatusBar 17 | // Runs in SpringBoard; forwards status bar events to app 18 | %hook SBMainDisplaySceneLayoutStatusBarView 19 | - (void)_addStatusBarIfNeeded { 20 | %orig; 21 | 22 | UIView *statusBar = [self valueForKey:@"_statusBar"]; 23 | [statusBar addGestureRecognizer:[[UILongPressGestureRecognizer alloc] 24 | initWithTarget:self action:@selector(flexGestureHandler:) 25 | ]]; 26 | } 27 | 28 | %new 29 | - (void)flexGestureHandler:(UILongPressGestureRecognizer *)recognizer { 30 | if (recognizer.state == UIGestureRecognizerStateBegan) { 31 | [self _statusBarTapped:recognizer type:kFLEXLongPressGesture]; 32 | } 33 | } 34 | %end // SBMainDisplaySceneLayoutStatusBarView 35 | 36 | // Runs in apps; receives status bar events 37 | %hook UIStatusBarManager 38 | - (void)handleTapAction:(UIStatusBarTapAction *)action { 39 | if (action.type == kFLEXLongPressGesture) { 40 | [manager performSelector:show]; 41 | } else { 42 | %orig(action); 43 | } 44 | } 45 | %end // UIStatusBarManager 46 | %end // iOS13StatusBar 47 | 48 | %ctor { 49 | if (@available(iOS 13, *)) { 50 | %init(iOS13StatusBar); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | // 2 | // Tweak.m 3 | // FLEXing 4 | // 5 | // Created by Tanner Bennett on 2016-07-11 6 | // Copyright © 2016 Tanner Bennett. All rights reserved. 7 | // 8 | 9 | 10 | #import "Interfaces.h" 11 | #import 12 | 13 | BOOL initialized = NO; 14 | id manager = nil; 15 | SEL show = nil; 16 | 17 | static NSHashTable *windowsWithGestures = nil; 18 | 19 | static id (*FLXGetManager)(); 20 | static SEL (*FLXRevealSEL)(); 21 | static Class (*FLXWindowClass)(); 22 | 23 | /// This isn't perfect, but works for most cases as intended 24 | inline bool isLikelyUIProcess() { 25 | NSString *executablePath = NSProcessInfo.processInfo.arguments[0]; 26 | 27 | return [executablePath hasPrefix:@"/var/containers/Bundle/Application"] || 28 | [executablePath hasPrefix:@"/Applications"] || 29 | [executablePath containsString:@"/procursus/Applications"] || 30 | [executablePath hasSuffix:@"CoreServices/SpringBoard.app/SpringBoard"]; 31 | } 32 | 33 | inline bool isSnapchatApp() { 34 | // See: near line 44 below 35 | return [NSBundle.mainBundle.bundleIdentifier isEqualToString:@"com.toyopagroup.picaboo"]; 36 | } 37 | 38 | inline BOOL flexAlreadyLoaded() { 39 | return NSClassFromString(@"FLEXExplorerToolbar") != nil; 40 | } 41 | 42 | %ctor { 43 | NSString *standardPath = ROOT_PATH_NS(@"/Library/MobileSubstrate/DynamicLibraries/libFLEX.dylib"); 44 | NSString *reflexPath = ROOT_PATH_NS(@"/Library/MobileSubstrate/DynamicLibraries/libreflex.dylib"); 45 | NSFileManager *disk = NSFileManager.defaultManager; 46 | NSString *libflex = nil; 47 | NSString *libreflex = nil; 48 | void *handle = nil; 49 | 50 | if ([disk fileExistsAtPath:standardPath]) { 51 | libflex = standardPath; 52 | if ([disk fileExistsAtPath:reflexPath]) { 53 | libreflex = reflexPath; 54 | } 55 | } else { 56 | // Check if libFLEX resides in the same folder as me 57 | NSString *executablePath = NSProcessInfo.processInfo.arguments[0]; 58 | NSString *whereIam = executablePath.stringByDeletingLastPathComponent; 59 | NSString *possibleFlexPath = [whereIam stringByAppendingPathComponent:@"Frameworks/libFLEX.dylib"]; 60 | NSString *possibleRelexPath = [whereIam stringByAppendingPathComponent:@"Frameworks/libreflex.dylib"]; 61 | if ([disk fileExistsAtPath:possibleFlexPath]) { 62 | libflex = possibleFlexPath; 63 | if ([disk fileExistsAtPath:possibleRelexPath]) { 64 | libreflex = possibleRelexPath; 65 | } 66 | } else { 67 | // libFLEX not found 68 | // ... 69 | } 70 | } 71 | 72 | if (libflex) { 73 | // Hey Snapchat / Snap Inc devs, 74 | // This is so users don't get their accounts locked. 75 | if (isLikelyUIProcess() && !isSnapchatApp()) { 76 | handle = dlopen(libflex.UTF8String, RTLD_LAZY); 77 | 78 | if (libreflex) { 79 | dlopen(libreflex.UTF8String, RTLD_NOW); 80 | } 81 | } 82 | } 83 | 84 | if (handle || flexAlreadyLoaded()) { 85 | // FLEXing.dylib itself does not hard-link against libFLEX.dylib, 86 | // instead libFLEX.dylib provides getters for the relevant class 87 | // objects so that it can be updated independently of THIS tweak. 88 | FLXGetManager = (id(*)())dlsym(handle, "FLXGetManager"); 89 | FLXRevealSEL = (SEL(*)())dlsym(handle, "FLXRevealSEL"); 90 | FLXWindowClass = (Class(*)())dlsym(handle, "FLXWindowClass"); 91 | 92 | if (FLXGetManager && FLXRevealSEL) { 93 | manager = FLXGetManager(); 94 | show = FLXRevealSEL(); 95 | 96 | windowsWithGestures = [NSHashTable weakObjectsHashTable]; 97 | initialized = YES; 98 | } 99 | } 100 | } 101 | 102 | %hook UIWindow 103 | - (BOOL)_shouldCreateContextAsSecure { 104 | return (initialized && [self isKindOfClass:FLXWindowClass()]) ? YES : %orig; 105 | } 106 | 107 | - (void)becomeKeyWindow { 108 | %orig; 109 | 110 | if (!initialized) { 111 | return; 112 | } 113 | 114 | BOOL needsGesture = ![windowsWithGestures containsObject:self]; 115 | BOOL isFLEXWindow = [self isKindOfClass:FLXWindowClass()]; 116 | BOOL isStatusBar = [self isKindOfClass:[UIStatusBarWindow class]]; 117 | if (needsGesture && !isFLEXWindow && !isStatusBar) { 118 | [windowsWithGestures addObject:self]; 119 | 120 | // Add 3-finger long-press gesture for apps without a status bar 121 | UILongPressGestureRecognizer *tap = [[UILongPressGestureRecognizer alloc] initWithTarget:manager action:show]; 122 | tap.minimumPressDuration = .5; 123 | tap.numberOfTouchesRequired = 3; 124 | 125 | [self addGestureRecognizer:tap]; 126 | } 127 | } 128 | %end 129 | 130 | %hook UIStatusBarWindow 131 | - (id)initWithFrame:(CGRect)frame { 132 | self = %orig; 133 | 134 | if (initialized) { 135 | // Add long-press gesture to status bar 136 | [self addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:manager action:show]]; 137 | } 138 | 139 | return self; 140 | } 141 | %end 142 | 143 | %hook FLEXExplorerViewController 144 | - (BOOL)_canShowWhileLocked { 145 | return YES; 146 | } 147 | %end 148 | 149 | %hook _UISheetPresentationController 150 | - (id)initWithPresentedViewController:(id)present presentingViewController:(id)presenter { 151 | self = %orig; 152 | if ([present isKindOfClass:%c(FLEXNavigationController)]) { 153 | // Enable half height sheet 154 | if ([self respondsToSelector:@selector(_presentsAtStandardHalfHeight)]) { 155 | self._presentsAtStandardHalfHeight = YES; 156 | } else { 157 | self._detents = @[[%c(_UISheetDetent) _mediumDetent], [%c(_UISheetDetent) _largeDetent]]; 158 | } 159 | // Start fullscreen, 0 for half height 160 | self._indexOfCurrentDetent = 1; 161 | // Don't expand unless dragged up 162 | self._prefersScrollingExpandsToLargerDetentWhenScrolledToEdge = NO; 163 | // Don't dim first detent 164 | self._indexOfLastUndimmedDetent = 1; 165 | } 166 | 167 | return self; 168 | } 169 | %end 170 | 171 | %hook FLEXManager 172 | %new 173 | + (NSString *)dlopen:(NSString *)path { 174 | if (!dlopen(path.UTF8String, RTLD_NOW)) { 175 | return @(dlerror()); 176 | } 177 | 178 | return @"OK"; 179 | } 180 | %end 181 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.pantsthief.flexing 2 | Name: FLEXing 3 | Pre-Depends: firmware (>= 8.0) 4 | Depends: libflex 5 | Version: 1.5.0 6 | Architecture: iphoneos-arm 7 | Description: Open FLEX anywhere! 8 | Maintainer: Tanner Bennett 9 | Author: Tanner Bennett 10 | Section: Tweaks 11 | Conflicts: com.dgh0st.flexall, gg.gh0stbyte.flexivator, com.shmoopillic.flexible, applebetas.ios.tweak.devtools.flexgesture, com.creaturecoding.flexer, com.lacertosusrepo.flex4me, me.nepeta.flexxx, com.ipadkid.flexit, com.qiop1379.flexbar, com.leftyfl1p.reflex 12 | Depiction: https://nscake.github.io/package.html?package=com.pantsthief.flexing 13 | SileoDepiction: https://nscake.github.io/depictions/com.pantsthief.flexing.sileo.json 14 | -------------------------------------------------------------------------------- /depiction: -------------------------------------------------------------------------------- 1 | A FLEX loader that supports triggering FLEX on a per-application basis by long-pressing on the status bar or holding anywhere with 3 fingers. 2 | 3 | Requires libFLEX. -------------------------------------------------------------------------------- /libflex/Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = arm64 armv7 armv7s arm64e 2 | export TARGET = iphone:latest:9.0 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | # FULL PATH of the FLEX repo on your own machine 6 | FLEX_ROOT = FLEX 7 | 8 | # Function to convert /foo/bar to -I/foo/bar 9 | dtoim = $(foreach d,$(1),-I$(d)) 10 | 11 | # Gather FLEX sources 12 | SOURCES = $(shell find $(FLEX_ROOT)/Classes -name '*.c') 13 | SOURCES += $(shell find $(FLEX_ROOT)/Classes -name '*.m') 14 | SOURCES += $(shell find $(FLEX_ROOT)/Classes -name '*.mm') 15 | # Gather FLEX headers for search paths 16 | _IMPORTS = $(shell /bin/ls -d $(FLEX_ROOT)/Classes/*/) 17 | _IMPORTS += $(shell /bin/ls -d $(FLEX_ROOT)/Classes/*/*/) 18 | _IMPORTS += $(shell /bin/ls -d $(FLEX_ROOT)/Classes/*/*/*/) 19 | _IMPORTS += $(shell /bin/ls -d $(FLEX_ROOT)/Classes/*/*/*/*/) 20 | IMPORTS = -I$(FLEX_ROOT)/Classes/ $(call dtoim, $(_IMPORTS)) 21 | 22 | TWEAK_NAME = libFLEX 23 | $(TWEAK_NAME)_FILES = libFLEX.x $(SOURCES) 24 | $(TWEAK_NAME)_FRAMEWORKS = CoreGraphics UIKit ImageIO QuartzCore 25 | $(TWEAK_NAME)_LIBRARIES = sqlite3 z 26 | $(TWEAK_NAME)_CFLAGS += -fobjc-arc -w -Wno-unsupported-availability-guard $(IMPORTS) -g 27 | $(TWEAK_NAME)_CCFLAGS += -std=gnu++11 28 | 29 | include $(THEOS_MAKE_PATH)/tweak.mk 30 | 31 | before-stage:: 32 | find . -name ".DS_Store" -delete 33 | 34 | # For printing variables from the makefile 35 | print-% : ; @echo $* = $($*) 36 | -------------------------------------------------------------------------------- /libflex/control: -------------------------------------------------------------------------------- 1 | Package: libflex 2 | Name: libFLEX 3 | Pre-Depends: firmware (>= 9.0) 4 | Depends: 5 | Version: 4.7.0~b4 6 | Architecture: iphoneos-arm 7 | Description: A library for Flipboard Explorer. 8 | Maintainer: Tanner Bennett 9 | Author: Tanner Bennett 10 | Section: Tweaks 11 | Depiction: https://nscake.github.io/package.html?package=libflex 12 | SileoDepiction: https://nscake.github.io/depictions/libflex.sileo.json 13 | -------------------------------------------------------------------------------- /libflex/depiction: -------------------------------------------------------------------------------- 1 | A dynamically loadable library for FLEX. Requires a loader, such as FLEXing. 2 | 3 | Changelog 4 | -------------------------------------------------------------------------------- /libflex/libFLEX.h: -------------------------------------------------------------------------------- 1 | // 2 | // libFLEX.h 3 | // FLEXing 4 | // 5 | // Created by Tanner Bennett on 2019-08-16 6 | // Copyright © 2019 Tanner Bennett. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | id FLXGetManager(); 12 | SEL FLXRevealSEL(); 13 | Class FLXWindowClass(); 14 | -------------------------------------------------------------------------------- /libflex/libFLEX.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Bundles = ( 4 | ); 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /libflex/libFLEX.x: -------------------------------------------------------------------------------- 1 | // 2 | // libFLEX.m 3 | // libflex 4 | // 5 | // Created by Tanner Bennett on 2019-08-16 6 | // Copyright © 2019 Tanner Bennett. All rights reserved. 7 | // 8 | 9 | #import "libFLEX.h" 10 | #import "FLEXWindow.h" 11 | #import "FLEXManager.h" 12 | 13 | id FLXGetManager() { 14 | return [FLEXManager sharedManager]; 15 | } 16 | 17 | SEL FLXRevealSEL() { 18 | return @selector(showExplorer); 19 | } 20 | 21 | Class FLXWindowClass() { 22 | return [FLEXWindow class]; 23 | } 24 | -------------------------------------------------------------------------------- /libreflex/Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = arm64 arm64e 2 | export TARGET = iphone:latest:13.0 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | XCODEPROJ_NAME = Reflex 6 | 7 | Reflex_XCODE_PROJECT = Reflex/Reflex.xcodeproj 8 | Reflex_XCODE_SCHEME = libreflex 9 | 10 | include $(THEOS_MAKE_PATH)/xcodeproj.mk 11 | 12 | # include $(THEOS_MAKE_PATH)/tweak.mk 13 | 14 | before-stage:: 15 | find . -name ".DS_Store" -delete 16 | 17 | # For printing variables from the makefile 18 | print-% : ; @echo $* = $($*) 19 | -------------------------------------------------------------------------------- /libreflex/control: -------------------------------------------------------------------------------- 1 | Package: libreflex 2 | Name: libReflex 3 | Pre-Depends: firmware (>= 13.0) 4 | Version: 1.0.0 5 | Architecture: iphoneos-arm 6 | Description: A FLEX extension for Swift object introspection. 7 | Maintainer: Tanner Bennett 8 | Author: Tanner Bennett 9 | Section: Tweaks 10 | Depiction: https://nscake.github.io/package.html?package=libflex 11 | SileoDepiction: https://nscake.github.io/depictions/libflex.sileo.json 12 | -------------------------------------------------------------------------------- /libreflex/depiction: -------------------------------------------------------------------------------- 1 | A dynamically loadable library to add Swift introspection support to FLEX. Requires a loader, such as FLEXing. 2 | 3 | Changelog 4 | -------------------------------------------------------------------------------- /libreflex/libReflex.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Bundles = ( ); 4 | }; 5 | } 6 | --------------------------------------------------------------------------------