Skip to content

Instantly share code, notes, and snippets.

View ilhan-athn7's full-sized avatar
🪟
Windows is only operating system that would give you blue screen of death

İlhan Atahan ilhan-athn7

🪟
Windows is only operating system that would give you blue screen of death
View GitHub Profile
@ilhan-athn7
ilhan-athn7 / scorm_player_cheat_codes.js
Last active September 25, 2026 15:03
Scorm Player Dirty Cheat Codes
// Forcefully play video content at 20x, even if platform inherently sets playback speed to 2x.
setInterval(() => {
const video = document.querySelector('video');
video.playbackRate = 20;
}, 1);
// Automate loading next content without compromising progress bar
@ilhan-athn7
ilhan-athn7 / amd_usb_fix.reg
Last active September 10, 2026 07:51
To fix fastboot on amd laptops
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "osvc" /t REG_BINARY /d "0000" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "SkipContainerIdQuery" /t REG_BINARY /d "01000000" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "SkipBOSDescriptorQuery" /t REG_BINARY /d "01000000" /f
@ilhan-athn7
ilhan-athn7 / file_info.sh
Created August 15, 2026 18:45
Magisk set_perm style file attribute fetch tool
file_info() {
local f="$1"
if [ -z "$f" ] || [ ! -e "$f" ]; then
echo "$1" "Usage: file_info <path>"
return 1
fi
local uid gid perm ctx
uid=$(stat -c '%u' "$f")
gid=$(stat -c '%g' "$f")
@ilhan-athn7
ilhan-athn7 / fakeprops.sh
Created July 31, 2026 04:07
Hide USB debugging
#!/bin/sh
resetprop -w sys.boot_completed 0
hide_usb_debug() {
while true; do
resetprop -w init.svc.adbd stopped
resetprop init.svc.adbd stopped
resetprop init.svc_debug_pid.adbd ""
resetprop -d ro.boottime.adbd
resetprop -c
@ilhan-athn7
ilhan-athn7 / meminfo.sh
Created June 28, 2026 06:42
Get memory usage of processes on android in a viable way
dumpsys meminfo | grep '(pid' | sed 's/,//g' | sed 's/ //g' | sort -h
@ilhan-athn7
ilhan-athn7 / allow_perm
Created June 4, 2026 18:54
Allow all permissions of android app
su -c "for perm in \$(dumpsys package com.example.app | grep 'android.permission' | awk '{print \$1}' | sort -u); do pm grant com.example.app \$perm; done" 2>/dev/null
@ilhan-athn7
ilhan-athn7 / system_image_rw_convert.py
Created December 1, 2025 10:58
Convert write-protected android partitions to RW equivalent
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#====================================================
# FILE: sdat2img.py
# AUTHORS: xpirt - luxi78 - howellzhu
# DATE: 2018-10-27 10:33:21 CEST
#====================================================
from __future__ import print_function
import sys, os, errno
@ilhan-athn7
ilhan-athn7 / mount.sh
Created December 1, 2025 10:56
Mount android partitions independently to desired path (thanks to reiryuki )
get_device() {
PAR="$1"
DEV="`cat /proc/self/mountinfo | awk '{ if ( $5 == "'$PAR'" ) print $3 }' | head -1 | sed 's/:/ /g'`"
}
mount_mirror() {
SRC="$1"
DES="$2"
RAN="`head -c6 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9'`"
while [ -e /dev/$RAN ]; do
@ilhan-athn7
ilhan-athn7 / usb_gadget.sh
Created December 1, 2025 10:54
USB Gadget for Android
# This part is likely not needed
# mkdir -p /config/usb_gadget/g1
# mkdir -p /config/usb_gadget/g1/functions/mass_storage.0
# echo 0x1d6b > /config/usb_gadget/g1/idVendor # Linux Foundation
# echo 0x0104 > /config/usb_gadget/g1/idProduct # Mass Storage
# echo 0x0100 > /config/usb_gadget/g1/bcdDevice
# echo 0x0200 > /config/usb_gadget/g1/bcdUSB
#mkdir -p /config/usb_gadget/g1/strings/0x409
#echo "1234567890" > /config/usb_gadget/g1/strings/0x409/serialnumber
@ilhan-athn7
ilhan-athn7 / termux_shell
Created November 26, 2025 11:24
Run termux shell inside adb shell
PATH=/data/data/com.termux/files/usr/bin LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so HOME=/data/data/com.termux/files/home /data/data/com.termux/files/usr/bin/bash -l