diff --git a/.dragon/_/DEBIAN/control b/.dragon/_/DEBIAN/control new file mode 100755 index 0000000..c0414a4 --- /dev/null +++ b/.dragon/_/DEBIAN/control @@ -0,0 +1,10 @@ +Package: com.burritoz.kai +Name: Kai +Version: 0.0.1 +Architecture: iphoneos-arm +Description: An awesome MobileSubstrate tweak! +Maintainer: burrit0z +Author: burrit0z +Section: Tweaks +Depends: mobilesubstrate (>= 0.9.5000) +Installed-Size: 2056 diff --git a/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib b/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib new file mode 100755 index 0000000..4dd0882 Binary files /dev/null and b/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib differ diff --git a/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.plist b/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.plist new file mode 100644 index 0000000..10dc654 --- /dev/null +++ b/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/.dragon/build/.ninja_deps b/.dragon/build/.ninja_deps new file mode 100644 index 0000000..e5675ec Binary files /dev/null and b/.dragon/build/.ninja_deps differ diff --git a/.dragon/build/.ninja_log b/.dragon/build/.ninja_log new file mode 100644 index 0000000..7b4e46b --- /dev/null +++ b/.dragon/build/.ninja_log @@ -0,0 +1,12 @@ +# ninja log v5 +0 489 1588095990336505228 .dragon/build/logos/Kai.xm.mm 2ff43d99226043a7 +490 3100 1588095992929677755 .dragon/build/arm64e/Kai.xm.mm.o 4598f389cc63d95c +490 3103 1588095992933837787 .dragon/build/arm64/Kai.xm.mm.o 3d92451607ba4d79 +489 3122 1588095992949324464 .dragon/build/armv7/Kai.xm.mm.o 4fe1c0d4e01f824e +3103 3581 1588095993423290676 .dragon/build/kai.arm64 4a5a6d812e458df +3100 3584 1588095993427260606 .dragon/build/kai.arm64e 3f60e77356505eb3 +3122 3592 1588095993435835646 .dragon/build/kai.armv7 28dc0376c3d0fbcc +3592 3623 1588095993471341918 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym 9605f646a2b06131 +3623 3818 1588095993666211343 .dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsigned 30304c6c682e6c6d +3818 3850 1588095993696183759 .dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib d998911fb5a4bb3c +3850 3867 0 .dragon/build/trash/stage 4e5b61207c82583b diff --git a/.dragon/build/arm64/Kai.xm.mm.o b/.dragon/build/arm64/Kai.xm.mm.o new file mode 100644 index 0000000..690696c Binary files /dev/null and b/.dragon/build/arm64/Kai.xm.mm.o differ diff --git a/.dragon/build/arm64e/Kai.xm.mm.o b/.dragon/build/arm64e/Kai.xm.mm.o new file mode 100644 index 0000000..5f300f4 Binary files /dev/null and b/.dragon/build/arm64e/Kai.xm.mm.o differ diff --git a/.dragon/build/armv7/Kai.xm.mm.o b/.dragon/build/armv7/Kai.xm.mm.o new file mode 100644 index 0000000..cc5e79c Binary files /dev/null and b/.dragon/build/armv7/Kai.xm.mm.o differ diff --git a/.dragon/build/kai.arm64 b/.dragon/build/kai.arm64 new file mode 100755 index 0000000..9d629cc Binary files /dev/null and b/.dragon/build/kai.arm64 differ diff --git a/.dragon/build/kai.arm64e b/.dragon/build/kai.arm64e new file mode 100755 index 0000000..b20b62a Binary files /dev/null and b/.dragon/build/kai.arm64e differ diff --git a/.dragon/build/kai.armv7 b/.dragon/build/kai.armv7 new file mode 100755 index 0000000..4dbf652 Binary files /dev/null and b/.dragon/build/kai.armv7 differ diff --git a/.dragon/build/logos/Kai.xm.mm b/.dragon/build/logos/Kai.xm.mm new file mode 100644 index 0000000..772361c --- /dev/null +++ b/.dragon/build/logos/Kai.xm.mm @@ -0,0 +1,179 @@ +#line 1 "Kai.xm" +#include +#import +#include +#import +#import + +#import "KAIBattery.mm" +BOOL setFrame = NO; +KAIBattery *batteryWidget; +CGRect original; + + + + + + + + +@interface UIApplication (Kai) ++(id)sharedApplication; +-(BOOL)launchApplicationWithIdentifier:(id)arg1 suspended:(BOOL)arg2; +@end + +@interface CSMainPageView : UIView +@property (nonatomic, strong) KAIBattery *battery; +-(void)updateForPresentation:(id)arg1; +@end + + + + + + + + + + + + + + + + + + + + +#include +#if defined(__clang__) +#if __has_feature(objc_arc) +#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained +#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed)) +#define _LOGOS_SELF_CONST const +#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained)) +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif + +@class CSMainPageView; @class SBCoverSheetPrimarySlidingViewController; +static void (*_logos_orig$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$)(_LOGOS_SELF_TYPE_NORMAL SBCoverSheetPrimarySlidingViewController* _LOGOS_SELF_CONST, SEL, BOOL); static void _logos_method$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$(_LOGOS_SELF_TYPE_NORMAL SBCoverSheetPrimarySlidingViewController* _LOGOS_SELF_CONST, SEL, BOOL); static void (*_logos_orig$_ungrouped$CSMainPageView$updateForPresentation$)(_LOGOS_SELF_TYPE_NORMAL CSMainPageView* _LOGOS_SELF_CONST, SEL, id); static void _logos_method$_ungrouped$CSMainPageView$updateForPresentation$(_LOGOS_SELF_TYPE_NORMAL CSMainPageView* _LOGOS_SELF_CONST, SEL, id); + +#line 47 "Kai.xm" + + +static void _logos_method$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$(_LOGOS_SELF_TYPE_NORMAL SBCoverSheetPrimarySlidingViewController* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, BOOL arg1) { + _logos_orig$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$(self, _cmd, arg1); + [batteryWidget updateBattery]; +} + + + + + +__attribute__((used)) static KAIBattery * _logos_method$_ungrouped$CSMainPageView$battery(CSMainPageView * __unused self, SEL __unused _cmd) { return (KAIBattery *)objc_getAssociatedObject(self, (void *)_logos_method$_ungrouped$CSMainPageView$battery); }; __attribute__((used)) static void _logos_method$_ungrouped$CSMainPageView$setBattery(CSMainPageView * __unused self, SEL __unused _cmd, KAIBattery * rawValue) { objc_setAssociatedObject(self, (void *)_logos_method$_ungrouped$CSMainPageView$battery, rawValue, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } + +static void _logos_method$_ungrouped$CSMainPageView$updateForPresentation$(_LOGOS_SELF_TYPE_NORMAL CSMainPageView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, id arg1) { + _logos_orig$_ungrouped$CSMainPageView$updateForPresentation$(self, _cmd, arg1); + UIView *object = self; + if(!setFrame) { + original = self.frame; + + self.battery = [[KAIBattery alloc] initWithFrame:CGRectMake(8, 155, object.frame.size.width - 16, object.frame.size.height)]; + [self addSubview:self.battery]; + setFrame = YES; + batteryWidget = self.battery; + } + + object.frame = CGRectMake( + original.origin.x, + original.origin.y - (self.battery.number * 90), + original.size.width, + original.size.height + (self.battery.number * 90) + ); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +static __attribute__((constructor)) void _logosLocalInit() { +{Class _logos_class$_ungrouped$SBCoverSheetPrimarySlidingViewController = objc_getClass("SBCoverSheetPrimarySlidingViewController"); MSHookMessageEx(_logos_class$_ungrouped$SBCoverSheetPrimarySlidingViewController, @selector(viewWillAppear:), (IMP)&_logos_method$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$, (IMP*)&_logos_orig$_ungrouped$SBCoverSheetPrimarySlidingViewController$viewWillAppear$);Class _logos_class$_ungrouped$CSMainPageView = objc_getClass("CSMainPageView"); MSHookMessageEx(_logos_class$_ungrouped$CSMainPageView, @selector(updateForPresentation:), (IMP)&_logos_method$_ungrouped$CSMainPageView$updateForPresentation$, (IMP*)&_logos_orig$_ungrouped$CSMainPageView$updateForPresentation$);{ char _typeEncoding[1024]; sprintf(_typeEncoding, "%s@:", @encode(KAIBattery *)); class_addMethod(_logos_class$_ungrouped$CSMainPageView, @selector(battery), (IMP)&_logos_method$_ungrouped$CSMainPageView$battery, _typeEncoding); sprintf(_typeEncoding, "v@:%s", @encode(KAIBattery *)); class_addMethod(_logos_class$_ungrouped$CSMainPageView, @selector(setBattery:), (IMP)&_logos_method$_ungrouped$CSMainPageView$setBattery, _typeEncoding); } } } +#line 151 "Kai.xm" diff --git a/.dragon/last_package b/.dragon/last_package new file mode 100644 index 0000000..3b97749 --- /dev/null +++ b/.dragon/last_package @@ -0,0 +1 @@ +com.burritoz.kai_0.0.1_iphoneos-arm.deb diff --git a/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsigned b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsigned new file mode 100755 index 0000000..4dd0882 Binary files /dev/null and b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsigned differ diff --git a/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym new file mode 100755 index 0000000..42964e0 Binary files /dev/null and b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym differ diff --git a/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Info.plist b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Info.plist new file mode 100644 index 0000000..fa4bfed --- /dev/null +++ b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.kai.dylib.unsym + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Resources/DWARF/kai.dylib.unsym b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Resources/DWARF/kai.dylib.unsym new file mode 100644 index 0000000..0fb5c4f Binary files /dev/null and b/.dragon/sign/.dragon/_/Library/MobileSubstrate/DynamicLibraries/kai.dylib.unsym.dSYM/Contents/Resources/DWARF/kai.dylib.unsym differ diff --git a/.gitignore b/.gitignore index aa361f8..4ae4c49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.deb .DS_Store +./.* diff --git a/Kai.xm b/Kai.xm index d70242b..a594712 100644 --- a/Kai.xm +++ b/Kai.xm @@ -71,7 +71,7 @@ CGRect original; object.frame = CGRectMake( original.origin.x, - original.origin.y - (self.battery.number * 90), + original.origin.y + (self.battery.number * 90), original.size.width, original.size.height + (self.battery.number * 90) );