Skip to content

Instantly share code, notes, and snippets.

View Dantee296's full-sized avatar

dantee296 Dantee296

View GitHub Profile
@Dantee296
Dantee296 / CMFWallpaper.m
Created October 9, 2019 13:04 — forked from camdenfullmer/CMFWallpaper.m
Set the wallpaper (lock and/or home screen) on iOS using Apple's private API. Please be aware that including this code in an App Store submission will result in a rejection. This has only been tested on iOS 9.2.
@implementation CMFWallpaper
+ (void)setImage:(UIImage *)image {
NSAssert([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized, @"access to photos is needed to set the wallpaper");
NSString *path;
#if TARGET_OS_SIMULATOR
path = @"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibrary.framework";
#else
path = @"/System/Library/PrivateFrameworks/PhotoLibrary.framework";
@Dantee296
Dantee296 / gist:a6a0990319211c7cb07144dfee901f3e
Created November 13, 2020 11:17 — forked from Blefish/gist:ecdbd21341f66a0a53095bd84bc2a1d0
Unofficial documentation for the iCloud Apple device image URL format
https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPhone/iPhone9,4-2-3-0/online-infobox__3x.png
A B C D E F G
A: deviceImages version seems to determine the format of the image specifier (C, D, E, F)
B: device marketing name
C: device model identifier
D: front color (DeviceColor)
E: back color (DeviceEnclosureColor) (missing on very old devices)
F: color (device cover/backing/housing)?? (missing on older devices)
G: image variant
@Dantee296
Dantee296 / AdbCommands
Created September 23, 2021 10:24 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@Dantee296
Dantee296 / ProductionBag
Created October 5, 2021 10:44 — forked from inC3ASE/ProductionBag
Library/Caches/com.apple.appstore
 streamtypedÅËÑ@ÑÑÑNSMutableDictionaryÑÑ NSDictionaryÑÑNSObjectÖÑiíÑÑÑNSStringïÑ+bagÜíÑÑÑ
NSMutableDataÑÑNSDataïñÇ÷Ñ [120342c]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>metrics</key>
<dict>
<key>metricsUrl</key><string>https://xp.apple.com/report</string>
<key>compoundSeparator</key><string>_</string>
<key>tokenSeparator</key><string>|</string>
@Dantee296
Dantee296 / jurpleConsole.c
Created June 22, 2022 10:13 — forked from dlevi309/jurpleConsole.c
jurpleConsole from newosxbook.com with an adjusted buffer size to work
#include <stdio.h>
#include <dlfcn.h>
#include <CoreFoundation/CoreFoundation.h>
// Barebones purple_console clone - constructed with some reverse and forward engineering.
//
// No copyright or license. Feel free to share. Comments/Feedback welcome @http://newosxbook.com/forum/
//
//
SUPERDUPER SERIAL
SUPERDUPER SERIAL:
LAST CHECKED WORKING IN VERSION 3.3.1
NAME: Serial_Box
SERIAL: SPSD001613-C55P-20F5-012L-XVSE-11E3
#!/bin/bash
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r'
}
GetAndroidVersion () {
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')}
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2
@Dantee296
Dantee296 / service_call_test.py
Created August 7, 2023 06:55 — forked from ktnr74/service_call_test.py
*update_transaction_codes.py* parses Android services source code to find out transaction codes and saves them in YAML format for later use. *transaction_codes.yaml* is an example of the resulting file. *service_call_test.py* shows how it can be used
#!/usr/bin/python
import os
import sys
import time
import yaml
import subprocess
import re
import struct
@Dantee296
Dantee296 / main.c
Created December 1, 2023 12:29 — forked from andrew-d/main.c
Example of how to get current binary's path using Apple's Code Signing Services
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <Security/Security.h>
// Compile with:
// gcc -o ourpath -framework CoreFoundation -framework Security main.c
@Dantee296
Dantee296 / code.mm
Created January 8, 2024 05:11 — forked from EthanArbuckle/code.mm
a gross way to use raw iokit events to detect pinch gestures
#import <UIKit/UIKit.h>
#include <IOKit/hid/IOHIDEventSystem.h>
#include <IOKit/hid/IOHIDEventSystemClient.h>
#include "CDTContextHostProvider.h"
#include <stdio.h>
#include <dlfcn.h>
UIView *contextView;
int IOHIDEventSystemClientSetMatching(IOHIDEventSystemClientRef client, CFDictionaryRef match);