Skip to content

Instantly share code, notes, and snippets.

@abdullahdhiab
abdullahdhiab / reclaimWindows10.ps1
Created December 13, 2018 15:48 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@abdullahdhiab
abdullahdhiab / adb_helpers.sh
Created December 9, 2018 19:56 — forked from ktnr74/adb_helpers.sh
more adb helper functions for bash
#!/bin/bash
ListAndroidSYSFS () { find -L /sys/bus/usb/devices -maxdepth 2 -path "*/modalias" -printf "%h\t" -exec cat {} \; | awk -F: '/icFFisc42ip0/ {print $1}'; }
ListAndroidSYSFSderef () { ListAndroidSYSFS | xargs -i readlink -f {}; }
ListAndroidSerials () { ListAndroidSYSFS | xargs -i cat {}/serial; }
ListAndroidVendorIDs () { ListAndroidSYSFS | xargs -i cat {}/idVendor | awk '{printf "0x%s\n", $1}' | sort -u; }
ListAndroidUSBDevices () { ListAndroidSYSFS | xargs -i cat {}/busnum {}/devnum | awk '{printf "/%03d", $1}' | sed -e 's#.\{8\}#/dev/bus/usb&\n#g'; }
ADBShell () { adb ${2+-s} $2 shell "$1" | tr -d '\r'; }
ADBExec () { adb ${2+-s} $2 exec-out "$1"; }
ADBServicePackageName () { ADBShell "service list" $2 | sed 's/^[0-9]\{1,3\}\t\([^:]*\): \[\([^]]*\)\].*/\1 \2/' | awk '/^'$1' / {print $2}' | head -n 1; }
@abdullahdhiab
abdullahdhiab / service_call_test.py
Created December 9, 2018 19:53 — forked from ktnr74/service_call_test.py
*update_transaction_codes.py* parses Android services source code to find out transaction codes and saves them in YAML format for later use. *transaction_codes.yaml* is an example of the resulting file. *service_call_test.py* shows how it can be used
#!/usr/bin/python
import os
import sys
import time
import yaml
import subprocess
import re
import struct