Skip to content

Instantly share code, notes, and snippets.

View shinyquagsire23's full-sized avatar
💭
Messing with Apple Vision

Max Thomas shinyquagsire23

💭
Messing with Apple Vision
View GitHub Profile
@shinyquagsire23
shinyquagsire23 / lg_switch_inputs.py
Last active May 20, 2024 11:46
LG DDC/CI control via python hidapi
import struct
import time
import hid
import sys
import argparse
#
# Constants
#
@shinyquagsire23
shinyquagsire23 / Linux_building.txt
Last active February 15, 2025 12:51
Monado macOS and Linux Quest Link Build Guide
#
# Installing dependencies (Tested on Ubuntu 22.04 LTS)
#
# Monado
sudo apt install cmake ninja-build
sudo apt install build-essential git wget unzip cmake ninja-build libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libbsd-dev
# XRSP (Quest Link USB)
sudo apt install capnproto libcapnp-dev libx264-dev nlohmann-json3-dev
@shinyquagsire23
shinyquagsire23 / openxr-sdk-loader-macos.patch
Created November 26, 2022 06:39
OpenXR-SDK macOS loader Patches
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3da42ae..2f54680 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -410,7 +410,7 @@ if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAG}")
endif()
endforeach()
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+ #set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
@shinyquagsire23
shinyquagsire23 / gist:824d4e6b08379f3b537fa703d2b1874a
Created October 26, 2022 01:46
Pixel Watch - Dump boot_a/boot_b from fastboot using sha1sum and ramdump memes
# Dump partitions from the Pixel Watch's fastboot using `oem sha1sum`
# and `oem ramdump` memes.
#
# Currently the first 8 bytes aren't bruteforced, but they ~can be.
# Doesn't really matter though because the first 8 bytes is the "ANDROID!" magic
# for boot partitions.
import os
import sys
import subprocess
import hashlib
@shinyquagsire23
shinyquagsire23 / gist:e6952335aa9c9efd7dcaec5e7296111b
Created October 20, 2022 19:55
Pixel Watch fastboot getvar all
(bootloader) battery-soc:39%
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:3779 mV
(bootloader) enter-reason:reboot bootloader
(bootloader) erase-block-size:0x1000
(bootloader) hw-revision:MP1.1
(bootloader) is-logical:pad1:no
(bootloader) is-logical:vbmeta:no
(bootloader) is-logical:vbmeta_system:no
(bootloader) is-logical:vbmeta_vendor:no
@shinyquagsire23
shinyquagsire23 / hid_raw.txt
Created October 2, 2022 17:44
Stadia Controller lsusb -v and HID descs
18D1 9400: Google LLC - Stadia Controller rev. A
DESCRIPTOR:
05 01 09 05 a1 01 85 03 05 01 75 04 95 01 25 07
46 3b 01 65 14 09 39 81 42 45 00 65 00 75 01 95
04 81 01 05 09 15 00 25 01 75 01 95 0f 09 12 09
11 09 14 09 13 09 0d 09 0c 09 0b 09 0f 09 0e 09
08 09 07 09 05 09 04 09 02 09 01 81 02 75 01 95
01 81 01 05 01 15 01 26 ff 00 09 01 a1 00 09 30
09 31 75 08 95 02 81 02 c0 09 01 a1 00 09 32 09
35 75 08 95 02 81 02 c0 05 02 75 08 95 02 15 00
# Requires pyusb
import usb.core
import usb.util
import struct
import time
# Requires doing something like this before running, otherwise Linux kernel has control of the drive
# echo 1-1:1.0 > /sys/bus/usb/drivers/usb-storage/unbind
# find our device
@shinyquagsire23
shinyquagsire23 / gist:7e9a8b5f4cbb6ca79fb0de1b54bd2bfb
Last active March 30, 2022 02:57
Spam "MooBot Mirai DDoS" with the bee movie script
# run `ulimit -n 94000` or it'll run out of socket fd's
# grab your bee movie script from
# https://gist.githubusercontent.com/ElliotGluck/64b0b814293c09999f765e265aaa2ba1/raw/79f24f9f87654d7ec7c2f6ba83e927852cdbf9a5/gistfile1.txt
# and save as `beemovie.txt`
import time
import threading
import socket
import struct
connections = 0
@shinyquagsire23
shinyquagsire23 / b3d_decompress.c
Created September 25, 2021 01:01
TPM B3D Map Decompression
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
typedef struct file_struct
{
FILE* real_fhand;
int is_compressed;
int seek_pos_maybe;
@shinyquagsire23
shinyquagsire23 / gist:d4977e0ad9ea2cd2e9840641ba53fb7a
Last active September 22, 2022 07:17
NDS IPC Reverse Engineering
FIFO Message Header:
--------------------
dddddddddddddddddddddddddd f ttttt
Tag (lower 5 bits, mask 0x1F)
Error (bit5, mask 0x20)
Data (Upper 26 bits, mask 0xFFFFFFC0)
FIFO Data Packing (26 bits):
--------------------