Skip to content

Instantly share code, notes, and snippets.

@khanhduytran0
khanhduytran0 / mount_args.h
Created February 18, 2025 01:51
Boot tvOS on compatible iDevices (WIP)
#ifndef _MOUNT_ARGS_H
#define _MOUNT_ARGS_H
#include <stdint.h>
#include <sys/time.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
enum {
@available(iOS 15.0, *)
public struct RichTextEditor : SwiftUICore.View {
public init(text: SwiftUICore.Binding<Foundation.AttributedString>)
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
get
}
@available(iOS 15.0, *)
public typealias Body = @_opaqueReturnTypeOf("$s7SwiftUI14RichTextEditorV4bodyQrvp", 0) __
}
@available(*, unavailable)
@donato-fiore
donato-fiore / Tweak.x
Last active June 13, 2025 22:36
Allow ControlCenter modules to load when running in a simulator.
#import <Foundation/Foundation.h>
@interface NSObject (Private)
- (id)safeValueForKey:(NSString *)key;
@end
@interface NSArray (BaseBoard)
- (id)bs_mapNoNulls:(id (^)(id))arg1;
- (id)bs_flatten;
- (id)bs_filter:(BOOL (^)(id))arg1;
@justtryingthingsout
justtryingthingsout / accp-h16g-core-sysregs.txt
Created January 8, 2025 12:33
some SysRegs may be missing, but this should be the majority
S3_3_c4_c5_0 at min EL0: DSPSR
S3_3_c4_c5_1 at min EL0: DLR
S3_6_c4_c0_0 at min EL3: SPSR_EL3
S3_6_c4_c0_1 at min EL3: ELR_EL3
S3_1_c0_c0_0 at min EL1: CCSIDR_EL1
S3_6_c1_c0_0 at min EL3: SCTLR_EL3
S3_6_c1_c0_1 at min EL3: ACTLR_EL3
S3_6_c1_c1_2 at min EL3: CPTR_EL3
S3_6_c1_c1_0 at min EL3: SCR_EL3
S3_6_c1_c3_1 at min EL3: MDCR_EL3
@EthanArbuckle
EthanArbuckle / main.m
Created October 28, 2024 01:27
objc object search
#import <objc/runtime.h>
#import <mach/mach.h>
#import <malloc/malloc.h>
#import <dlfcn.h>
typedef struct {
Class targetClass;
void (^block)(id object, BOOL isSubclass, BOOL *stop);
dispatch_semaphore_t semaphore;
BOOL shouldStop;
@EthanArbuckle
EthanArbuckle / cli-gui.m
Last active July 8, 2025 20:08
drawing a UIWindow from an iOS cli tool
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <objc/message.h>
#import <dlfcn.h>
__attribute__((constructor)) static void init(void) {
Method bundleIdentifierMethod = class_getInstanceMethod(objc_getClass("NSBundle"), sel_registerName("bundleIdentifier"));
IMP newImp = imp_implementationWithBlock(^(id self) {
@miticollo
miticollo / build_frida.sh
Last active December 10, 2025 08:12
How to build frida-server (≥ 16.2.2) for iOS jailbroken devices
#!/usr/bin/env bash
#
# Build Frida DEB.
# register the cleanup function to be called on the EXIT signal
trap cleanup INT
#######################################
# Deletes the temp directory.
# Globals:
@Lessica
Lessica / TaskProcess+ObjC.swift
Last active September 27, 2024 00:01
Customized posix_spawn/NSTask/Process implementation in Swift/ObjC with a single file.
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016, 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
// Original version:
@PoomSmart
PoomSmart / YouTubeDefaultVideoQuality.x
Last active October 23, 2025 12:56
Sets the default video quality for videos on iOS YouTube.
#import <YouTubeHeader/MLAVPlayer.h>
#import <YouTubeHeader/MLHAMPlayerItem.h>
#import <YouTubeHeader/MLQuickMenuVideoQualitySettingFormatConstraint.h>
int targetResolution = 1440;
int targetFPS = 60;
static NSString *getClosestQualityLabel(NSArray <MLFormat *> *formats) {
int minDiff = INT_MAX;
NSString *closestQualityLabel;
@donato-fiore
donato-fiore / PSListController+JSON.h
Last active November 29, 2025 02:28
PSListController extension to load JSON files.
#include <Preferences/PSListController.h>
@interface PSListController (JSON)
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target;
- (NSMutableArray *)loadSpecifiersFromJSONName:(NSString *)name target:(PSListController *)target bundle:(NSBundle *)bundle;
@end