Skip to content

Instantly share code, notes, and snippets.

@skrimix
skrimix / pixel_kernelsu_patch.sh
Last active March 23, 2024 07:52
boot.img repack script for KernelSU. Supports extracting boot.img from factory and OTA images
#!/bin/bash
set -e
# This script creates a patched boot.img with KernelSU GKI kernel and cmdline tweaks
SCRIPT_PATH="$(dirname "$(realpath -s "$0")")"
MAGISKBOOT="$SCRIPT_PATH"/magiskboot
MAGISK_VER="v26.1" # used for downloading magiskboot, newer versions print "unexpected ASN.1 DER tag: expected SEQUENCE, got APPLICATION [1] (primitive)" warning(?)
ANYKERNEL_FILE_NAME="CHANGE_ME" # for downloading from the latest KernelSU github release, e.g. "AnyKernel3-android13-5.10.157_2023-03.zip"
@echo off
:Start
setlocal DisableDelayedExpansion
::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
set "n=1>NUL 2>NUL"
title HFP's Redist Installer 3.0
color 1b
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index 4732b62..474906c 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -4507,6 +4507,24 @@ public class OpenVRInterop
internal static extern bool IsInterfaceVersionValid([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion);
[DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", CallingConvention = CallingConvention.Cdecl)]
internal static extern uint GetInitToken();
+ [DllImportAttribute("openvr_api", EntryPoint = "LiquidVR", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern IntPtr LiquidVR();
@skrimix
skrimix / realtek_audio_delay_fix.ps1
Last active April 3, 2021 12:14
Lowers audio delay/pop on some laptops with Realtek audio by disabling inactivity timer for audio outputs
Get-ChildItem -path "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}" -ErrorAction SilentlyContinue | ForEach-Object {
$key = $_
if (($Key.GetValueNames() | % { $Key.GetValue($_) }) -match "Realtek High Definition Audio")
{
"Fixing output " + $key.Name
$power_subkey_path = $key.Name + "\PowerSettings"
[microsoft.win32.registry]::SetValue($power_subkey_path, "ConservationIdleTime", [byte[]](0xFF,0xFF,0xFF, 0xFF))
[microsoft.win32.registry]::SetValue($power_subkey_path, "IdlePowerState", [byte[]](0x00,0x00,0x00, 0x00))
[microsoft.win32.registry]::SetValue($power_subkey_path, "PerformanceIdleTime", [byte[]](0xFF,0xFF,0xFF, 0xFF))
}