View rps10_cmd.sh
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" |
View 99-android.rules
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" |
View get_support_package_source.sh
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 |
View provision-lg1535.py
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): |
View service_call_test.py
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 os | |
import sys | |
import time | |
import yaml | |
import subprocess | |
import re | |
import struct |
View cron-daily-adb-update
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 () { |
View adb_helpers.sh
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; } |
View android_winusb.inf
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 |
View get_android_service_call_numbers.sh
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 | |
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r' | |
} | |
GetAndroidVersion () { | |
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \ | |
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0") | |
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')} | |
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2 |
View install_adb.sh
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 |
NewerOlder