Skip to content

Instantly share code, notes, and snippets.

@opa334
opa334 / pplrw.m
Last active January 9, 2024 10:20
PPLRW on iOS < 16.6 (Needs mapping primitive) (Credits: Operation Triangulation by @oct0xor, @bzvr_, @kucher1n)
//
// pplrw.m
// kfd
//
// Created by Lars Fröder on 29.12.23.
//
#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <mach-o/dyld.h>
@opa334
opa334 / jit.c
Last active April 20, 2023 16:21
JIT on Dopamine Jailbreak
bool dopamineGetJIT(void) {
int64_t (*jbdswDebugMe)(void) = dlsym(RTLD_DEFAULT, "jbdswDebugMe");
if (jbdswDebugMe) {
int64_t debugRet = jbdswDebugMe();
return debugRet == 0;
}
return false;
}
@opa334
opa334 / rootless.h
Last active May 22, 2023 02:17
Macros to support rootless jailbreaks in your packages
#import <Foundation/Foundation.h>
#include <unistd.h>
// Use for NSString literals or variables
#define ROOT_PATH_NS(path)([[NSFileManager defaultManager] fileExistsAtPath:path] ? path : [@"/var/jb" stringByAppendingPathComponent:path])
// Use for C string literals
#define ROOT_PATH_C(cPath) (access(cPath, F_OK) == 0) ? cPath : "/var/jb" cPath
// Use for C string variables
@opa334
opa334 / trollstore-device-support.md
Last active March 17, 2023 05:16
Adding device support to TrollStore Installer
@protocol CCSModuleProvider
@required
- (NSUInteger)numberOfProvidedModules;
- (NSString*)identifierForModuleAtIndex:(NSUInteger)index;
- (id)moduleInstanceForModuleIdentifier:(NSString*)identifier;
- (NSString*)displayNameForModuleIdentifier:(NSString*)identifier;
@optional
- (NSSet*)supportedDeviceFamiliesForModuleWithIdentifier:(NSString*)identifier;
- (NSSet*)requiredDeviceCapabilitiesForModuleWithIdentifier:(NSString*)identifier;