View install_adb_platform_tools.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 | |
[ -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} |
View touch_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 subprocess | |
import os | |
def adbshell(command, serial=None, adbpath='adb'): | |
args = [adbpath] | |
if serial is not None: | |
args.append('-s') | |
args.append(serial) |
View adbclient.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 | |
from __future__ import print_function | |
import os | |
import sys | |
import errno | |
import socket | |
import struct | |
import time | |
class ADBC(object): |
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 |
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 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 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 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 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 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): |
OlderNewer