From 26f21ff6936c37836d5059ac083a315667add9e5 Mon Sep 17 00:00:00 2001 From: m1337 Date: Thu, 29 Aug 2024 23:12:03 +0700 Subject: [PATCH] update --- screendump/Makefile | 14 ++++++---- screendump/en.plist | 1 + screendump/layout/DEBIAN/control | 17 ++++++------ screendump/layout/DEBIAN/postinst | 4 +-- screendump/layout/DEBIAN/postrm | 2 +- screendump/main.mm | 25 ++++++++++++++++-- screendumpLowFrame/.DS_Store | Bin 0 -> 6148 bytes screendumpLowFrame/Makefile | 19 +++++++++---- screendumpLowFrame/build_packages.sh | 11 -------- screendumpLowFrame/en.plist | 0 screendumpLowFrame/hooks/Makefile | 9 +++---- screendumpLowFrame/hooks/Tweak.xm | 2 ++ screendumpLowFrame/layout/DEBIAN/control | 10 +++---- .../layout/DEBIAN/{prerm => postrm} | 2 +- screendumpLowFrame/main.mm | 6 ++--- .../vncbuild/include/rfb/rfbclient.h | 2 +- 16 files changed, 74 insertions(+), 50 deletions(-) mode change 100644 => 100755 screendump/en.plist mode change 100644 => 100755 screendump/main.mm create mode 100644 screendumpLowFrame/.DS_Store delete mode 100755 screendumpLowFrame/build_packages.sh mode change 100644 => 100755 screendumpLowFrame/en.plist rename screendumpLowFrame/layout/DEBIAN/{prerm => postrm} (91%) mode change 100644 => 100755 screendumpLowFrame/main.mm mode change 100644 => 100755 screendumpLowFrame/vncbuild/include/rfb/rfbclient.h diff --git a/screendump/Makefile b/screendump/Makefile index fb39fb4..6868bd0 100644 --- a/screendump/Makefile +++ b/screendump/Makefile @@ -1,18 +1,22 @@ -TARGET = iphone:14.4:10.0 +DEBUG=0 +FINALPACKAGE=1 + +THEOS_PACKAGE_SCHEME = rootless + +TARGET = iphone:14.5:14.5 +ARCHS = arm64 include $(THEOS)/makefiles/common.mk TOOL_NAME = screendumpd -export ARCHS = arm64 $(TOOL_NAME)_ARCHS = arm64 $(TOOL_NAME)_FILES = main.mm $(TOOL_NAME)_FRAMEWORKS := IOSurface IOKit $(TOOL_NAME)_PRIVATE_FRAMEWORKS := IOMobileFramebuffer IOSurface -$(TOOL_NAME)_OBJCFLAGS += -Ivncbuild/include -Iinclude -$(TOOL_NAME)_LDFLAGS += -Wl,-segalign,4000 -Lvncbuild/lib -lvncserver -lpng -llzo2 -ljpeg -lssl -lcrypto -lz +$(TOOL_NAME)_OBJCFLAGS += -I./vncbuild/include -Iinclude +$(TOOL_NAME)_LDFLAGS += -Wl,-segalign,4000 -L./vncbuild/lib -lvncserver -lpng -llzo2 -ljpeg -lssl -lcrypto -lz $(TOOL_NAME)_CFLAGS = -w $(TOOL_NAME)_CODESIGN_FLAGS = "-Sen.plist" $(TOOL_NAME)_INSTALL_PATH = /usr/libexec - include $(THEOS_MAKE_PATH)/tool.mk diff --git a/screendump/en.plist b/screendump/en.plist old mode 100644 new mode 100755 index 11f2d09..75e0c50 --- a/screendump/en.plist +++ b/screendump/en.plist @@ -7,6 +7,7 @@ IOSurfaceAcceleratorClient IOMobileFramebufferUserClient IOSurfaceRootUserClient + IOHIDLibUserClient platform-application diff --git a/screendump/layout/DEBIAN/control b/screendump/layout/DEBIAN/control index c8f0ca6..f97665b 100644 --- a/screendump/layout/DEBIAN/control +++ b/screendump/layout/DEBIAN/control @@ -1,12 +1,11 @@ -Package: com.julioverne.screendump13 -Name: screendump (iOS 13) +Package: com.m1337.screendump15 +Name: screendump (iOS 15+) Depends: mobilesubstrate, preferenceloader -Conflicts: com.cosmosgenius.screendump -Architecture: iphoneos-arm -Description: VNC for ios -Maintainer: Julio -Author: julioverne, Sharat M R -Section: Tweaks -Version: 0.0.3e +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 afc870c..d43c6bc 100755 --- a/screendump/layout/DEBIAN/postinst +++ b/screendump/layout/DEBIAN/postinst @@ -1,6 +1,6 @@ #!/bin/sh -launchctl unload /Library/LaunchDaemons/com.julioverne.screendumpd.plist -launchctl load /Library/LaunchDaemons/com.julioverne.screendumpd.plist +launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist +launchctl load /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist exit 0; diff --git a/screendump/layout/DEBIAN/postrm b/screendump/layout/DEBIAN/postrm index 6f70c14..1c64984 100755 --- a/screendump/layout/DEBIAN/postrm +++ b/screendump/layout/DEBIAN/postrm @@ -1,5 +1,5 @@ #!/bin/sh -launchctl unload /Library/LaunchDaemons/com.julioverne.screendumpd.plist +launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist exit 0; diff --git a/screendump/main.mm b/screendump/main.mm old mode 100644 new mode 100755 index c39aec4..7ba76ec --- a/screendump/main.mm +++ b/screendump/main.mm @@ -1,8 +1,10 @@ #include #include #include +#include +#include -#define kSettingsPath @"//var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" +#define kSettingsPath @"/var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" static bool CCSisEnabled = true; static NSString *CCSPassword = nil; @@ -49,7 +51,7 @@ typedef mach_port_t io_service_t; typedef kern_return_t IOReturn; typedef IOReturn IOMobileFramebufferReturn; typedef io_service_t IOMobileFramebufferService; -extern "C" mach_port_t mach_task_self(void); +// extern "C" mach_port_t mach_task_self(void); extern "C" void IOSurfaceFlushProcessorCaches(IOSurfaceRef buffer); extern "C" int IOSurfaceLock(IOSurfaceRef surface, uint32_t options, uint32_t *seed); extern "C" int IOSurfaceUnlock(IOSurfaceRef surface, uint32_t options, uint32_t *seed); @@ -58,8 +60,10 @@ extern "C" CFMutableDictionaryRef IOServiceMatching(const char *name); extern "C" const mach_port_t kIOMasterPortDefault; extern "C" io_service_t IOServiceGetMatchingService(mach_port_t masterPort, CFDictionaryRef matching); extern "C" IOMobileFramebufferReturn IOMobileFramebufferGetLayerDefaultSurface(IOMobileFramebufferRef pointer, int surface, IOSurfaceRef *buffer); +extern "C" IOMobileFramebufferReturn IOMobileFramebufferCopyLayerDisplayedSurface(IOMobileFramebufferRef pointer, int surface, IOSurfaceRef *buffer); extern "C" IOMobileFramebufferReturn IOMobileFramebufferOpen(IOMobileFramebufferService service, mach_port_t owningTask, unsigned int type, IOMobileFramebufferRef *pointer); extern "C" IOMobileFramebufferReturn IOMobileFramebufferGetMainDisplay(IOMobileFramebufferRef *pointer); +extern "C" mach_port_t mach_task_self(void); static IOSurfaceAcceleratorRef accelerator; static IOSurfaceRef static_buffer; @@ -101,7 +105,10 @@ static void VNCSetup() IOSurfaceAcceleratorCreate(kCFAllocatorDefault, 0, &accelerator); IOMobileFramebufferGetMainDisplay(&framebufferConnection); + IOMobileFramebufferGetLayerDefaultSurface(framebufferConnection, 0, &screenSurface); + if(screenSurface == NULL) + IOMobileFramebufferCopyLayerDisplayedSurface(framebufferConnection, 0, &screenSurface); //CGSize size; //IOMobileFramebufferGetDisplaySize(framebufferConnection, &size); @@ -528,3 +535,17 @@ static void handleVNCKeyboard(rfbBool down, rfbKeySym key, rfbClientPtr client) static void handleVNCPointer(int buttons, int x, int y, rfbClientPtr client) { VNCPointer(buttons, x, y, client); } + +// 기본 22:11:52.331940+0900 kernel Corpse released, count at 0 +// 기본 22:11:52.414493+0900 kernel IOMFB: default_fb_surface: No Default FB Surface found. Return error +// 기본 22:11:52.414536+0900 kernel screendumpd[43722] Corpse allowed 1 of 5 +// 기본 22:11:52.606790+0900 kernel Corpse released, count at 0 +// 기본 22:11:52.682856+0900 kernel IOMFB: default_fb_surface: No Default FB Surface found. Return error +// 기본 22:11:52.682905+0900 kernel screendumpd[43723] Corpse allowed 1 of 5 +// 기본 22:11:52.876255+0900 kernel Corpse released, count at 0 +// 기본 22:11:52.915524+0900 kernel IOMFB: default_fb_surface: No Default FB Surface found. Return error +// 기본 22:11:52.915570+0900 kernel screendumpd[43724] Corpse allowed 1 of 5 +// 기본 22:11:53.105917+0900 kernel Corpse released, count at 0 +// 기본 22:11:53.277579+0900 kernel IOMFB: default_fb_surface: No Default FB Surface found. Return error +// 기본 22:11:53.277657+0900 kernel screendumpd[43725] Corpse allowed 1 of 5 +// 기본 22:11:53.407555+0900 kernel IOMFB: default_fb_surface: No Default FB Surface found. Return error diff --git a/screendumpLowFrame/.DS_Store b/screendumpLowFrame/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 -Author: Sharat M R +Maintainer: m1337 +Author: m1337 Section: Tweaks -Version: 0.0.4 +Version: 0.0.5 \ No newline at end of file diff --git a/screendumpLowFrame/layout/DEBIAN/prerm b/screendumpLowFrame/layout/DEBIAN/postrm similarity index 91% rename from screendumpLowFrame/layout/DEBIAN/prerm rename to screendumpLowFrame/layout/DEBIAN/postrm index 0866b01..48114bb 100755 --- a/screendumpLowFrame/layout/DEBIAN/prerm +++ b/screendumpLowFrame/layout/DEBIAN/postrm @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh if [ -L "/var/jb" ]; then launchctl unload /var/jb/Library/LaunchDaemons/com.julioverne.screendumpd.plist diff --git a/screendumpLowFrame/main.mm b/screendumpLowFrame/main.mm old mode 100644 new mode 100755 index 1252761..7f64ff8 --- a/screendumpLowFrame/main.mm +++ b/screendumpLowFrame/main.mm @@ -1,9 +1,9 @@ #include #include #include -#import -#import -#import +#import + +#define kSettingsPath @"/var/mobile/Library/Preferences/com.cosmosgenius.screendump.plist" static bool CCSisEnabled = true; static NSString *CCSPassword = nil; diff --git a/screendumpLowFrame/vncbuild/include/rfb/rfbclient.h b/screendumpLowFrame/vncbuild/include/rfb/rfbclient.h old mode 100644 new mode 100755 index f633954..c727add --- a/screendumpLowFrame/vncbuild/include/rfb/rfbclient.h +++ b/screendumpLowFrame/vncbuild/include/rfb/rfbclient.h @@ -81,7 +81,7 @@ #define TUNNEL_PORT_OFFSET 5500 #define SERVER_PORT_OFFSET 5900 -#define DEFAULT_SSH_CMD "/usr/bin/ssh" +#define DEFAULT_SSH_CMD "/var/jb/usr/bin/ssh" #define DEFAULT_TUNNEL_CMD \ (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20") #define DEFAULT_VIA_CMD \