Skip to content

Instantly share code, notes, and snippets.

View edwin170's full-sized avatar

Edwin edwin170

  • Dominican Republic
View GitHub Profile
@EthanArbuckle
EthanArbuckle / main.m
Created January 8, 2025 23:22
set and catch breakpoints
//
// main.m
// breakpoints
//
// Created by @objc on 5/01/23.
//
#import <Foundation/Foundation.h>
#include <mach/mach.h>
#include <pthread.h>
@iarchiveml
iarchiveml / resize_apfs.c
Last active May 10, 2023 17:54
Resize an APFS container on an iOS device
// clang -o resize_apfs -Wall -Wextra -Wpedantic -Werror -Wl,-U,_mh_execute_header,-e,_main -Xlinker APFS.tbd resize_apfs.c
// Tested on iOS 10 and 15, won't work on iOS 12
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
typedef int (*apfs_resize_container_t)(const char *, unsigned long long);
typedef const char *(*apfs_get_error_string_t)(int);
int main(int argc, char *argv[]) {