This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AbortIfExecutableMissing () { | |
BIN=($@) | |
MISSINGBIN=$(for B in ${BIN[@]}; do [ "$(which $B 2>/dev/null)-" == "-" ] && echo $B; done) | |
if [ "${MISSINGBIN}-" != "-" ] | |
then | |
echo -e "Can't find the following executables: "$MISSINGBIN | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import time | |
import sys | |
from telnetlib import Telnet, IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA | |
from argparse import ArgumentParser | |
from crypt import crypt | |
class Nortel1535(Telnet): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#sudo apt-get install libxml2-utils | |
GetGoogleSourceFile () { | |
[ "-$1" == "-" ] && return 1 | |
curl -s --compressed -G -d "format=text" --url "$GOOGLE_SOURCE_URL/${3:-platform/frameworks/base}/${2:-+/master}/$1" | base64 -d | |
} | |
GetRepositoryXmlURL () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PORT=/dev/${1:-cuau0} | |
BAUD=${2:-9600} | |
# WTI RPS-10 Commands | |
ALL_DEVICES="*" | |
TOGGLE="T" | |
GET_STATE="?" | |
SWITCH_ON="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GOOGLE_SOURCE_URL="https://android.googlesource.com" | |
REPO="platform/prebuilts/maven_repo/android" | |
BRANCH="+/master" | |
PACKAGE="com/android/support/appcompat-v7" | |
XPATH="/metadata/versioning/versions/version/text()" | |
GetGoogleSourceFile () { | |
curl -s --compressed -G -d "format=text" --url "$4/$3/$2/$1" | base64 -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; Android WinUsb driver installation. | |
; | |
[Version] | |
Signature = "$Windows NT$" | |
Class = AndroidUsbDeviceClass | |
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128} | |
Provider = %ProviderName% | |
DriverVer = 08/28/2014,11.0.0000.00000 | |
CatalogFile.NTx86 = androidwinusb86.cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
import os | |
import sys | |
import errno | |
import socket | |
import struct | |
import time | |
class ADBC(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# do not forget to run 'sudo udevadm control --reload-rules' after editing this file | |
ACTION!="add", GOTO="android_usb_rules_end" | |
SUBSYSTEM!="usb", GOTO="android_usb_rules_end" | |
ENV{DEVTYPE}!="usb_device", GOTO="android_usb_rules_end" | |
ENV{ID_SERIAL_SHORT}=="", GOTO="android_empty_serial" | |
ENV{ID_SERIAL_SHORT}=="0000:*", GOTO="android_empty_serial" | |
ENV{ID_SERIAL_SHORT}=="0123456789ABCDEF", GOTO="android_empty_serial" |
OlderNewer