Skip to content

Instantly share code, notes, and snippets.

@5ec1cff
5ec1cff / CorePatchDetector.kt
Created August 3, 2023 15:31
CorePatch detector
package io.github.a13e300.demo.maho
import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.PackageInstaller
import android.content.pm.PackageInstaller.EXTRA_STATUS
import android.content.pm.PackageInstaller.STATUS_PENDING_USER_ACTION
@5ec1cff
5ec1cff / jdwp.py
Last active November 21, 2023 15:28
ptrace inject source code of pwn-tv
#!/usr/bin/python
################################################################################
#
# Universal JDWP shellifier
#
# @_hugsy_
#
# And special cheers to @lanjelot
# https://github.com/IOActive/jdwp-shellifier/blob/e82ec26193861ba58179aae7f3fa93654b7abc8a/jdwp-shellifier.py
@5ec1cff
5ec1cff / bootloader_miui.java
Created November 22, 2023 15:29 — forked from sopanatx/bootloader_miui.java
Xiaomi Bootloader Bind API
package com.android.settings.bootloader;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import com.android.settings.AESUtil;
import com.android.settings.bootloader.Utils;
@5ec1cff
5ec1cff / find_zip_entry.cpp
Created April 16, 2024 16:15
Find zip entry by offset
#include <cstdio>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <cstring>
#include <cerrno>
#include <string>
#include <utility>
@5ec1cff
5ec1cff / cmd_wrapper.c
Created January 11, 2025 02:23
cmd_wrapper
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <signal.h>
@5ec1cff
5ec1cff / buildcleaner.py
Created June 12, 2025 06:36
Build Cleaner
import os
import shutil
from pathlib import Path
from traceback import print_exc
def rmall(p: Path):
print('removing', p)
try:
if os.path.isdir(p):
shutil.rmtree(p)
@5ec1cff
5ec1cff / README.md
Created August 20, 2025 13:36
My mpv scripts
@5ec1cff
5ec1cff / android-bootimg.hexpat
Last active May 30, 2026 15:12
Imhex pattern for android boot image
#pragma description Android Boot image
#pragma magic [ 41 4e 44 52 4f 49 44 21 ] @ 0x00
#pragma magic [ 56 4e 44 52 42 4f 4f 54 ] @ 0x00
#pragma endian little
using uint8_t = u8;
using uint32_t = u32;
using uint64_t = u64;
import std.mem;