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 / 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
@ilhan-athn7
ilhan-athn7 / barcode_picture_remover.py
Created June 16, 2025 08:49
barcode_picture_remover
import os
import cv2
from pyzbar.pyzbar import decode
folder_path = 'path/to/your/folder'
if not os.path.isdir(folder_path):
print(f"Folder not found: {folder_path}")
exit(1)
@ilhan-athn7
ilhan-athn7 / archinstall_ubuntu_jammy.sh
Created March 3, 2024 11:22
Minimal ubuntu setup with kde-plasma desktop.
#!/bin/bash
#mkfs.ext4 /dev/nvme0n1p4
#mount /dev/nvme0n1p4 /mnt
debootstrap --variant=minbase \
--exclude="snapd,cloud-init,landscape-common,popularity-contest,ubuntu-advantage-tools,unattended-upgrades,netplan,networkd" \
jammy /mnt http://archive.ubuntu.com/ubuntu
echo ubuntu >/mnt/etc/hostname
echo 127.0.0.1 >>/mnt/etc/hosts
@ilhan-athn7
ilhan-athn7 / win10_ltsc.txt
Last active April 1, 2025 20:33
My Win LTSC setup and Notes
ISO download link : https://files.rg-adguard.net/file/19a36b7b-269b-ebf8-105b-a375f70b7ae2
ISO file name : en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso
ISO file MD5 : b5a7be560dbd73619945129e52be1b5f
### Installing drivers (driverpack.io)
### Activating windows (massgravel)
### Disabling visual effects (personalization)
@ilhan-athn7
ilhan-athn7 / pacman_packages.txt
Last active January 4, 2024 20:39
simple arch setup
base
base-devel
linux-zen
linux-zen-headers
linux-firware
sof-firware
git
nano
python
plasma-meta
@ilhan-athn7
ilhan-athn7 / chroot.sh
Created August 12, 2023 03:09
Single script to login chroot on android
#!/usr/bin/sh
# Execute from Termux app, running as root results no sound.
# Must have pulseaudio and termux-x11.
# Must have root access.
if [ "$(id -u)" -eq "$TERMUX_APP__UID" ]; then
### Start pulseaudio
pulseaudio --start --load=" \
module-native-protocol-tcp auth-ip-acl=127.0.0.1 \
auth-anonymous=1" --exit-idle-time=-1