From feda8cc7a12877c754bdf1213e9697b08ba5709b Mon Sep 17 00:00:00 2001 From: Levent Duivel Date: Thu, 7 Nov 2024 07:32:03 +0500 Subject: [PATCH] rework a bit --- screendump/Makefile | 7 +++++-- screendump/control | 11 +++++++++++ screendump/layout/DEBIAN/control | 11 ----------- screendump/layout/DEBIAN/postinst | 7 ++----- screendump/layout/DEBIAN/postrm | 5 +---- screendump/layout/DEBIAN/preinst | 3 +++ screendump/layout/DEBIAN/prerm | 3 +++ ...mpd.plist => ru.mostmodest.screendumpd.plist} | 2 +- .../Preferences/screendump/Preferences.plist | 16 ++++++++-------- screendump/main.mm | 8 ++++---- screendumpLowFrame/Capturer/Tweak.xm | 8 ++++---- screendumpLowFrame/Makefile | 2 +- screendumpLowFrame/Server/Makefile | 2 +- screendumpLowFrame/Server/main.mm | 8 ++++---- screendumpLowFrame/control | 14 ++++++++------ screendumpLowFrame/layout/DEBIAN/postinst | 4 ++-- screendumpLowFrame/layout/DEBIAN/preinst | 4 ++-- screendumpLowFrame/layout/DEBIAN/prerm | 4 ++-- ...mpd.plist => ru.mostmodest.screendumpd.plist} | 2 +- 19 files changed, 63 insertions(+), 58 deletions(-) create mode 100644 screendump/control delete mode 100644 screendump/layout/DEBIAN/control create mode 100755 screendump/layout/DEBIAN/preinst create mode 100755 screendump/layout/DEBIAN/prerm rename screendump/layout/Library/LaunchDaemons/{com.julioverne.screendumpd.plist => ru.mostmodest.screendumpd.plist} (88%) rename screendumpLowFrame/layout/Library/LaunchDaemons/{com.julioverne.screendumpd.plist => ru.mostmodest.screendumpd.plist} (89%) diff --git a/screendump/Makefile b/screendump/Makefile index 0c1d3db..fbde1e1 100644 --- a/screendump/Makefile +++ b/screendump/Makefile @@ -1,5 +1,5 @@ export THEOS_PACKAGE_SCHEME = rootless -export ARCHS = arm64 arm64e +export ARCHS = arm64 export TARGET = iphone:16.5:14.0 export GO_EASY_ON_ME = 1 export COPYFILE_DISABLE=1 @@ -7,7 +7,6 @@ export COPYFILE_DISABLE=1 include $(THEOS)/makefiles/common.mk TOOL_NAME = screendumpd -$(TOOL_NAME)_ARCHS = arm64 $(TOOL_NAME)_FILES = main.mm $(TOOL_NAME)_FRAMEWORKS := IOSurface IOKit $(TOOL_NAME)_PRIVATE_FRAMEWORKS := IOMobileFramebuffer IOSurface @@ -17,4 +16,8 @@ $(TOOL_NAME)_CFLAGS = -w $(TOOL_NAME)_CODESIGN_FLAGS = "-Sen.plist" $(TOOL_NAME)_INSTALL_PATH = /usr/libexec +before-stage:: + $(ECHO_NOTHING)find . -name '.DS_Store' -type f -delete$(ECHO_END) + $(ECHO_NOTHING)chmod 0775 layout/DEBIAN/*$(ECHO_END) + include $(THEOS_MAKE_PATH)/tool.mk diff --git a/screendump/control b/screendump/control new file mode 100644 index 0000000..bf55962 --- /dev/null +++ b/screendump/control @@ -0,0 +1,11 @@ +Package: ru.mostmodest.screendump +Name: screendump +Architecture: iphoneos-arm +Description: VNC for iOS15+ (rootless/Ellekit) +Maintainer: mostm +Author: cosmosgenius +Section: Tweaks +Conflicts: ru.mostmodest.screendump.lowframe +Depends: mobilesubstrate, preferenceloader +Icon: file:///Library/PreferenceLoader/Preferences/screendump/ScreenDump@2x.png +Version: 0.0.5 diff --git a/screendump/layout/DEBIAN/control b/screendump/layout/DEBIAN/control deleted file mode 100644 index f97665b..0000000 --- a/screendump/layout/DEBIAN/control +++ /dev/null @@ -1,11 +0,0 @@ -Package: com.m1337.screendump15 -Name: screendump (iOS 15+) -Depends: mobilesubstrate, preferenceloader -Conflicts: com.cosmosgenius.screendump, com.cosmosgenius.screendump13, com.julioverne.screendump13 -Architecture: iphoneos-arm64 -Description: VNC for iOS15+ (rootless/Ellekit) -Maintainer: m1337 -Author: m1337 -Version: 0.0.5 -Depiction: http://julioverne.github.io/description.html?id=com.julioverne.screendump13 -Icon: file:///Library/PreferenceLoader/Preferences/screendump/ScreenDump@2x.png diff --git a/screendump/layout/DEBIAN/postinst b/screendump/layout/DEBIAN/postinst index d43c6bc..31c2f30 100755 --- a/screendump/layout/DEBIAN/postinst +++ b/screendump/layout/DEBIAN/postinst @@ -1,6 +1,3 @@ #!/bin/sh - -launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist -launchctl load /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist - -exit 0; +launchctl load /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist 2> /dev/null +exit 0; \ No newline at end of file diff --git a/screendump/layout/DEBIAN/postrm b/screendump/layout/DEBIAN/postrm index 1c64984..08e3f0e 100755 --- a/screendump/layout/DEBIAN/postrm +++ b/screendump/layout/DEBIAN/postrm @@ -1,5 +1,2 @@ #!/bin/sh - -launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist - -exit 0; +exit 0; \ No newline at end of file diff --git a/screendump/layout/DEBIAN/preinst b/screendump/layout/DEBIAN/preinst new file mode 100755 index 0000000..5456010 --- /dev/null +++ b/screendump/layout/DEBIAN/preinst @@ -0,0 +1,3 @@ +#!/bin/sh +launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist 2> /dev/null +exit 0; \ No newline at end of file diff --git a/screendump/layout/DEBIAN/prerm b/screendump/layout/DEBIAN/prerm new file mode 100755 index 0000000..5456010 --- /dev/null +++ b/screendump/layout/DEBIAN/prerm @@ -0,0 +1,3 @@ +#!/bin/sh +launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist 2> /dev/null +exit 0; \ No newline at end of file diff --git a/screendump/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist b/screendump/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist similarity index 88% rename from screendump/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist rename to screendump/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist index 911f22e..975a98c 100644 --- a/screendump/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist +++ b/screendump/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist @@ -3,7 +3,7 @@ Label - com.julioverne.screendumpd + ru.mostmodest.screendumpd ProgramArguments /usr/libexec/screendumpd diff --git a/screendump/layout/Library/PreferenceLoader/Preferences/screendump/Preferences.plist b/screendump/layout/Library/PreferenceLoader/Preferences/screendump/Preferences.plist index 9869565..c88b5bb 100644 --- a/screendump/layout/Library/PreferenceLoader/Preferences/screendump/Preferences.plist +++ b/screendump/layout/Library/PreferenceLoader/Preferences/screendump/Preferences.plist @@ -21,13 +21,13 @@ PostNotification - com.cosmosgenius.screendump/restart + ru.mostmodest.screendump/restart cell PSSwitchCell default defaults - com.cosmosgenius.screendump + ru.mostmodest.screendump key CCSisEnabled label @@ -35,11 +35,11 @@ PostNotification - com.cosmosgenius.screendump/restart + ru.mostmodest.screendump/restart cell PSSecureEditTextCell defaults - com.cosmosgenius.screendump + ru.mostmodest.screendump key CCSPassword label @@ -55,11 +55,11 @@ PostNotification - com.cosmosgenius.screendump/restart + ru.mostmodest.screendump/restart cell PSEditTextCell defaults - com.cosmosgenius.screendump + ru.mostmodest.screendump key height label @@ -69,11 +69,11 @@ PostNotification - com.cosmosgenius.screendump/restart + ru.mostmodest.screendump/restart cell PSEditTextCell defaults - com.cosmosgenius.screendump + ru.mostmodest.screendump key width label diff --git a/screendump/main.mm b/screendump/main.mm index 4c811d6..3729f4e 100755 --- a/screendump/main.mm +++ b/screendump/main.mm @@ -6,7 +6,7 @@ #import "FrameUpdater.h" -#define kSettingsPath @"/var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" +#define kSettingsPath @"/var/mobile/Library/Preferences/ru.mostmodest.screendump.plist" static bool CCSisEnabled = true; static NSString *CCSPassword = nil; @@ -190,7 +190,7 @@ static void loadPrefs(void) { @autoreleasepool { NSDictionary* defaults = nil; - CFStringRef appID = CFSTR("com.cosmosgenius.screendump"); + CFStringRef appID = CFSTR("ru.mostmodest.screendump"); CFArrayRef keyList = CFPreferencesCopyKeyList(appID, CFSTR("mobile"), kCFPreferencesAnyHost); if(keyList) { defaults = (NSDictionary *)CFPreferencesCopyMultiple(keyList, appID, CFSTR("mobile"), kCFPreferencesAnyHost)?:@{}; @@ -291,8 +291,8 @@ static void restartServer() int main(int argc, const char *argv[]) { - CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.cosmosgenius.screendump/preferences.changed"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); - CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)restartServer, CFSTR("com.cosmosgenius.screendump/restart"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("ru.mostmodest.screendump/preferences.changed"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)restartServer, CFSTR("ru.mostmodest.screendump/restart"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); loadPrefs(); diff --git a/screendumpLowFrame/Capturer/Tweak.xm b/screendumpLowFrame/Capturer/Tweak.xm index bf40646..cffc27d 100644 --- a/screendumpLowFrame/Capturer/Tweak.xm +++ b/screendumpLowFrame/Capturer/Tweak.xm @@ -4,7 +4,7 @@ #import #import -#define kSettingsPath @"/var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" +#define kSettingsPath @"/var/mobile/Library/Preferences/ru.mostmodest.screendump.plist" extern "C" UIImage* _UICreateScreenUIImage(); @@ -126,7 +126,7 @@ static BOOL isBlackScreen; [imageData writeToFile:@"//tmp/screendump_Buff.tmp" atomically:YES]; [@{@"width":@(iWidth), @"height":@(iHeight), @"size":@(size),} writeToFile:@"//tmp/screendump_Info.tmp" atomically:YES]; NSLog(@"screendumpbb: capture - notifying daemon"); - notify_post("com.julioverne.screendump/frameChanged"); + notify_post("ru.mostmodest.screendump/frameChanged"); } }); } @@ -164,7 +164,7 @@ static void loadPrefs(CFNotificationCenterRef center, void* observer, CFStringRe { NSLog(@"screendumpbb: loadPrefs"); @autoreleasepool { - NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"com.cosmosgenius.screendump"]; + NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"ru.mostmodest.screendump"]; isEnabled = [[defaults objectForKey:@"CCSisEnabled"]?:@NO boolValue]; NSLog(@"screendumpbb: loadPrefs - isEnabled: %d", isEnabled); } @@ -177,7 +177,7 @@ static void loadPrefs(CFNotificationCenterRef center, void* observer, CFStringRe CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, screenDisplayStatus, CFSTR("com.apple.iokit.hid.displayStatus"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); NSLog(@"screendumpbb: ctor 1"); - CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, loadPrefs, CFSTR("com.cosmosgenius.screendump/preferences.changed"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, loadPrefs, CFSTR("ru.mostmodest.screendump/preferences.changed"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); NSLog(@"screendumpbb: ctor 2"); loadPrefs(NULL, NULL, NULL, NULL, NULL); diff --git a/screendumpLowFrame/Makefile b/screendumpLowFrame/Makefile index e7c958e..39406c9 100644 --- a/screendumpLowFrame/Makefile +++ b/screendumpLowFrame/Makefile @@ -11,4 +11,4 @@ SUBPROJECTS += Capturer Server include $(THEOS_MAKE_PATH)/aggregate.mk after-screendumpd-stage:: - $(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/com.julioverne.screendumpd.plist$(ECHO_END) \ No newline at end of file + $(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist$(ECHO_END) \ No newline at end of file diff --git a/screendumpLowFrame/Server/Makefile b/screendumpLowFrame/Server/Makefile index 855cef2..e62024a 100644 --- a/screendumpLowFrame/Server/Makefile +++ b/screendumpLowFrame/Server/Makefile @@ -14,4 +14,4 @@ $(TOOL_NAME)_CODESIGN_FLAGS = -Sentitlements.plist include $(THEOS_MAKE_PATH)/tool.mk after-screendumpd-stage:: - $(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/com.julioverne.screendumpd.plist$(ECHO_END) + $(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist$(ECHO_END) diff --git a/screendumpLowFrame/Server/main.mm b/screendumpLowFrame/Server/main.mm index c9f8a33..3feca24 100755 --- a/screendumpLowFrame/Server/main.mm +++ b/screendumpLowFrame/Server/main.mm @@ -5,7 +5,7 @@ #import #import -#define kSettingsPath @"/var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" +#define kSettingsPath @"/var/mobile/Library/Preferences/ru.mostmodest.screendump.plist" static bool CCSisEnabled = true; static NSString *CCSPassword = nil; @@ -161,7 +161,7 @@ static void loadPrefs(void) NSLog(@"screendumpd: load prefs"); @autoreleasepool { NSDictionary* defaults = nil; - CFStringRef appID = CFSTR("com.cosmosgenius.screendump"); + CFStringRef appID = CFSTR("ru.mostmodest.screendump"); CFArrayRef keyList = CFPreferencesCopyKeyList(appID, CFSTR("mobile"), kCFPreferencesAnyHost); if(keyList) { defaults = (NSDictionary *)CFPreferencesCopyMultiple(keyList, appID, CFSTR("mobile"), kCFPreferencesAnyHost)?:@{}; @@ -217,13 +217,13 @@ int main(int argc, const char *argv[]) CFNotificationCenterAddObserver( CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, - CFSTR("com.cosmosgenius.screendump/preferences.changed"), + CFSTR("ru.mostmodest.screendump/preferences.changed"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); CFNotificationCenterAddObserver( CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)upFrame, - CFSTR("com.julioverne.screendump/frameChanged"), + CFSTR("ru.mostmodest.screendump/frameChanged"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); NSLog(@"screendumpd: main - vnc setup"); diff --git a/screendumpLowFrame/control b/screendumpLowFrame/control index c685adc..3dbc5ab 100644 --- a/screendumpLowFrame/control +++ b/screendumpLowFrame/control @@ -1,9 +1,11 @@ -Package: com.m1337.screendump15 -Name: screendump -Depends: mobilesubstrate, preferenceloader +Package: ru.mostmodest.screendump.lowframe +Name: screendumpLowFrame Architecture: iphoneos-arm -Description: VNC for ios -Maintainer: m1337 -Author: m1337 +Description: VNC for iOS15+ (rootless/Ellekit) +Maintainer: mostm +Author: julioverne Section: Tweaks +Conflicts: ru.mostmodest.screendump +Depends: mobilesubstrate, preferenceloader +Icon: file:///Library/PreferenceLoader/Preferences/screendump/ScreenDump@2x.png Version: 0.0.5 \ No newline at end of file diff --git a/screendumpLowFrame/layout/DEBIAN/postinst b/screendumpLowFrame/layout/DEBIAN/postinst index d3b2e7f..50f07eb 100755 --- a/screendumpLowFrame/layout/DEBIAN/postinst +++ b/screendumpLowFrame/layout/DEBIAN/postinst @@ -1,9 +1,9 @@ #!/bin/sh if [ -L "/var/jb" ]; then - launchctl load /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl load /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist else - launchctl load /Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl load /Library/LaunchDaemons/ru.mostmodest.screendumpd.plist fi exit 0; diff --git a/screendumpLowFrame/layout/DEBIAN/preinst b/screendumpLowFrame/layout/DEBIAN/preinst index 62823f3..d1933dc 100755 --- a/screendumpLowFrame/layout/DEBIAN/preinst +++ b/screendumpLowFrame/layout/DEBIAN/preinst @@ -1,9 +1,9 @@ #!/bin/sh if [ -L "/var/jb" ]; then - launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist else - launchctl unload /Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl unload /Library/LaunchDaemons/ru.mostmodest.screendumpd.plist fi exit 0; diff --git a/screendumpLowFrame/layout/DEBIAN/prerm b/screendumpLowFrame/layout/DEBIAN/prerm index 62823f3..d1933dc 100755 --- a/screendumpLowFrame/layout/DEBIAN/prerm +++ b/screendumpLowFrame/layout/DEBIAN/prerm @@ -1,9 +1,9 @@ #!/bin/sh if [ -L "/var/jb" ]; then - launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist else - launchctl unload /Library/LaunchDaemons/com.julioverne.screendumpd.plist + launchctl unload /Library/LaunchDaemons/ru.mostmodest.screendumpd.plist fi exit 0; diff --git a/screendumpLowFrame/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist b/screendumpLowFrame/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist similarity index 89% rename from screendumpLowFrame/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist rename to screendumpLowFrame/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist index 64803f4..98eb973 100644 --- a/screendumpLowFrame/layout/Library/LaunchDaemons/com.julioverne.screendumpd.plist +++ b/screendumpLowFrame/layout/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist @@ -3,7 +3,7 @@ Label - com.julioverne.screendumpd + ru.mostmodest.screendumpd ProgramArguments /var/jb/usr/libexec/screendumpd