rework a bit

This commit is contained in:
Levent Duivel 2024-11-07 07:32:03 +05:00
parent ac972bbedc
commit feda8cc7a1
19 changed files with 63 additions and 58 deletions

View File

@ -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

11
screendump/control Normal file
View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -1,5 +1,2 @@
#!/bin/sh
launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist
exit 0;
exit 0;

View File

@ -0,0 +1,3 @@
#!/bin/sh
launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist 2> /dev/null
exit 0;

3
screendump/layout/DEBIAN/prerm Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
launchctl unload /var/jb/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist 2> /dev/null
exit 0;

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.julioverne.screendumpd</string>
<string>ru.mostmodest.screendumpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/screendumpd</string>

View File

@ -21,13 +21,13 @@
</dict>
<dict>
<key>PostNotification</key>
<string>com.cosmosgenius.screendump/restart</string>
<string>ru.mostmodest.screendump/restart</string>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.cosmosgenius.screendump</string>
<string>ru.mostmodest.screendump</string>
<key>key</key>
<string>CCSisEnabled</string>
<key>label</key>
@ -35,11 +35,11 @@
</dict>
<dict>
<key>PostNotification</key>
<string>com.cosmosgenius.screendump/restart</string>
<string>ru.mostmodest.screendump/restart</string>
<key>cell</key>
<string>PSSecureEditTextCell</string>
<key>defaults</key>
<string>com.cosmosgenius.screendump</string>
<string>ru.mostmodest.screendump</string>
<key>key</key>
<string>CCSPassword</string>
<key>label</key>
@ -55,11 +55,11 @@
</dict>
<dict>
<key>PostNotification</key>
<string>com.cosmosgenius.screendump/restart</string>
<string>ru.mostmodest.screendump/restart</string>
<key>cell</key>
<string>PSEditTextCell</string>
<key>defaults</key>
<string>com.cosmosgenius.screendump</string>
<string>ru.mostmodest.screendump</string>
<key>key</key>
<string>height</string>
<key>label</key>
@ -69,11 +69,11 @@
</dict>
<dict>
<key>PostNotification</key>
<string>com.cosmosgenius.screendump/restart</string>
<string>ru.mostmodest.screendump/restart</string>
<key>cell</key>
<string>PSEditTextCell</string>
<key>defaults</key>
<string>com.cosmosgenius.screendump</string>
<string>ru.mostmodest.screendump</string>
<key>key</key>
<string>width</string>
<key>label</key>

View File

@ -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();

View File

@ -4,7 +4,7 @@
#import <UIKit/UIKit.h>
#import <rootless.h>
#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);

View File

@ -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)
$(ECHO_NOTHING)$(FAKEROOT) chown root:wheel $(THEOS_STAGING_DIR)/Library/LaunchDaemons/ru.mostmodest.screendumpd.plist$(ECHO_END)

View File

@ -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)

View File

@ -5,7 +5,7 @@
#import <IOSurface/IOSurfaceRef.h>
#import <rootless.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;
@ -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");

View File

@ -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 <morpheus@1337.pro>
Author: m1337 <morpheus@1337.pro>
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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.julioverne.screendumpd</string>
<string>ru.mostmodest.screendumpd</string>
<key>ProgramArguments</key>
<array>
<string>/var/jb/usr/libexec/screendumpd</string>