Skip to content

Instantly share code, notes, and snippets.

View schmittsfn's full-sized avatar
🔁
programming / learning ∞ rinse repeat

Stefan schmittsfn

🔁
programming / learning ∞ rinse repeat
View GitHub Profile
@schmittsfn
schmittsfn / IOMobileFramebuffer.h
Created March 21, 2017 14:16 — forked from anthonya1999/IOMobileFramebuffer.h
A recent disassembly of IOMobileFramebuffer framework
/* It is recommended to use dlopen & dlsym to call these functions, and use this header as a reference.
Example:
void *IOMobileFramebuffer = dlopen("/System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer", RTLD_LAZY);
IOMobileFramebufferReturn (*IOMobileFramebufferGetMainDisplay)(IOMobileFramebufferRef *pointer) = dlsym(IOMobileFramebuffer, "IOMobileFramebufferGetMainDisplay");
dlclose(IOMobileFramebuffer); */
/* You may have to include your IOSurface header to compile, because of the IOMobileFramebufferGetLayerDefaultSurface function. If you do not have it, you may just uncomment the typedef to an IOSurface below. */
#include <stdio.h>
#include <sys/mman.h>
#include <mach/mach.h>