Skip to content

Instantly share code, notes, and snippets.

@ktnr74
ktnr74 / adbclient.py
Last active March 20, 2022 00:32
Simple ADB client in python with some linux only specifics
#!/usr/bin/python
from __future__ import print_function
import os
import sys
import errno
import socket
import struct
import time
class ADBC(object):
@ktnr74
ktnr74 / touch_test.py
Last active September 21, 2022 11:46
touch event injection with sendevent
#!/usr/bin/python
import subprocess
import os
def adbshell(command, serial=None, adbpath='adb'):
args = [adbpath]
if serial is not None:
args.append('-s')
args.append(serial)
@ktnr74
ktnr74 / install_adb_platform_tools.sh
Last active December 3, 2016 16:12
Latest Android platform-tools installer for Ubuntu and Debian
#!/bin/bash
[ -f /etc/os-release ] && . /etc/os-release
[ "$ID" == "debian" ] || [ "$ID" == "ubuntu" ] || exit 1
[ "$HOSTTYPE" == "x86_64" ] && dpkg --add-architecture i386 2>/dev/null
apt-get -qqy update
apt-get -qqy install wget xml2 unzip
[ "$HOSTTYPE" == "x86_64" ] && apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
DESTDIR=${ANDROID_SDK_HOME:-$HOME/android}