On Sat, May 7, 2022, 3:01 AM Undiscussed Horrific Abuse, One Victim of Many <[1]gmkarl@gmail.com> wrote: I'm not near this system and phone at this time, but that doesn't mean I can't keep learning about it. Here's the deployment script for the bootrom phase from the amonet kamakiri source: #!/usr/bin/env python3 import sys import time from common import Device from logger import log from load_payload import load_payload from functions import * import usb.core import usb.util import ctypes import traceback import struct import os def main(dev): load_payload(dev) This uses a hack to get the 0xf00dd00d payload running on the device, roughly by uploading the stages and jumping to their addresses. The first stage involves some register and usb twiddling, and is size-limited; it may be an exploit, unsure. if len(sys.argv) == 2 and sys.argv[1] == "fixgpt": dev.emmc_switch(0) log("Flashing GPT") flash_binary(dev, "../bin/gpt-mantis.bin", 0, 34 * 0x200) This likely replaces the partition table if requested. I don't see the gpt-mantis.bin file in the repository yet. That size of 0x34 x 0x200 ... I've seen that before I think? # 1) Sanity check GPT log("Check GPT") switch_user(dev) This switches the device to partition 0 and verifies two expected bytes in that partition. # 1.1) Parse gpt gpt = parse_gpt(dev) def parse_gpt(dev): data = dev.emmc_read(0x400 // 0x200) + dev.emmc_read(0x600 // 0x200) + dev.emmc_read(0x800 // 0x200) + dev.emmc_read(0xA00 // 0x200) num = len(data) // 0x80 parts = dict() for x in range(num): part = data[x * 0x80:(x + 1) * 0x80] part_name = part[0x38:].decode("utf-16le").rstrip("\x00") part_start = struct.unpack("