Skip to content

Instantly share code, notes, and snippets.

View khanhduytran0's full-sized avatar

Duy Tran Khanh khanhduytran0

View GitHub Profile

Booting iOS to other data volumes

Caution

By following this guide, you're responsible for any damage that could be done to your device. Be careful for any commands you're going to run.

Some parts are based on dualbootfun.

Tested iOS versions: 14.8 and 16.5

Prerequisites

  • iPhone/iPad running i(Pad)OS 16.7RC or earlier (anything below iOS 17 supporting TrollStore)
@khanhduytran0
khanhduytran0 / TransparentIsland.xm
Created February 9, 2024 01:52
Make Dynamic Island transparent with custom background color
#import <UIKit/UIKit.h>
// Make Dynamic Island transparent
@interface _SBGainMapView : UIView
@end
%hook _SBGainMapView
- (void)setFrame:(CGRect)frame {
%orig(frame);
self.hidden = YES;
@khanhduytran0
khanhduytran0 / ProcursusTSHelper.c
Last active January 13, 2024 14:25
ProcursusTSHelper.c
// fork() and rootless fix for Procursus bootstrap (named libTS2JailbreakEnv.dylib)
// there's lots of stuff not cleaned up, feel free to play around
// Requires fishhook from https://github.com/khanhduytran0/fishhook
// Usage: inject to libiosexec.dylib, ensure all binaries have get-task-allow entitlement
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <mach/mach_init.h>
#include <mach-o/dyld.h>
@khanhduytran0
khanhduytran0 / Pojav117AssetsPatcher.java
Last active March 30, 2022 13:59
Minecraft 1.17+ assets patcher for PojavLauncher.
/*
* These following steps are not currently automated, so you need to do manually for now.
* download assets-v0.zip at https://cdn.discordapp.com/attachments/724163890803638277/923349783589056522/assets-v0.zip
* extract and copy the shaders folder to the resources folder.
* edit include/light.glsl add `#define texture texture2D` after `#version 100` line
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
@khanhduytran0
khanhduytran0 / dlopen.cpp
Created August 23, 2020 00:10
Example of dlopening greylisted libraries or dlopening libraries with custom LD_LIBRARY_PATH. Android 5.0+
#include <dlfcn.h>
#include <cstring>
#include <android/dlext.h>
#include "log.h" // LOGE, LOGW, etc...
bool (*_android_init_namespaces)(const char* public_ns_sonames, const char* anon_ns_library_path) = nullptr;
bool __unused android_init_namespaces(const char* public_ns_sonames, const char* anon_ns_library_path) {
if (!_android_init_namespaces) {
void *libdl_handle;
@khanhduytran0
khanhduytran0 / GLSCommandFinder.java
Created June 22, 2020 03:54
gl-streaming command finder from command index
import java.util.*;
import java.io.*;
public class GLSCommandFinder
{
private static final String glsCmdHeaderPath = "/sdcard/AppProjects/gl-streaming/common/gls_command.h";
private static List<Integer> cmdlineList;
private static List<String> commandList;
public static void main(String[] args)
{