-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a6a5aa
commit 0d76400
Showing
8 changed files
with
132 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
privateframeworks/IOMobileFramebuffer.framework/IOMobileFramebuffer.tbd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
archs: [ armv7, armv7s, arm64 ] | ||
platform: ios | ||
install-name: /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer | ||
current-version: 1 | ||
compatibility-version: 1 | ||
exports: | ||
- archs: [ armv7, armv7s, arm64 ] | ||
symbols: [ _IOMobileFrameBufferEnableDebugTracing, _IOMobileFrameBufferEnableVBLTraces, | ||
_IOMobileFrameBufferGetDebugTraces, _IOMobileFrameBufferGetMirroringCapability, | ||
_IOMobileFrameBufferPrintDebugTraces, _IOMobileFrameBufferSetLogLevel, | ||
_IOMobileFrameBufferprintDisplayRegs, _IOMobileFramebufferALSSEnableWindows, | ||
_IOMobileFramebufferALSSGetRGBCoeffs, _IOMobileFramebufferALSSGetWindows, | ||
_IOMobileFramebufferALSSGetWindowsSums, _IOMobileFramebufferALSSSetRGBCoeffs, | ||
_IOMobileFramebufferALSSSetWindows, _IOMobileFramebufferChangeFrameInfo, | ||
_IOMobileFramebufferCopyProperty, _IOMobileFramebufferCreateDisplayList, | ||
_IOMobileFramebufferCreateStatistics, _IOMobileFramebufferDisableCRCNotifications, | ||
_IOMobileFramebufferDisableHotPlugDetectNotifications, _IOMobileFramebufferDisablePowerNotifications, | ||
_IOMobileFramebufferDisableVSyncNotifications, _IOMobileFramebufferEnableCRCNotifications, | ||
_IOMobileFramebufferEnableDisableDithering, _IOMobileFramebufferEnableDisableVideoPowerSavings, | ||
_IOMobileFramebufferEnableHotPlugDetectNotifications, _IOMobileFramebufferEnableMirroring, | ||
_IOMobileFramebufferEnablePowerNotifications, _IOMobileFramebufferEnableStatistics, | ||
_IOMobileFramebufferEnableVSyncNotifications, _IOMobileFramebufferFactoryPortal, | ||
_IOMobileFramebufferFrameInfo, _IOMobileFramebufferGetBlock, | ||
_IOMobileFramebufferGetCRCNotifyMessageCount, _IOMobileFramebufferGetCRCRunLoopSource, | ||
_IOMobileFramebufferGetCanvasSizes, _IOMobileFramebufferGetColorRemapMode, | ||
_IOMobileFramebufferGetCurrentAbsoluteTime, _IOMobileFramebufferGetDigitalOutState, | ||
_IOMobileFramebufferGetDisplayArea, _IOMobileFramebufferGetDisplaySize, | ||
_IOMobileFramebufferGetDotPitch, _IOMobileFramebufferGetDriverInstance, | ||
_IOMobileFramebufferGetFrameworkInfo, _IOMobileFramebufferGetGammaTable, | ||
_IOMobileFramebufferGetHDCPAuthenticationProtocol, _IOMobileFramebufferGetHDCPDownstreamState, | ||
_IOMobileFramebufferGetHDCPRunLoopSource, _IOMobileFramebufferGetHotPlugRunLoopSource, | ||
_IOMobileFramebufferGetID, _IOMobileFramebufferGetLayerDefaultSurface, | ||
_IOMobileFramebufferGetMainDisplay, _IOMobileFramebufferGetMatrix, _IOMobileFramebufferGetMirrorError, | ||
_IOMobileFramebufferGetRunLoopSource, _IOMobileFramebufferGetSecondaryDisplay, | ||
_IOMobileFramebufferGetServiceObject, _IOMobileFramebufferGetSupportedDigitalOutModes, | ||
_IOMobileFramebufferGetTypeID, _IOMobileFramebufferGetVSyncRunLoopSource, | ||
_IOMobileFramebufferGetWirelessSurface, _IOMobileFramebufferGetWirelessSurfaceWithOptions, | ||
_IOMobileFramebufferHDCPGetReply, _IOMobileFramebufferHDCPSendRequest, | ||
_IOMobileFramebufferInstallVirtualDisplay, _IOMobileFramebufferInstallVirtualDisplays, | ||
_IOMobileFramebufferIsMainDisplay, _IOMobileFramebufferKernelTests, _IOMobileFramebufferOpen, | ||
_IOMobileFramebufferOpenByName, _IOMobileFramebufferReadyForSwap, | ||
_IOMobileFramebufferRequestPowerChange, _IOMobileFramebufferSPLCGetBrightness, | ||
_IOMobileFramebufferSPLCSetBrightness, _IOMobileFramebufferScheduleWithDispatchQueue, | ||
_IOMobileFramebufferSetBlock, _IOMobileFramebufferSetBrightnessCorrection, | ||
_IOMobileFramebufferSetCanvasSize, _IOMobileFramebufferSetColorRemapMode, | ||
_IOMobileFramebufferSetContrast, _IOMobileFramebufferSetDebugFlags, | ||
_IOMobileFramebufferSetDigitalOutMode, _IOMobileFramebufferSetDisplayDevice, | ||
_IOMobileFramebufferSetDisplaySize, _IOMobileFramebufferSetFlags, _IOMobileFramebufferSetGammaTable, | ||
_IOMobileFramebufferSetIdleBuffer, _IOMobileFramebufferSetLine21Data, _IOMobileFramebufferSetMatrix, | ||
_IOMobileFramebufferSetMirrorContentRegion, _IOMobileFramebufferSetParameter, | ||
_IOMobileFramebufferSetRenderingAngle, _IOMobileFramebufferSetTVOutMode, | ||
_IOMobileFramebufferSetTVOutSignalType, _IOMobileFramebufferSetUnderrunColor, | ||
_IOMobileFramebufferSetVideoDACGain, _IOMobileFramebufferSetWSSInfo, | ||
_IOMobileFramebufferSetWhiteOnBlackMode, _IOMobileFramebufferSupportedFrameInfo, | ||
_IOMobileFramebufferSwapActiveRegion, _IOMobileFramebufferSwapBegin, _IOMobileFramebufferSwapCancel, | ||
_IOMobileFramebufferSwapDirtyRegion, _IOMobileFramebufferSwapEnd, | ||
_IOMobileFramebufferSwapSetBackgroundColor, _IOMobileFramebufferSwapSetColorMatrix, | ||
_IOMobileFramebufferSwapSetContributingImageSources, _IOMobileFramebufferSwapSetGammaTable, | ||
_IOMobileFramebufferSwapSetLayer, _IOMobileFramebufferSwapSetTimestamp, | ||
_IOMobileFramebufferSwapSetTimestamps, _IOMobileFramebufferSwapSetUISubRegion, | ||
_IOMobileFramebufferSwapSetVideoDestEdgeAlpha, _IOMobileFramebufferSwapSignal, | ||
_IOMobileFramebufferSwapSubtitleRegion, _IOMobileFramebufferSwapUIEdgeBlendMode, | ||
_IOMobileFramebufferSwapWait, _IOMobileFramebufferSwapWaitWithTimeout, | ||
_IOMobileFramebufferSwapWorkaroundSettings, _IOMobileFramebufferUnscheduleFromDispatchQueue, | ||
_IOMobileFramebufferWaitSurface, _kIOMFB_TotalSwaps, _kIOMFB_TotalVBLs, _main ] | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARCHS=arm64 | ||
TARGET=iphone:latest:9.0 | ||
|
||
include $(THEOS)/makefiles/common.mk | ||
|
||
TOOL_NAME = vncserverd | ||
vncserverd_FILES = $(wildcard ../vncforios/*.m) memory_limit.m | ||
vncserverd_FRAMEWORKS = IOMobileFramebuffer IOSurface IOKit | ||
vncserverd_CFLAGS = -I../include -Wno-deprecated-declarations | ||
vncserverd_LDFLAGS = -L../lib -F../privateframeworks -lssl -lcrypto -lvncserverstatic -ljpeg -lpng | ||
vncserverd_INSTALL_PATH=/usr/libexec/ | ||
vncserverd_CODESIGN_FLAGS = -S../entitlements.plist | ||
|
||
include $(THEOS_MAKE_PATH)/tool.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Package: com.ethanarbuckle.vncserverd | ||
Name: vncserverd | ||
Depends: | ||
Version: 0.0.1 | ||
Architecture: all | ||
Description: VNC server for iOS and tvOS (9.0+) | ||
Maintainer: Ethan Arbuckle | ||
Author: Ethan Arbuckle | ||
Section: System | ||
Tag: role::hacker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
chown root:wheel /Library/LaunchDaemons/com.ethanarbuckle.vncserverd.plist | ||
launchctl unload /Library/LaunchDaemons/com.ethanarbuckle.vncserverd.plist || true | ||
launchctl load /Library/LaunchDaemons/com.ethanarbuckle.vncserverd.plist || true |
23 changes: 23 additions & 0 deletions
23
vncserverd/layout/Library/LaunchDaemons/com.ethanarbuckle.vncserverd.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>/usr/libexec/vncserverd</string> | ||
</array> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>UserName</key> | ||
<string>root</string> | ||
<key>KeepAlive</key> | ||
<true/> | ||
<key>Label</key> | ||
<string>com.ethanarbuckle.vncserverd</string> | ||
<key>JetsamProperties</key> | ||
<dict> | ||
<key>JetsamPriority</key> | ||
<integer>18</integer> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
#define MEMORYSTATUS_CMD_SET_JETSAM_TASK_LIMIT 6 | ||
extern int memorystatus_control(int a, int b, int c, void *d, int e); | ||
|
||
static __attribute__((constructor)) void raise_memory_limit(void) { | ||
NSLog(@"vncserverd bumping memory limit"); | ||
if (memorystatus_control(MEMORYSTATUS_CMD_SET_JETSAM_TASK_LIMIT, getpid(), 100, NULL, 0) == -1) { | ||
NSLog(@"vncserverd failed to increase memory limit. Process will likely die"); | ||
} | ||
} |