Skip to content

Instantly share code, notes, and snippets.

View hicode002's full-sized avatar

Loik John hicode002

  • US
View GitHub Profile
@brainstorm
brainstorm / galaxy_partition_exploit.sh
Created July 20, 2025 02:35
Galaxy S4 bootloader exploit
% cat galaxy_partition_exploit.sh
#!/bin/bash
set -euo pipefail
DISK="jfleatt_emmc_dump.img" # Disk image to modify
SBL1_PART=3 # sbl1 partition number
SBL2_PART=4 # sbl2 partition number (GUID to invalidate)
INVALID_GUID="17171717-1717-1717-1717-171717171717"
HACK_GUID="11111111-2222-3333-4444-555555555555" # GUID for HACK
PAYLOAD_TMP="payload.bin"
@A2L5E0X1
A2L5E0X1 / kirin-aosp-helper.md
Last active June 17, 2025 02:53
Helpful Kirin AOSP development cheat sheet

Kirin AOSP helper

A helpful cheat sheet for people interested in Huawei Kirin AOSP development
This thing is WIP right now, so please have some patience, thank you!

Important things to know

  • You have to be aware of that all EMUI versions are pretty different in almost all things (kernel, blobs, partition table, dtbs, etc.). Huawei OTAs are also resizing the ptable, so because of that, for example, all EMUI 8 devices (launched or upgraded) got Treble support (In fact EMUI 5 had a vendor partition already but that was smaller than on EMUI 8).
  • Huawei likes to "backport" features which aren't even existing on AOSP yet, there are alot of good examples: vendor partition on EMUI 5 (on AOSP since Android 8.0), odm partition on EMUI 8/9 (on AOSP since Android 10), AVB2 with vbmeta partitions (disabled until EMUI 10) on EMUI 8 (on AOSP since Android 9), (pretty unrelate
@A2L5E0X1
A2L5E0X1 / unpack_dts.sh
Last active January 27, 2025 15:08
Unpack Huawei DTS.img
#!/bin/bash
#
# Copyright (C) 2022 A2L5E0X1
#
#
# Simple script for unpacking DTS.img from HUAWEI kirin devices
#
@echo off
cd "%~dp0"
echo "[*] Unlocked Bootloader, root, and CWM"
echo "[*] for the LG Spectrum 4G Windows version"
echo "[*] One click and CWM by PlayfulGod"
echo "[*] Exploit found by jcase"
echo "[*] Unlock method discovered by Neph,"
echo "[*] jcase, and death2all110"
echo "[*]"