diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-adb.bash-completion android-tools-4.2.2+git20130529/debian/android-tools-adb.bash-completion --- android-tools-4.2.2+git20130529/debian/android-tools-adb.bash-completion 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-adb.bash-completion 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1 @@ +debian/bash_completion.d/adb adb diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-adbd.install android-tools-4.2.2+git20130529/debian/android-tools-adbd.install --- android-tools-4.2.2+git20130529/debian/android-tools-adbd.install 2013-06-18 22:00:28.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-adbd.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -builddir/adbd/adbd usr/sbin/ diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-adbd.upstart android-tools-4.2.2+git20130529/debian/android-tools-adbd.upstart --- android-tools-4.2.2+git20130529/debian/android-tools-adbd.upstart 2013-06-19 14:29:59.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-adbd.upstart 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -# adbd - run adb debugging shell -# -# This task enables the adb shell - -description "start adbd" - -start on filesystem or runlevel [2345] -stop on runlevel [!2345] - -pre-start script - [ ! -d /sys/class/android_usb ] && { stop; exit 0; } - echo 0 >/sys/class/android_usb/android0/enable - echo 18d1 >/sys/class/android_usb/android0/idVendor - echo d002 >/sys/class/android_usb/android0/idProduct - echo adb >/sys/class/android_usb/android0/functions - echo 1 >/sys/class/android_usb/android0/enable -end script - -# ro.secure=0 allows running as root; alternatively you may set -# ro.debuggable=1 and service.adb.root=1 -env APROP_ro_secure=0 - -# set persist.adb.trace_mask=0xfff (restart android-tools-adbd -# APROP_persist_adb_trace_mask=0xfff) to get a debug log under /data/adb/ - -exec /usr/sbin/adbd diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-adb.postinst android-tools-4.2.2+git20130529/debian/android-tools-adb.postinst --- android-tools-4.2.2+git20130529/debian/android-tools-adb.postinst 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-adb.postinst 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,43 @@ +#!/bin/sh +# postinst script for android-tools-adb +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + # create adb group if not already present + if ! getent group adb > /dev/null; then + addgroup --quiet --system adb + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-adb.udev android-tools-4.2.2+git20130529/debian/android-tools-adb.udev --- android-tools-4.2.2+git20130529/debian/android-tools-adb.udev 2013-05-29 15:11:12.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-adb.udev 2014-11-24 20:27:47.000000000 +0000 @@ -1,7 +1,416 @@ -# Set ACLs for console users on adb USB devices -# d001 recovery -# d002 system - -ACTION=="add|change", SUBSYSTEM=="usb", \ - ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d001|d002", \ - TAG+="uaccess" +# Skip this section below if this device is not connected by USB +SUBSYSTEM!="usb", GOTO="android_usb_rules_end" + +LABEL="android_usb_rules_begin" +# Devices listed here in android_usb_rules_{begin...end} are connected by USB +# Acer +ATTR{idVendor}!="0502", GOTO="not_Acer" +ENV{adb_user}="yes" +# Iconia Tab A1-830 +ATTR{idProduct}=="3604", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Iconia Tab A500 +ATTR{idProduct}=="3325", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Liquid +ATTR{idProduct}=="3202" +ATTR{idProduct}=="3203", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_Acer" + +# ADVANCE +ATTR{idVendor}=="0a5c", ENV{adb_user}="yes" +# S5 +ATTR{idVendor}=="0a5c", ATTR{idProduct}=="e681", SYMLINK+="android_adb" + +# Archos +ATTR{idVendor}!="0e79", GOTO="not_Archos" +ENV{adb_user}="yes" +# 43 +ATTR{idProduct}=="1417", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# 101 +ATTR{idProduct}=="1411", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# 101 xs +ATTR{idProduct}=="1549", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Archos" + +# Asus +ATTR{idVendor}=="0b05", ENV{adb_user}="yes" +# Zenphone 5 +ATTR{idProduct}=="4daf", SYMLINK+="android_adb", SYMLINK+="android_fastboot" + +# Azpen Onda +ATTR{idVendor}=="1f3a", ENV{adb_user}="yes" + +# Dell +ATTR{idVendor}=="413c", ENV{adb_user}="yes" + +# Foxconn +ATTR{idVendor}=="0489", ENV{adb_user}="yes" +# Commtiva Z71, Geeksphone One +ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", SYMLINK+="android_adb" + +# Fujitsu/Fujitsu Toshiba +ATTR{idVendor}=="04c5", ENV{adb_user}="yes" + +# Fuzhou Rockchip Electronics +ATTR{idVendor}=="2207", ENV{adb_user}="yes" +# Mediacom Smartpad 715i +ATTR{idVendor}=="2207", ATTR{idProduct}=="0000", SYMLINK+="android_adb" +# Ubislate 7Ci +ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", SYMLINK+="android_adb" + +# Garmin-Asus +ATTR{idVendor}=="091e", ENV{adb_user}="yes" + +# Google +ATTR{idVendor}!="18d1", GOTO="not_Google" +ENV{adb_user}="yes" +# Nexus 4, Nexus 7 2013 +ATTR{idProduct}=="4ee2", SYMLINK+="android_adb" +ATTR{idProduct}=="4ee0", SYMLINK+="android_fastboot" +# Nexus 7 +ATTR{idProduct}=="4e42", SYMLINK+="android_adb" +ATTR{idProduct}=="4e40", SYMLINK+="android_fastboot" +# Nexus 5, Nexus 10 +ATTR{idProduct}=="4ee1", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Nexus S +ATTR{idProduct}=="4e21" +ATTR{idProduct}=="4e22", SYMLINK+="android_adb" +ATTR{idProduct}=="4e20", SYMLINK+="android_fastboot" +# Galaxy Nexus +ATTR{idProduct}=="4e30", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Nexus One +ATTR{idProduct}=="4e11" +ATTR{idProduct}=="4e12", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Generic and unspecified debug interface +ATTR{idProduct}=="d00d", SYMLINK+="android_fastboot" +# Include: Samsung Galaxy Nexus (GSM) +ATTR{idProduct}=="4e30", SYMLINK+="android_fastboot" +# Recovery adb entry for Nexus Family +ATTR{idProduct}=="d001", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_Google" + +# Haier +ATTR{idVendor}=="201e", ENV{adb_user}="yes" + +# Hisense +ATTR{idVendor}=="109b", ENV{adb_user}="yes" + +# HTC +ATTR{idVendor}!="0bb4", GOTO="not_HTC" +ENV{adb_user}="yes" +# ChaCha +ATTR{idProduct}=="0cb2", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Desire (Bravo) +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c87", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Desire HD +ATTR{idProduct}=="0ca2", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Desire S (Saga) +ATTR{idProduct}=="0cab", SYMLINK+="android_adb" +# Desire Z +ATTR{idProduct}=="0c91", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Evo Shift +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0ca5", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# G1 +ATTR{idProduct}=="0c01", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# HD2 +ATTR{idProduct}=="0c02", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Hero H2000 +ATTR{idProduct}=="0001", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Hero (GSM), Desire +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c99", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Hero (CDMA) +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c9a", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Incredible +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c9e", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Incredible rev 0002 +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c8d", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# MyTouch 4G +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c96", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# One (m7) +ATTR{idProduct}=="0c93" +ATTR{idProduct}=="0f87", SYMLINK+="android_adb" +ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot" +# Slide +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0e03", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Tatoo, Dream, ADP1, G1, Magic +ATTR{idProduct}=="0c01" +ATTR{idProduct}=="0c02", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Vision +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c91", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Wildfire +ATTR{idProduct}=="0c8b", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Wildfire S +ATTR{idProduct}=="0c86", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Zopo ZP900, Fairphone +ATTR{idProduct}=="0c03", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Zopo C2 +ATTR{idProduct}=="2008", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +GOTO="android_usb_rule_match" +LABEL="not_HTC" + +# Huawei +ATTR{idVendor}=="12d1", ENV{adb_user}="yes" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1038", SYMLINK+="android_adb" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1038", SYMLINK+="android_fastboot" +# U8850 Vision +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1021", SYMLINK+="android_adb" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1021", SYMLINK+="android_fastboot" + +# Intel +ATTR{idVendor}=="8087", ENV{adb_user}="yes" +# Geeksphone Revolution +ATTR{idVendor}=="8087", ATTR{idProduct}=="0a16", SYMLINK+="android_adb" + +# K-Touch +ATTR{idVendor}=="24e3", ENV{adb_user}="yes" + +# KT Tech +ATTR{idVendor}=="2116", ENV{adb_user}="yes" + +# Kyocera +ATTR{idVendor}=="0482", ENV{adb_user}="yes" + +# Lab126 +ATTR{idVendor}=="1949", ENV{adb_user}="yes" +# Amazon Kindle Fire +ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_adb" +ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_fastboot" + +# Lenovo +ATTR{idVendor}=="17ef", ENV{adb_user}="yes" + +# LG +ATTR{idVendor}!="1004", GOTO="not_LG" +ENV{adb_user}="yes" +# Ally, Vortex, P500 +ATTR{idProduct}=="618f" +ATTR{idProduct}=="618e", SYMLINK+="android_adb" +# G2 D803 +ATTR{idProduct}=="631f", SYMLINK+="android_adb" +# Optimus LTE +ATTR{idProduct}=="6315", SYMLINK+="android_adb" +ATTR{idProduct}=="61f9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Optimus One +ATTR{idProduct}=="61c5", SYMLINK+="android_adb" +# Swift GT540 +ATTR{idProduct}=="61b4", SYMLINK+="android_adb" +# P500 CM10 +ATTR{idProduct}=="61a6", SYMLINK+="android_adb" +# 4X HD P880 +ATTR{idProduct}=="61f9", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_LG" + +# Motorola +ATTR{idVendor}!="22b8", GOTO="not_Motorola" +ENV{adb_user}="yes" +# CLIQ XT/Quench +ATTR{idProduct}=="2d66" +# Defy/MB525 +ATTR{idProduct}=="428c" +# Droid +ATTR{idProduct}=="41db" +# Xoom ID 1 +ATTR{idProduct}=="70a8", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xoom ID 2 +ATTR{idProduct}=="70a9", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Razr XT912 +ATTR{idProduct}=="4362", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G +ATTR{idProduct}=="2e76", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G (Dual SIM) +ATTR{idProduct}=="2e80", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G (Global GSM) +ATTR{idProduct}=="2e82", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Motorola" + +# MTK +ATTR{idVendor}=="0e8d", ENV{adb_user}="yes" + +# NEC +ATTR{idVendor}=="0409", ENV{adb_user}="yes" + +# Nook +ATTR{idVendor}=="2080", ENV{adb_user}="yes" + +# Nvidia +ATTR{idVendor}=="0955", ENV{adb_user}="yes" + +# Oppo +ATTR{idVendor}=="22d9", ENV{adb_user}="yes" +# Find 5 +ATTR{idVendor}=="22d9", ATTR{idProduct}=="2767", SYMLINK+="android_adb" +ATTR{idVendor}=="22d9", ATTR{idProduct}=="2764", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" + +# OTGV +ATTR{idVendor}=="2257", ENV{adb_user}="yes" + +# Pantech +ATTR{idVendor}=="10a9", ENV{adb_user}="yes" + +# Pegatron +ATTR{idVendor}=="1d4d", ENV{adb_user}="yes" + +# Philips +ATTR{idVendor}=="0471", ENV{adb_user}="yes" + +# PMC-Sierra +ATTR{idVendor}=="04da", ENV{adb_user}="yes" + +# Qualcomm +ATTR{idVendor}=="05c6", ENV{adb_user}="yes" +# Geeksphone Zero +ATTR{idVendor}=="05c6", ATTR{idProduct}=="9025", SYMLINK+="android_adb" +# OnePlus One +ATTR{idVendor}=="05c6", ATTR{idProduct}=="6769", SYMLINK+="android_adb" + +# SK Telesys +ATTR{idVendor}=="1f53", ENV{adb_user}="yes" + +# Samsung +ATTR{idVendor}!="04e8", GOTO="not_Samsung" +ENV{adb_user}="yes" +# Galaxy i5700 +ATTR{idProduct}=="681c", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy i5800 +ATTR{idProduct}=="681c", SYMLINK+="android_adb" +ATTR{idProduct}=="6601", SYMLINK+="android_fastboot" +ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy i7500 +ATTR{idProduct}=="6640", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy i9000 S, i9300 S3 +ATTR{idProduct}=="6601", SYMLINK+="android_adb" +ATTR{idProduct}=="685d", MODE="0660" +ATTR{idProduct}=="68c3", MODE="0660" +# Galaxy Ace (S5830) "Cooper" +ATTR{idProduct}=="689e", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy Tab +ATTR{idProduct}=="6877", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy Nexus (GSM) +ATTR{idProduct}=="685c" +ATTR{idProduct}=="6860", SYMLINK+="android_adb" +# Galaxy Tab 10.1, i9100 S2, i9300 S3, N5100 Note (8.0) +ATTR{idProduct}=="6860" +ATTR{idProduct}=="685e", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy i9300 S3 +ATTR{idProduct}=="6866", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy S4 GT-I9500 +ATTR{idProduct}=="685d", SYMLINK+="android_adb" +# False positive printer +ATTR{idProduct}=="3252", OPTIONS=="ignore_device" +GOTO="android_usb_rule_match" +LABEL="not_Samsung" + +# Sharp +ATTR{idVendor}=="04dd", ENV{adb_user}="yes" + +# Sony +ATTR{idVendor}=="054c", ENV{adb_user}="yes" + +# Sony Ericsson +ATTR{idVendor}!="0fce", GOTO="not_Sony_Ericsson" +ENV{adb_user}="yes" +# Xperia X10 mini +ATTR{idProduct}=="3137" +ATTR{idProduct}=="2137", SYMLINK+="android_adb" +# Xperia X10 mini pro +ATTR{idProduct}=="3138" +ATTR{idProduct}=="2138", SYMLINK+="android_adb" +# Xperia X8 +ATTR{idProduct}=="3149" +ATTR{idProduct}=="2149", SYMLINK+="android_adb" +# Xperia X12 +ATTR{idProduct}=="e14f" +ATTR{idProduct}=="614f", SYMLINK+="android_adb" +# Xperia Arc S +ATTR{idProduct}=="414f", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Neo V +ATTR{idProduct}=="6156", SYMLINK+="android_adb" +ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot" +# Xperia S +ATTR{idProduct}=="5169", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia SP +ATTR{idProduct}=="6195", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia L +ATTR{idProduct}=="5192", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Mini Pro +ATTR{idProduct}=="0166", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia V +ATTR{idProduct}=="0186", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Acro S +ATTR{idProduct}=="5176", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Z1 Compact +ATTR{idProduct}=="51a7", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Sony_Ericsson" + +# Spreadtrum +ATTR{idVendor}=="1782", ENV{adb_user}="yes" + +# T & A Mobile Phones +ATTR{idVendor}=="1bbb", ENV{adb_user}="yes" +# Alcatel OT991D +ATTR{idVendor}=="1bbb", ATTR{idProduct}=="00f2", SYMLINK+="android_adb" + +# Teleepoch +ATTR{idVendor}=="2340", ENV{adb_user}="yes" + +# Texas Instruments UsbBoot +ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f" +ATTR{idVendor}=="0451", ATTR{idProduct}=="d010" + +# Toshiba +ATTR{idVendor}=="0930", ENV{adb_user}="yes" + +# WEARNERS +ATTR{idVendor}=="05c6", ENV{adb_user}="yes" + +# ZTE +ATTR{idVendor}=="19d2", ENV{adb_user}="yes" +# Blade +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1353" +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1351", SYMLINK+="android_adb" +# Blade S (Crescent, Orange San Francisco 2) +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1355" +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1354", SYMLINK+="android_adb" + +# XiaoMi +ATTR{idVendor}=="2717", ENV{adb_user}="yes" +# Mi2A +ATTR{idVendor}=="2717", ATTR{idProduct}=="904e", SYMLINK+="android_adb" +ATTR{idVendor}=="2717", ATTR{idProduct}=="9039", SYMLINK+="android_adb" +# Mi3 +ATTR{idVendor}=="2717", ATTR{idProduct}=="0368", SYMLINK+="android_adb" + +# Skip other vendor tests +LABEL="android_usb_rule_match" + +# Enable device as a user device if found +ENV{adb_user}=="yes", MODE="0660", GROUP="adb", TAG+="uaccess", TAG+="udev-acl" + +# Devices listed here {begin...end} are connected by USB +LABEL="android_usb_rules_end" diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-fastboot.bash-completion android-tools-4.2.2+git20130529/debian/android-tools-fastboot.bash-completion --- android-tools-4.2.2+git20130529/debian/android-tools-fastboot.bash-completion 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-fastboot.bash-completion 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1 @@ +debian/bash_completion.d/fastboot fastboot diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-fastboot.manpages android-tools-4.2.2+git20130529/debian/android-tools-fastboot.manpages --- android-tools-4.2.2+git20130529/debian/android-tools-fastboot.manpages 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-fastboot.manpages 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1 @@ +debian/fastboot.1 diff -Nru android-tools-4.2.2+git20130529/debian/android-tools-fastboot.udev android-tools-4.2.2+git20130529/debian/android-tools-fastboot.udev --- android-tools-4.2.2+git20130529/debian/android-tools-fastboot.udev 2013-05-29 15:10:21.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/android-tools-fastboot.udev 2014-11-24 20:27:47.000000000 +0000 @@ -1,8 +1,416 @@ -# Set ACLs for console users on fastboot USB devices -# 4e30 maguro/toro -# 4e40 grouper -# 4ee0 mako/manta - -ACTION=="add|change", SUBSYSTEM=="usb", \ - ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e30|4e40|4ee0", \ - TAG+="uaccess" +# Skip this section below if this device is not connected by USB +SUBSYSTEM!="usb", GOTO="android_usb_rules_end" + +LABEL="android_usb_rules_begin" +# Devices listed here in android_usb_rules_{begin...end} are connected by USB +# Acer +ATTR{idVendor}!="0502", GOTO="not_Acer" +ENV{adb_user}="yes" +# Iconia Tab A1-830 +ATTR{idProduct}=="3604", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Iconia Tab A500 +ATTR{idProduct}=="3325", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Liquid +ATTR{idProduct}=="3202" +ATTR{idProduct}=="3203", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_Acer" + +# ADVANCE +ATTR{idVendor}=="0a5c", ENV{adb_user}="yes" +# S5 +ATTR{idVendor}=="0a5c", ATTR{idProduct}=="e681", SYMLINK+="android_adb" + +# Archos +ATTR{idVendor}!="0e79", GOTO="not_Archos" +ENV{adb_user}="yes" +# 43 +ATTR{idProduct}=="1417", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# 101 +ATTR{idProduct}=="1411", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# 101 xs +ATTR{idProduct}=="1549", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Archos" + +# Asus +ATTR{idVendor}=="0b05", ENV{adb_user}="yes" +# Zenphone 5 +ATTR{idProduct}=="4daf", SYMLINK+="android_adb", SYMLINK+="android_fastboot" + +# Azpen Onda +ATTR{idVendor}=="1f3a", ENV{adb_user}="yes" + +# Dell +ATTR{idVendor}=="413c", ENV{adb_user}="yes" + +# Foxconn +ATTR{idVendor}=="0489", ENV{adb_user}="yes" +# Commtiva Z71, Geeksphone One +ATTR{idVendor}=="0489", ATTR{idProduct}=="c001", SYMLINK+="android_adb" + +# Fujitsu/Fujitsu Toshiba +ATTR{idVendor}=="04c5", ENV{adb_user}="yes" + +# Fuzhou Rockchip Electronics +ATTR{idVendor}=="2207", ENV{adb_user}="yes" +# Mediacom Smartpad 715i +ATTR{idVendor}=="2207", ATTR{idProduct}=="0000", SYMLINK+="android_adb" +# Ubislate 7Ci +ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", SYMLINK+="android_adb" + +# Garmin-Asus +ATTR{idVendor}=="091e", ENV{adb_user}="yes" + +# Google +ATTR{idVendor}!="18d1", GOTO="not_Google" +ENV{adb_user}="yes" +# Nexus 4, Nexus 7 2013 +ATTR{idProduct}=="4ee2", SYMLINK+="android_adb" +ATTR{idProduct}=="4ee0", SYMLINK+="android_fastboot" +# Nexus 7 +ATTR{idProduct}=="4e42", SYMLINK+="android_adb" +ATTR{idProduct}=="4e40", SYMLINK+="android_fastboot" +# Nexus 5, Nexus 10 +ATTR{idProduct}=="4ee1", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Nexus S +ATTR{idProduct}=="4e21" +ATTR{idProduct}=="4e22", SYMLINK+="android_adb" +ATTR{idProduct}=="4e20", SYMLINK+="android_fastboot" +# Galaxy Nexus +ATTR{idProduct}=="4e30", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Nexus One +ATTR{idProduct}=="4e11" +ATTR{idProduct}=="4e12", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Generic and unspecified debug interface +ATTR{idProduct}=="d00d", SYMLINK+="android_fastboot" +# Include: Samsung Galaxy Nexus (GSM) +ATTR{idProduct}=="4e30", SYMLINK+="android_fastboot" +# Recovery adb entry for Nexus Family +ATTR{idProduct}=="d001", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_Google" + +# Haier +ATTR{idVendor}=="201e", ENV{adb_user}="yes" + +# Hisense +ATTR{idVendor}=="109b", ENV{adb_user}="yes" + +# HTC +ATTR{idVendor}!="0bb4", GOTO="not_HTC" +ENV{adb_user}="yes" +# ChaCha +ATTR{idProduct}=="0cb2", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Desire (Bravo) +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c87", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Desire HD +ATTR{idProduct}=="0ca2", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Desire S (Saga) +ATTR{idProduct}=="0cab", SYMLINK+="android_adb" +# Desire Z +ATTR{idProduct}=="0c91", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Evo Shift +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0ca5", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# G1 +ATTR{idProduct}=="0c01", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# HD2 +ATTR{idProduct}=="0c02", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Hero H2000 +ATTR{idProduct}=="0001", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Hero (GSM), Desire +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c99", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Hero (CDMA) +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c9a", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Incredible +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c9e", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Incredible rev 0002 +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c8d", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# MyTouch 4G +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c96", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# One (m7) +ATTR{idProduct}=="0c93" +ATTR{idProduct}=="0f87", SYMLINK+="android_adb" +ATTR{idProduct}=="0ff0", SYMLINK+="android_fastboot" +# Slide +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0e03", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Tatoo, Dream, ADP1, G1, Magic +ATTR{idProduct}=="0c01" +ATTR{idProduct}=="0c02", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Vision +ATTR{idProduct}=="0ff9" +ATTR{idProduct}=="0c91", SYMLINK+="android_adb" +ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" +# Wildfire +ATTR{idProduct}=="0c8b", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Wildfire S +ATTR{idProduct}=="0c86", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Zopo ZP900, Fairphone +ATTR{idProduct}=="0c03", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Zopo C2 +ATTR{idProduct}=="2008", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +GOTO="android_usb_rule_match" +LABEL="not_HTC" + +# Huawei +ATTR{idVendor}=="12d1", ENV{adb_user}="yes" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1038", SYMLINK+="android_adb" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1038", SYMLINK+="android_fastboot" +# U8850 Vision +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1021", SYMLINK+="android_adb" +ATTR{idVendor}=="12d1", ATTR{idProduct}=="1021", SYMLINK+="android_fastboot" + +# Intel +ATTR{idVendor}=="8087", ENV{adb_user}="yes" +# Geeksphone Revolution +ATTR{idVendor}=="8087", ATTR{idProduct}=="0a16", SYMLINK+="android_adb" + +# K-Touch +ATTR{idVendor}=="24e3", ENV{adb_user}="yes" + +# KT Tech +ATTR{idVendor}=="2116", ENV{adb_user}="yes" + +# Kyocera +ATTR{idVendor}=="0482", ENV{adb_user}="yes" + +# Lab126 +ATTR{idVendor}=="1949", ENV{adb_user}="yes" +# Amazon Kindle Fire +ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_adb" +ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", SYMLINK+="android_fastboot" + +# Lenovo +ATTR{idVendor}=="17ef", ENV{adb_user}="yes" + +# LG +ATTR{idVendor}!="1004", GOTO="not_LG" +ENV{adb_user}="yes" +# Ally, Vortex, P500 +ATTR{idProduct}=="618f" +ATTR{idProduct}=="618e", SYMLINK+="android_adb" +# G2 D803 +ATTR{idProduct}=="631f", SYMLINK+="android_adb" +# Optimus LTE +ATTR{idProduct}=="6315", SYMLINK+="android_adb" +ATTR{idProduct}=="61f9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Optimus One +ATTR{idProduct}=="61c5", SYMLINK+="android_adb" +# Swift GT540 +ATTR{idProduct}=="61b4", SYMLINK+="android_adb" +# P500 CM10 +ATTR{idProduct}=="61a6", SYMLINK+="android_adb" +# 4X HD P880 +ATTR{idProduct}=="61f9", SYMLINK+="android_adb" +GOTO="android_usb_rule_match" +LABEL="not_LG" + +# Motorola +ATTR{idVendor}!="22b8", GOTO="not_Motorola" +ENV{adb_user}="yes" +# CLIQ XT/Quench +ATTR{idProduct}=="2d66" +# Defy/MB525 +ATTR{idProduct}=="428c" +# Droid +ATTR{idProduct}=="41db" +# Xoom ID 1 +ATTR{idProduct}=="70a8", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xoom ID 2 +ATTR{idProduct}=="70a9", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Razr XT912 +ATTR{idProduct}=="4362", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G +ATTR{idProduct}=="2e76", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G (Dual SIM) +ATTR{idProduct}=="2e80", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Moto G (Global GSM) +ATTR{idProduct}=="2e82", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Motorola" + +# MTK +ATTR{idVendor}=="0e8d", ENV{adb_user}="yes" + +# NEC +ATTR{idVendor}=="0409", ENV{adb_user}="yes" + +# Nook +ATTR{idVendor}=="2080", ENV{adb_user}="yes" + +# Nvidia +ATTR{idVendor}=="0955", ENV{adb_user}="yes" + +# Oppo +ATTR{idVendor}=="22d9", ENV{adb_user}="yes" +# Find 5 +ATTR{idVendor}=="22d9", ATTR{idProduct}=="2767", SYMLINK+="android_adb" +ATTR{idVendor}=="22d9", ATTR{idProduct}=="2764", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" + +# OTGV +ATTR{idVendor}=="2257", ENV{adb_user}="yes" + +# Pantech +ATTR{idVendor}=="10a9", ENV{adb_user}="yes" + +# Pegatron +ATTR{idVendor}=="1d4d", ENV{adb_user}="yes" + +# Philips +ATTR{idVendor}=="0471", ENV{adb_user}="yes" + +# PMC-Sierra +ATTR{idVendor}=="04da", ENV{adb_user}="yes" + +# Qualcomm +ATTR{idVendor}=="05c6", ENV{adb_user}="yes" +# Geeksphone Zero +ATTR{idVendor}=="05c6", ATTR{idProduct}=="9025", SYMLINK+="android_adb" +# OnePlus One +ATTR{idVendor}=="05c6", ATTR{idProduct}=="6769", SYMLINK+="android_adb" + +# SK Telesys +ATTR{idVendor}=="1f53", ENV{adb_user}="yes" + +# Samsung +ATTR{idVendor}!="04e8", GOTO="not_Samsung" +ENV{adb_user}="yes" +# Galaxy i5700 +ATTR{idProduct}=="681c", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy i5800 +ATTR{idProduct}=="681c", SYMLINK+="android_adb" +ATTR{idProduct}=="6601", SYMLINK+="android_fastboot" +ATTR{idProduct}=="68a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy i7500 +ATTR{idProduct}=="6640", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy i9000 S, i9300 S3 +ATTR{idProduct}=="6601", SYMLINK+="android_adb" +ATTR{idProduct}=="685d", MODE="0660" +ATTR{idProduct}=="68c3", MODE="0660" +# Galaxy Ace (S5830) "Cooper" +ATTR{idProduct}=="689e", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy Tab +ATTR{idProduct}=="6877", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Galaxy Nexus (GSM) +ATTR{idProduct}=="685c" +ATTR{idProduct}=="6860", SYMLINK+="android_adb" +# Galaxy Tab 10.1, i9100 S2, i9300 S3, N5100 Note (8.0) +ATTR{idProduct}=="6860" +ATTR{idProduct}=="685e", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy i9300 S3 +ATTR{idProduct}=="6866", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" +# Galaxy S4 GT-I9500 +ATTR{idProduct}=="685d", SYMLINK+="android_adb" +# False positive printer +ATTR{idProduct}=="3252", OPTIONS=="ignore_device" +GOTO="android_usb_rule_match" +LABEL="not_Samsung" + +# Sharp +ATTR{idVendor}=="04dd", ENV{adb_user}="yes" + +# Sony +ATTR{idVendor}=="054c", ENV{adb_user}="yes" + +# Sony Ericsson +ATTR{idVendor}!="0fce", GOTO="not_Sony_Ericsson" +ENV{adb_user}="yes" +# Xperia X10 mini +ATTR{idProduct}=="3137" +ATTR{idProduct}=="2137", SYMLINK+="android_adb" +# Xperia X10 mini pro +ATTR{idProduct}=="3138" +ATTR{idProduct}=="2138", SYMLINK+="android_adb" +# Xperia X8 +ATTR{idProduct}=="3149" +ATTR{idProduct}=="2149", SYMLINK+="android_adb" +# Xperia X12 +ATTR{idProduct}=="e14f" +ATTR{idProduct}=="614f", SYMLINK+="android_adb" +# Xperia Arc S +ATTR{idProduct}=="414f", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Neo V +ATTR{idProduct}=="6156", SYMLINK+="android_adb" +ATTR{idProduct}=="0dde", SYMLINK+="android_fastboot" +# Xperia S +ATTR{idProduct}=="5169", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia SP +ATTR{idProduct}=="6195", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia L +ATTR{idProduct}=="5192", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Mini Pro +ATTR{idProduct}=="0166", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia V +ATTR{idProduct}=="0186", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Acro S +ATTR{idProduct}=="5176", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +# Xperia Z1 Compact +ATTR{idProduct}=="51a7", SYMLINK+="android_adb", SYMLINK+="android_fastboot" +GOTO="android_usb_rule_match" +LABEL="not_Sony_Ericsson" + +# Spreadtrum +ATTR{idVendor}=="1782", ENV{adb_user}="yes" + +# T & A Mobile Phones +ATTR{idVendor}=="1bbb", ENV{adb_user}="yes" +# Alcatel OT991D +ATTR{idVendor}=="1bbb", ATTR{idProduct}=="00f2", SYMLINK+="android_adb" + +# Teleepoch +ATTR{idVendor}=="2340", ENV{adb_user}="yes" + +# Texas Instruments UsbBoot +ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f" +ATTR{idVendor}=="0451", ATTR{idProduct}=="d010" + +# Toshiba +ATTR{idVendor}=="0930", ENV{adb_user}="yes" + +# WEARNERS +ATTR{idVendor}=="05c6", ENV{adb_user}="yes" + +# ZTE +ATTR{idVendor}=="19d2", ENV{adb_user}="yes" +# Blade +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1353" +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1351", SYMLINK+="android_adb" +# Blade S (Crescent, Orange San Francisco 2) +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1355" +ATTR{idVendor}=="19d2", ATTR{idProduct}=="1354", SYMLINK+="android_adb" + +# XiaoMi +ATTR{idVendor}=="2717", ENV{adb_user}="yes" +# Mi2A +ATTR{idVendor}=="2717", ATTR{idProduct}=="904e", SYMLINK+="android_adb" +ATTR{idVendor}=="2717", ATTR{idProduct}=="9039", SYMLINK+="android_adb" +# Mi3 +ATTR{idVendor}=="2717", ATTR{idProduct}=="0368", SYMLINK+="android_adb" + +# Skip other vendor tests +LABEL="android_usb_rule_match" + +# Enable device as a user device if found +ENV{adb_user}=="yes", MODE="0660", GROUP="adb", TAG+="uaccess", TAG+="udev-acl" + +# Devices listed here {begin...end} are connected by USB +LABEL="android_usb_rules_end" diff -Nru android-tools-4.2.2+git20130529/debian/bash_completion.d/adb android-tools-4.2.2+git20130529/debian/bash_completion.d/adb --- android-tools-4.2.2+git20130529/debian/bash_completion.d/adb 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/bash_completion.d/adb 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,157 @@ +## Bash completion for the Android SDK tools. +## +## Copyright (c) 2009 Matt Brubeck +## +## Permission is hereby granted, free of charge, to any person obtaining a copy +## of this software and associated documentation files (the "Software"), to deal +## in the Software without restriction, including without limitation the rights +## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +## copies of the Software, and to permit persons to whom the Software is +## furnished to do so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in +## all copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +## THE SOFTWARE. + +function _adb() +{ + local cur prev opts cmds c subcommand device_selected + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="-d -e -s -p" + cmds="devices push pull sync shell emu logcat forward jdwp install \ + uninstall bugreport help version wait-for-device start-server \ + reboot reboot-bootloader sideload \ + kill-server get-state get-serialno status-window remount root ppp" + cmds_not_need_device="devices help version start-server kill-server" + subcommand="" + device_selected="" + + # Look for the subcommand. + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + if [ "$word" = "-d" -o "$word" = "-e" -o "$word" = "-s" ]; then + device_selected=true + opts="-p" + fi + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + case "${subcommand}" in + '') + case "${prev}" in + -p) + return 0; + ;; + -s) + # Use 'adb devices' to list serial numbers. + COMPREPLY=( $(compgen -W "$(adb devices|grep 'device$'|cut -f1)" -- ${cur} ) ) + return 0 + ;; + esac + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 + ;; + esac + if [ -z "$device_selected" ]; then + local num_devices=$(( $(adb devices 2>/dev/null|wc -l) - 2 )) + if [ "$num_devices" -gt "1" ]; then + # With multiple devices, you must choose a device first. + COMPREPLY=( $(compgen -W "${opts} ${cmds_not_need_device}" -- ${cur}) ) + return 0 + fi + fi + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + return 0 + ;; + install) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-l -r -s" -- ${cur}) ) + return 0 + ;; + esac + ;; + forward) + # Filename or installation option. + COMPREPLY=( $(compgen -W "tcp: localabstract: localreserved: localfilesystem: dev: jdwp:" -- ${cur}) ) + return 0 + ;; + uninstall) + local apks=$(adb shell ls /data/data 2>/dev/null | tr '\n' ' ' | tr -d '\r') + if [[ $prev != "-k" && $cur == "-" ]]; then + COMPREPLY=( $(compgen -W "-k $apks" -- ${cur}) ) + else + COMPREPLY=( $(compgen -W "$apks" -- ${cur}) ) + fi + return 0 + ;; + logcat) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-v -b -c -d -f -g -n -r -s" -- ${cur}) ) + return 0 + ;; + esac + case "${prev}" in + -v) + COMPREPLY=( $(compgen -W "brief process tag thread raw time long" -- ${cur}) ) + return 0 + ;; + -b) + COMPREPLY=( $(compgen -W "radio events main" -- ${cur}) ) + return 0 + ;; + esac + ;; + pull) + if [ ${prev} == "pull" ]; then + if [ -z ${cur} ]; then + local files=$(adb shell "ls -a -d /*" 2>/dev/null | tr '\n' ' ' | tr -d '\r') + COMPREPLY=( $(compgen -W "$files" -o filenames -- ${cur}) ) + else + local files=$(adb shell "ls -a -d ${cur}*" 2>/dev/null | tr '\n' ' ' | tr -d '\r') + COMPREPLY=( $(compgen -W "$files" -o filenames -- ${cur}) ) + fi + return 0 + fi + ;; + push) + if [ "${COMP_WORDS[COMP_CWORD-2]}" == "push" ]; then + if [ -z "${cur}" ]; then + local files=$(adb shell "ls -a -d /*" 2>/dev/null | tr '\n' ' ' | tr -d '\r') + COMPREPLY=( $(compgen -W "$files" -o filenames -- ${cur}) ) + else + local files=$(adb shell "ls -a -d ${cur}*" 2>/dev/null | tr '\n' ' ' | tr -d '\r') + COMPREPLY=( $(compgen -W "$files" -o filenames -- ${cur}) ) + fi + return 0 + fi + ;; + esac +} +complete -o default -F _adb adb + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff -Nru android-tools-4.2.2+git20130529/debian/bash_completion.d/fastboot android-tools-4.2.2+git20130529/debian/bash_completion.d/fastboot --- android-tools-4.2.2+git20130529/debian/bash_completion.d/fastboot 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/bash_completion.d/fastboot 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,97 @@ +## Bash completion for the Android SDK tools. +## +## Copyright (c) 2009 Matt Brubeck +## +## Permission is hereby granted, free of charge, to any person obtaining a copy +## of this software and associated documentation files (the "Software"), to deal +## in the Software without restriction, including without limitation the rights +## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +## copies of the Software, and to permit persons to whom the Software is +## furnished to do so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in +## all copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +## THE SOFTWARE. + +function _fastboot() +{ + local cur prev opts cmds c subcommand device_selected + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="-w -s -p -c -i -b -n" + cmds="update flashall flash erase getvar boot devices \ + reboot reboot-bootloader oem" + subcommand="" + partition_list="boot recovery system userdata" + device_selected="" + + # Look for the subcommand. + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + if [ "$word" = "-s" ]; then + device_selected=true + fi + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + case "${subcommand}" in + '') + case "${prev}" in + -s) + # Use 'fastboot devices' to list serial numbers. + COMPREPLY=( $(compgen -W "$(fastboot devices|cut -f1)" -- ${cur} ) ) + return 0 + ;; + esac + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 + ;; + esac + if [ -z "$device_selected" ]; then + local num_devices=$(( $(fastboot devices 2>/dev/null|wc -l) )) + if [ "$num_devices" -gt "1" ]; then + # With multiple devices, you must choose a device first. + COMPREPLY=( $(compgen -W "-s" -- ${cur}) ) + return 0 + fi + fi + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + return 0 + ;; + flash) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + erase) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + esac +} +complete -o default -F _fastboot fastboot + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff -Nru android-tools-4.2.2+git20130529/debian/changelog android-tools-4.2.2+git20130529/debian/changelog --- android-tools-4.2.2+git20130529/debian/changelog 2014-01-04 16:27:21.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/changelog 2015-08-11 09:20:51.000000000 +0000 @@ -1,8 +1,37 @@ -android-tools (4.2.2+git20130529-3~ppa12.04+1) precise; urgency=low +android-tools (4.2.2+git20130529-5.1~ppa12.04+1) precise; urgency=medium - * Merge new upstream release from Debian Unstable. + * Merge from Debian Unstable. - -- Nicolas Derive Sat, 04 Jan 2014 17:26:50 +0100 + -- Nicolas Derive Tue, 11 Aug 2015 11:20:15 +0200 + +android-tools (4.2.2+git20130529-5.1) unstable; urgency=medium + + * Non-maintainer upload. + * add patch for CVE-2014-1909 (Closes: #770513) + + -- Hilko Bengen Mon, 24 Nov 2014 21:35:22 +0100 + +android-tools (4.2.2+git20130529-5) unstable; urgency=low + + * use system group 'adb' for udev rules (Closes: #766399) + + -- Hans-Christoph Steiner Wed, 22 Oct 2014 19:43:35 -0400 + +android-tools (4.2.2+git20130529-4) unstable; urgency=low + + [ Hans-Christoph Steiner ] + * set "Android Tools" as Maintainer, add myself as Uploader, remove Marcin + * update udev rules (Closes: #690453, #754566) + * fix odd language in Description (Closes: #710785) + * fix missing word in adb Description (Closes: #745358) + * include AndroidConfig.h in builds (Closes: #700461) + * include bash completion rules for adb and fastboot + * fix build failure on ppc64el + + [ Ramakrishnan Muthukrishnan ] + * include man page for fastboot (Closes: #741967) + + -- Hans-Christoph Steiner Tue, 21 Oct 2014 22:39:19 -0400 android-tools (4.2.2+git20130529-3) unstable; urgency=low diff -Nru android-tools-4.2.2+git20130529/debian/control android-tools-4.2.2+git20130529/debian/control --- android-tools-4.2.2+git20130529/debian/control 2013-07-23 21:51:54.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/control 2014-11-24 20:27:47.000000000 +0000 @@ -1,26 +1,32 @@ Source: android-tools Section: devel Priority: extra -Maintainer: Laszlo Boszormenyi (GCS) -Uploaders: Loïc Minier , - Marcin Juszkiewicz +Maintainer: Android tools Maintainer +Uploaders: Laszlo Boszormenyi (GCS) , + Hans-Christoph Steiner , + Loïc Minier Build-Depends: debhelper (>= 9), + android-system-dev, libcap-dev, libselinux-dev, libssl-dev, python, - zlib1g-dev -Standards-Version: 3.9.4 + zlib1g-dev, + bash-completion +Standards-Version: 3.9.6 Homepage: http://developer.android.com/guide/developing/tools/adb.html -Vcs-Git: git://anonscm.debian.org/android-tools/android-tools.git +Vcs-Git: https://anonscm.debian.org/git/android-tools/android-tools.git +Vcs-Browser: http://anonscm.debian.org/cgit/android-tools/android-tools.git Package: android-tools-adb -Architecture: any +# requires porting of selinux calls in extras/ext4_utils and +# core/fastboot/usb_*.c implementation; hurd +Architecture: linux-any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Android Debug Bridge CLI tool - Android Debug Bridge (adb) is a versatile tool lets you manage the - state of an emulator instance or Android-powered device. It is a - client-server program that includes three components: + Android Debug Bridge (adb) is a versatile tool that lets you manage the state + of an emulator instance or Android-powered device. It is a client-server + program that includes three components: . A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such @@ -33,23 +39,6 @@ A daemon, which runs as a background process on each emulator or device instance. -# this package is only built on Ubuntu and derivatives because it's dangerous: -# it basically will run a remote root shell with no authentication if you -# install it -Package: android-tools-adbd -Architecture: linux-any -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: Android Debug Bridge daemon - Android Debug Bridge (adb) is a versatile tool lets you manage the - state of an emulator instance or Android-powered device. It is a - client-server program that includes three components. - . - This package provides the daemon, which runs as a background process - on a device you want to connect to from a PC. - . - WARNING: this package will basically run a remote root shell on your system - upon installation with no authentication. - Package: android-tools-fastboot Architecture: linux-any Depends: ${misc:Depends}, ${shlibs:Depends} @@ -64,7 +53,7 @@ Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} Description: Android ext4 utilities with sparse support Android images (.img) are typically ext4 filesystems in a special - sparse file format come in a special format. + sparse file format. These are tools to help make that format. . This package provides the utilities to deal with Android sparse ext4 images. diff -Nru android-tools-4.2.2+git20130529/debian/copyright android-tools-4.2.2+git20130529/debian/copyright --- android-tools-4.2.2+git20130529/debian/copyright 2013-05-29 14:46:01.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/copyright 2014-11-24 20:27:47.000000000 +0000 @@ -5,7 +5,7 @@ Files: * Copyright: 2006-2012, The Android Open Source Project 2006, Brian Swetland -License: Apache 2.0 +License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. . @@ -21,7 +21,7 @@ Files: debian/* Copyright: 2012, Linaro Ltd. 2012, Laszlo Boszormenyi (GCS) -License: GPL v2 +License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either @@ -43,6 +43,45 @@ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. +Files: debian/*.udev +Copyright: 2012-2014 M0Rf30 + 2012-2014 Gianluca Boiano +License: GPL-3 + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. + +Files: debian/bash_completion.d/* +Copyright: 2011-2014, Hans-Christoph Steiner + 2009 Matt Brubeck +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + Files: core/fastboot/* Copyright: 2008, The Android Open Source Project 2007, Google Inc. @@ -98,43 +137,17 @@ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: core/libcutils/private.h - core/libcutils/tzfile.h - core/libcutils/tztime.c -Copyright: none -License: public domain - This file is in the public domain, so clarified as of │ - 1996-06-05 by Arthur David Olson. - -Files: core/libcutils/tzstrftime.c -Copyright: 1989 The Regents of the University of California. -License: Prior BSD License - Copyright (c) 1989 The Regents of the University of California. - All rights reserved. - . - Redistribution and use in source and binary forms are permitted - provided that the above copyright notice and this paragraph are - duplicated in all such forms and that any documentation, - advertising materials, and other materials related to such - distribution and use acknowledge that the software was developed - by the University of California, Berkeley. The name of the - University may not be used to endorse or promote products derived - from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - Files: extras/ext4_utils/sha1.c extras/ext4_utils/sha1.h Copyright: none -License: public domain +License: public-domain SHA-1 in C By Steve Reid 100% Public Domain Files: core/libsparse/sparse_crc32.c Copyright: none -License: public domain +License: public-domain COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or code or tables extracted from it, as desired without restriction. @@ -143,7 +156,7 @@ extras/ext4_utils/ext4_jbd2.h extras/ext4_utils/jbd2.h Copyright: none -License: public domain +License: public-domain This header was automatically generated from a Linux kernel header of the same name, to make information necessary for userspace to call into the kernel available to libc. It contains only constants, @@ -153,7 +166,7 @@ Files: core/include/cutils/ashmem.h core/include/cutils/logger.h Copyright: 2006-2012, The Android Open Source Project -License: Apache 2.0 or GPL v2 +License: Apache-2.0 or GPL-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. . diff -Nru android-tools-4.2.2+git20130529/debian/fastboot.1 android-tools-4.2.2+git20130529/debian/fastboot.1 --- android-tools-4.2.2+git20130529/debian/fastboot.1 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/fastboot.1 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,193 @@ +.TH fastboot +.SH NAME +fastboot \- manipulate the non-volatile flash partitions +.SH SYNOPSIS +.B fastboot +[\fIoptions\fR] +[\fIcommands\fR] +.SH DESCRIPTION +.B fastboot +is a program used to manipulate (list, install, erase) the non-volatile +memory such as flash filesystem partitions on devices that adhere to the +fastboot protocol, via a USB connection from a host computer. It requires +that the device be started in a boot loader mode with the fastboot +protocol enabled. Once connected to the device, the program accepts a +specific set of commands sent to it via the USB using the fastboot +program on the host. +.PP +fastboot is primarily used for installing the operating system binary +`images' into the non-volatile flash memory of the devices. +.PP +The partition should adhere to a specific layout. Fastboot was designed +for use with phones and tablets running the Android operating system. +.PP +To allow non-root user access to the devices, one might needed to add +udev rules file for the specific device and add the user to the +appopriate group (typically the group is named \fIplugdev\fR). +.PP +If the device is not connected, certain fastboot commands display the +output: +.PP + < waiting for the device > +.br +.PP +and waits till it detects and establish a fastboot connection with +the connected device. Otherwise, it prints a helpful list of commands +and switches and exits. +.SH OPTIONS +.TP +.BR \-w +Erase userdata and cache and format, if supported by the partition type. +.TP +.BR \-u +Do not first erase partition before formatting. +.TP +.BR \-s " " \fIdevice\fR +Specify device serial number or path to device port. +.IP +The device serial number can also be set by setting the environment +variable ANDROID_SERIAL. +.TP +.BR \-l +Lists device paths. Works only with the command \fIdevices\fR. +.TP +.BR \-p " " \fIproduct\fR +Specify the device product name. +.IP +Normally `fastboot' binary is built when building Android from the source +using the `Android Open Source Project' (AOSP) repositories. Assuming +\fI$aosp\fR is the root of the AOSP source code, the output binaries and +images are stored in the $AOSP/out directory. `fastboot' binary lives in +`$AOSP/out/host/linux-x86/bin' directory. If run from this directory, the +images are looked for in `../../../target/product/$product' directory +where $product is specified with the `\-p' switch. +.IP +If this switch is not set, the environment variable ANDROID_PRODUCT_OUT +should be set to the directory containing the binary images. +.IP +This switch is generally specified with the \fIflash\fR and \fIflashall\fR +commands. +.TP +.BR \-c " " \fIcommandline\fR +Override linux kernel command line. This switch is typically used along +with the command \fIboot\fR. See the EXAMPLES section for a typical usage. +.TP +.BR \-i " " \fIVendorID\fR +Specify a custom USB Vendor ID for the device. +.TP +.BR \-b " " \fIbase_addr\fR +Specify a custom linux kernel base address. +.TP +.BR \-n " " \fIpagesize\fR +Specify page size for the flash device. Default value is 2048. +.TP +.BR \-S " " \fIsize[K|M|G]\fR +Automatically sparse files greater than the specified \fIsize\fR. Specify +the \fIsize\fR as 0 to disable sparse files. +.SH COMMANDS +.TP +.BR update " " \fIfilename\fR +Reflash the device from the give update file. The filename must be a zip +file. +.TP +.BR flashall +Reflash boot partition, recovery partition and the system partition. +.TP +.BR flash " " \fIpartition\fR " " [\fIfilename\fR] +Write the given file to the specified partition. +.TP +.BR erase " " \fIpartition\fR +Erase a flash partition. +.TP +.BR format " " \fIpartition\fR +Format a flash partition. +.TP +.BR getvar " " \fIvariable\fR +Display a bootloader variable. +.TP +.BR boot " " \fIkernel\fR " " [\fIramdisk\fR] +Download and boot kernel. +.TP +.BR flash:raw " " boot " " \fIkernel\fR " " [\fIramdisk\fR] +Create boot image and flash it. +.TP +.BR devices +List all connected devices. +.TP +.BR continue +Continue with autoboot. +.TP +.BR reboot\-bootloader +Reboot device into bootloader. +.TP +.BR reboot +.RS +Reboot the device normally.. +.RE +.TP +.BR help +.RS +Show a help message. +.RE +.SH ENVIRONMENT +.B ANDROID_PRODUCT_OUT +.IP +This variable should be set to the root of the directory where the +images for the specific product is stored. +.PP +.B ANDROID_SERIAL +.IP +Thie variable can be used to specify the device serial number. +.SH EXAMPLES +.nf +1. Flashing the recovery image: + fastboot flash recovery recovery.img + +2. Flash the kernel and bootloader: + fastboot flash boot boot.img + +3. Erase a partition: + fastboot erase cache + +4. Reboot the phone: + fastboot reboot + +5. Boot with a custom built kernel and root filesystem (but not write them into the flash memory): + fastboot boot linux-2.6/arch/arm/boot/zImage root-image/recovery.img-ramdisk.cpio.gz + +6. Format partitions: + fastboot format cache + fastboot format userdata + +7. Flash all partitions at once: + fastboot \-w flashall + +8. Restoring from backed up images in the user's computer:: + fastboot erase system + fastboot erase data + fastboot erase cache + and then flash the images (starting with system): + fastboot flash system system.img + fastboot flash data data.img + fastboot flash cache cache.img + +9. Boot the phone with a specific linux kernel commandline argument: + fastboot \-c "console=ttyHSL0,115200,n8" boot boot.img + +.fi +.SH DIAGNOSTICS +Make sure that the device is connected and is visible via \fIlsusb\fR. +If the device is detected by `\fIlsusb\fR' and `\fIadb devices\fR' output +shows `\fI???????????? device\fR', then try reloading udev rules or +try disconnecting and connecting the cables. +.SH BUGS +The command name should have been chosen more carefully to reflect its +purpose. +.SH AUTHOR +.B fastboot +was written by engineers at Google for the Android project. +.PP +Ramakrishnan Muthukrishnan wrote this manual page, originally for the +Debian Project, with a lot of suggestions from Raul Miller. +.SH SEE ALSO +\fBadb\fP(1), \fBudev\fP(7), \fBlsusb\fP(8) diff -Nru android-tools-4.2.2+git20130529/debian/makefiles/adbd.mk android-tools-4.2.2+git20130529/debian/makefiles/adbd.mk --- android-tools-4.2.2+git20130529/debian/makefiles/adbd.mk 2013-05-29 19:37:02.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/makefiles/adbd.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -# Makefile for adbd - -SRCDIR ?= $(CURDIR) - -VPATH+= $(SRCDIR)/core/adb -SRCS+= adb.c -SRCS+= adb_auth_client.c -SRCS+= backup_service.c -#SRCS+= base64.c -SRCS+= fdevent.c -SRCS+= file_sync_service.c -SRCS+= framebuffer_service.c -SRCS+= jdwp_service.c -SRCS+= log_service.c -SRCS+= remount_service.c -SRCS+= services.c -SRCS+= sockets.c -SRCS+= transport.c -SRCS+= transport_local.c -SRCS+= transport_usb.c -SRCS+= usb_linux_client.c -SRCS+= utils.c -SRCS+= env-props.c - -VPATH+= $(SRCDIR)/core/libcutils -SRCS+= abort_socket.c -SRCS+= socket_inaddr_any_server.c -SRCS+= socket_local_client.c -SRCS+= socket_local_server.c -SRCS+= socket_loopback_client.c -SRCS+= socket_loopback_server.c -SRCS+= socket_network_client.c -SRCS+= list.c -SRCS+= load_file.c -SRCS+= android_reboot.c - -VPATH+= $(SRCDIR)/core/libzipfile -SRCS+= centraldir.c -SRCS+= zipfile.c - -VPATH+= $(SRCDIR)/bionic/libc/netbsd/net -SRC+= base64.c - - -CPPFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE -CPPFLAGS+= -DADB_HOST=0 -CPPFLAGS+= -DHAVE_FORKEXEC=1 -CPPFLAGS+= -DHAVE_SYMLINKS -CPPFLAGS+= -DHAVE_TERMIO_H -# XXX need to document why this is useful/needed -CPPFLAGS+= -DALLOW_ADBD_ROOT=1 -CPPFLAGS+= -I$(SRCDIR)/core/adb -CPPFLAGS+= -I$(SRCDIR)/core/include -CPPFLAGS+= -I$(SRCDIR)/libhardware/include - -LIBS+= -lc -lpthread -lz -lcrypto -lresolv - -OBJS= $(SRCS:.c=.o) - -all: adbd - -adbd: $(OBJS) - $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) - -clean: - rm -rf $(OBJS) adbd diff -Nru android-tools-4.2.2+git20130529/debian/makefiles/adb.mk android-tools-4.2.2+git20130529/debian/makefiles/adb.mk --- android-tools-4.2.2+git20130529/debian/makefiles/adb.mk 2013-05-29 19:36:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/makefiles/adb.mk 2014-11-24 20:27:47.000000000 +0000 @@ -38,11 +38,9 @@ CPPFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE CPPFLAGS+= -DADB_HOST=1 -CPPFLAGS+= -DHAVE_FORKEXEC=1 -CPPFLAGS+= -DHAVE_SYMLINKS -CPPFLAGS+= -DHAVE_TERMIO_H CPPFLAGS+= -I$(SRCDIR)/core/adb CPPFLAGS+= -I$(SRCDIR)/core/include +CPPFLAGS+= -include /usr/include/android/arch/linux-x86/AndroidConfig.h LIBS+= -lc -lpthread -lz -lcrypto diff -Nru android-tools-4.2.2+git20130529/debian/makefiles/ext4_utils.mk android-tools-4.2.2+git20130529/debian/makefiles/ext4_utils.mk --- android-tools-4.2.2+git20130529/debian/makefiles/ext4_utils.mk 2013-05-29 17:24:31.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/makefiles/ext4_utils.mk 2014-11-24 20:27:47.000000000 +0000 @@ -38,6 +38,7 @@ CPPFLAGS+= -I/usr/include CPPFLAGS+= -I$(SRCDIR)/core/include CPPFLAGS+= -I$(SRCDIR)/core/libsparse/include +CPPFLAGS+= -include /usr/include/android/arch/linux-x86/AndroidConfig.h LIBS+= -lz -lselinux diff -Nru android-tools-4.2.2+git20130529/debian/makefiles/fastboot.mk android-tools-4.2.2+git20130529/debian/makefiles/fastboot.mk --- android-tools-4.2.2+git20130529/debian/makefiles/fastboot.mk 2013-05-29 17:22:08.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/makefiles/fastboot.mk 2014-11-24 20:27:47.000000000 +0000 @@ -39,6 +39,7 @@ CPPFLAGS+= -I$(SRCDIR)/core/mkbootimg CPPFLAGS+= -I$(SRCDIR)/extras/ext4_utils CPPFLAGS+= -I$(SRCDIR)/core/libsparse/include +CPPFLAGS+= -include /usr/include/android/arch/linux-x86/AndroidConfig.h LIBS+= -lz -lselinux diff -Nru android-tools-4.2.2+git20130529/debian/patches/adbd-use-user-shell.patch android-tools-4.2.2+git20130529/debian/patches/adbd-use-user-shell.patch --- android-tools-4.2.2+git20130529/debian/patches/adbd-use-user-shell.patch 2013-06-18 21:56:18.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/adbd-use-user-shell.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -Subject: adbd: Use the running user's shell by default -Author: Stéphane Graber - ---- a/core/adb/services.c -+++ b/core/adb/services.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - #include "sysdeps.h" - -@@ -375,10 +376,20 @@ - adb_thread_t t; - int ret_fd; - pid_t pid; -+ -+ struct passwd *user = getpwuid(getuid()); -+ char *shell; -+ -+ if (user && user->pw_shell) { -+ shell = user->pw_shell; -+ } else { -+ shell = SHELL_COMMAND; -+ } -+ - if(name) { -- ret_fd = create_subprocess(SHELL_COMMAND, "-c", name, &pid); -+ ret_fd = create_subprocess(shell, "-c", name, &pid); - } else { -- ret_fd = create_subprocess(SHELL_COMMAND, "-", 0, &pid); -+ ret_fd = create_subprocess(shell, "-", 0, &pid); - } - D("create_subprocess() ret_fd=%d pid=%d\n", ret_fd, pid); - diff -Nru android-tools-4.2.2+git20130529/debian/patches/add-bq-vendor-id.patch android-tools-4.2.2+git20130529/debian/patches/add-bq-vendor-id.patch --- android-tools-4.2.2+git20130529/debian/patches/add-bq-vendor-id.patch 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/add-bq-vendor-id.patch 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,23 @@ +## Description: Let adb detect devices from BQ. +## Origin/Author: Jani Monoses +Index: android-tools-4.2.2+git20130218/core/adb/usb_vendors.c +=================================================================== +--- android-tools-4.2.2+git20130218.orig/core/adb/usb_vendors.c ++++ android-tools-4.2.2+git20130218/core/adb/usb_vendors.c +@@ -143,6 +143,8 @@ + #define VENDOR_ID_BYD 0x19D1 + // OUYA's USB Vendor ID + #define VENDOR_ID_OUYA 0x2836 ++// BQ's USB Vendor ID ++#define VENDOR_ID_BQ 0x2a47 + + + /** built-in vendor list */ +@@ -201,6 +203,7 @@ int builtInVendorIds[] = { + VENDOR_ID_XIAOMI, + VENDOR_ID_BYD, + VENDOR_ID_OUYA, ++ VENDOR_ID_BQ, + }; + + #define BUILT_IN_VENDOR_COUNT (sizeof(builtInVendorIds)/sizeof(builtInVendorIds[0])) diff -Nru android-tools-4.2.2+git20130529/debian/patches/byteswap-constants.patch android-tools-4.2.2+git20130529/debian/patches/byteswap-constants.patch --- android-tools-4.2.2+git20130529/debian/patches/byteswap-constants.patch 2013-05-29 22:44:18.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/byteswap-constants.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -Subject: pure cpp implementation of htole16 and htole32 as it's only used on constants and the generic version can't be computed by cpp on powerpc, hence breaking the static initializers -Author: Loïc Minier - ---- a/core/adb/usb_linux_client.c -+++ b/core/adb/usb_linux_client.c -@@ -34,8 +34,19 @@ - #define MAX_PACKET_SIZE_FS 64 - #define MAX_PACKET_SIZE_HS 512 - --#define cpu_to_le16(x) htole16(x) --#define cpu_to_le32(x) htole32(x) -+#define bswap_constant_16(x) \ -+ ((((x) & 0xff00u) >> 8) | (((x) & 0x00ffu) << 8)) -+#define bswap_constant_32(x) \ -+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ -+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) -+ -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+# define cpu_to_le16(x) (x) -+# define cpu_to_le32(x) (x) -+#else -+# define cpu_to_le16(x) bswap_constant_16(x) -+# define cpu_to_le32(x) bswap_constant_32(x) -+#endif - - struct usb_handle - { diff -Nru android-tools-4.2.2+git20130529/debian/patches/cve-2014-1909.patch android-tools-4.2.2+git20130529/debian/patches/cve-2014-1909.patch --- android-tools-4.2.2+git20130529/debian/patches/cve-2014-1909.patch 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/cve-2014-1909.patch 2014-11-24 20:33:57.000000000 +0000 @@ -0,0 +1,24 @@ +Fix for CVE-2014-1909 as described in http://www.droidsec.org/advisories/2014/02/04/two-security-issues-found-in-the-android-sdk-tools.html + +Index: android-tools/core/adb/adb_client.c +=================================================================== +--- android-tools.orig/core/adb/adb_client.c ++++ android-tools/core/adb/adb_client.c +@@ -242,7 +242,7 @@ int adb_connect(const char *service) + } else { + // if server was running, check its version to make sure it is not out of date + char buf[100]; +- int n; ++ unsigned n; + int version = ADB_SERVER_VERSION - 1; + + // if we have a file descriptor, then parse version result +@@ -251,7 +251,7 @@ int adb_connect(const char *service) + + buf[4] = 0; + n = strtoul(buf, 0, 16); +- if(n > (int)sizeof(buf)) goto error; ++ if(n > sizeof(buf)) goto error; + if(readx(fd, buf, n)) goto error; + adb_close(fd); + diff -Nru android-tools-4.2.2+git20130529/debian/patches/env-props.patch android-tools-4.2.2+git20130529/debian/patches/env-props.patch --- android-tools-4.2.2+git20130529/debian/patches/env-props.patch 2013-06-19 14:30:23.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/env-props.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -Subject: fake Android init properties via env vars; dots in property names must be replaced with underscores as dots aren't allowed in environment variables, which means there's an unlikely collision risk -Author: Loïc Minier - ---- /dev/null -+++ b/core/adb/env-props.c -@@ -0,0 +1,52 @@ -+#include -+#include -+#include -+ -+#define ENV_PROPS_PREFIX "APROP_" -+ -+#define ENV_PROPS_KEY_MAX (PROPERTY_KEY_MAX + sizeof ENV_PROPS_PREFIX - 1) -+ -+/* replace dots with underscores as dots aren't valid in environment variable -+ * names */ -+void dots_to_underscores(char *s) { -+ char *dot; -+ -+ dot = s; -+ while (dot = strchr(dot, '.')) { -+ *dot = '_'; -+ } -+ -+} -+ -+int property_get(const char *key, char *value, const char *default_value) { -+ char name[ENV_PROPS_KEY_MAX] = ENV_PROPS_PREFIX; -+ char *env; -+ -+ name[ENV_PROPS_KEY_MAX - 1] = '\0'; -+ strncpy(name + sizeof ENV_PROPS_PREFIX - 1, -+ key, -+ ENV_PROPS_KEY_MAX - (sizeof ENV_PROPS_PREFIX - 1) - 1); -+ dots_to_underscores(name); -+ -+ env = getenv(name); -+ value[PROPERTY_VALUE_MAX - 1] = '\0'; -+ if (env) { -+ strncpy(value, env, PROPERTY_VALUE_MAX - 1); -+ } else { -+ strncpy(value, default_value, PROPERTY_VALUE_MAX - 1); -+ } -+ return strlen(value); -+} -+ -+int property_set(const char *key, const char *value) { -+ char name[ENV_PROPS_KEY_MAX] = ENV_PROPS_PREFIX; -+ -+ name[ENV_PROPS_KEY_MAX - 1] = '\0'; -+ strncpy(name + sizeof ENV_PROPS_PREFIX - 1, -+ key, -+ ENV_PROPS_KEY_MAX - (sizeof ENV_PROPS_PREFIX - 1) - 1); -+ -+ dots_to_underscores(name); -+ -+ return setenv(name, value, 1); -+} diff -Nru android-tools-4.2.2+git20130529/debian/patches/ppc64el-ftbfs.patch android-tools-4.2.2+git20130529/debian/patches/ppc64el-ftbfs.patch --- android-tools-4.2.2+git20130529/debian/patches/ppc64el-ftbfs.patch 1970-01-01 00:00:00.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/ppc64el-ftbfs.patch 2014-11-24 20:27:47.000000000 +0000 @@ -0,0 +1,43 @@ +Author: Steve Langasek +Description: Fix build failure on ppc64el + On ppc64/ppc64el, the Linux kernel headers default to defining __u64 as + 'unsigned long int' for "compatibility". However, this is incompatible + with android-tools' own definition of the type. Use the + __SANE_USERSPACE_TYPES__ define to get kernel header behavior consistent + with other architectures. +Index: android-tools-4.2.2+git20130218/extras/ext4_utils/ext4_utils.c +=================================================================== +--- android-tools-4.2.2+git20130218.orig/extras/ext4_utils/ext4_utils.c 2014-02-22 00:36:30.665154000 +0000 ++++ android-tools-4.2.2+git20130218/extras/ext4_utils/ext4_utils.c 2014-02-22 00:36:30.655154000 +0000 +@@ -36,6 +36,7 @@ + #endif + + #if defined(__linux__) ++#define __SANE_USERSPACE_TYPES__ + #include + #elif defined(__APPLE__) && defined(__MACH__) + #include +Index: android-tools-4.2.2+git20130218/extras/ext4_utils/make_ext4fs_main.c +=================================================================== +--- android-tools-4.2.2+git20130218.orig/extras/ext4_utils/make_ext4fs_main.c 2014-02-14 18:26:17.000000000 +0000 ++++ android-tools-4.2.2+git20130218/extras/ext4_utils/make_ext4fs_main.c 2014-02-22 00:37:41.735153984 +0000 +@@ -20,6 +20,7 @@ + #include + + #if defined(__linux__) ++#define __SANE_USERSPACE_TYPES__ + #include + #elif defined(__APPLE__) && defined(__MACH__) + #include +Index: android-tools-4.2.2+git20130218/extras/ext4_utils/wipe.c +=================================================================== +--- android-tools-4.2.2+git20130218.orig/extras/ext4_utils/wipe.c 2013-02-18 14:49:03.000000000 +0000 ++++ android-tools-4.2.2+git20130218/extras/ext4_utils/wipe.c 2014-02-22 00:37:37.225155283 +0000 +@@ -19,6 +19,7 @@ + + #if defined(__linux__) + ++#define __SANE_USERSPACE_TYPES__ + #include + #include + diff -Nru android-tools-4.2.2+git20130529/debian/patches/reboot-syscall.patch android-tools-4.2.2+git20130529/debian/patches/reboot-syscall.patch --- android-tools-4.2.2+git20130529/debian/patches/reboot-syscall.patch 2013-05-29 19:53:07.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/reboot-syscall.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -Subject: port android_reboot() to call the reboot syscall via syscall() (glibc) rather than __reboot (bionic) -Author: Loïc Minier - ---- a/core/libcutils/android_reboot.c -+++ b/core/libcutils/android_reboot.c -@@ -21,6 +21,8 @@ - #include - #include - #include -+#include -+#include - - #include - -@@ -121,8 +123,8 @@ - break; - - case ANDROID_RB_RESTART2: -- ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, -- LINUX_REBOOT_CMD_RESTART2, arg); -+ ret = syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, -+ LINUX_REBOOT_CMD_RESTART2, arg); - break; - - default: diff -Nru android-tools-4.2.2+git20130529/debian/patches/series android-tools-4.2.2+git20130529/debian/patches/series --- android-tools-4.2.2+git20130529/debian/patches/series 2013-07-04 21:28:17.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/series 2014-11-24 20:32:13.000000000 +0000 @@ -1,8 +1,6 @@ remove-selinux-android.patch -# these were introduced with the adbd build -reboot-syscall.patch use-capability.patch -env-props.patch -byteswap-constants.patch -adbd-use-user-shell.patch use-local-socket.patch +ppc64el-ftbfs.patch +add-bq-vendor-id.patch +cve-2014-1909.patch diff -Nru android-tools-4.2.2+git20130529/debian/patches/use-local-socket.patch android-tools-4.2.2+git20130529/debian/patches/use-local-socket.patch --- android-tools-4.2.2+git20130529/debian/patches/use-local-socket.patch 2013-07-23 22:42:03.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/patches/use-local-socket.patch 2014-11-24 20:27:47.000000000 +0000 @@ -5,7 +5,7 @@ =================================================================== --- android-tools.orig/core/adb/adb.c 2013-07-19 23:26:22.408974096 +0200 +++ android-tools/core/adb/adb.c 2013-07-19 23:26:22.396974391 +0200 -@@ -1154,7 +1154,11 @@ +@@ -1154,7 +1154,11 @@ int launch_server(int server_port) */ void build_local_name(char* target_str, size_t target_size, int server_port) { @@ -22,7 +22,7 @@ =================================================================== --- android-tools.orig/core/adb/adb_client.c 2013-07-19 23:26:22.408974096 +0200 +++ android-tools/core/adb/adb_client.c 2013-07-19 23:26:22.396974391 +0200 -@@ -185,12 +185,12 @@ +@@ -185,12 +185,12 @@ int _adb_connect(const char *service) strcpy(__adb_error, "service name too long"); return -1; } @@ -37,7 +37,7 @@ if(fd < 0) { strcpy(__adb_error, "cannot connect to daemon"); -@@ -201,6 +201,7 @@ +@@ -201,6 +201,7 @@ int _adb_connect(const char *service) return -1; } @@ -49,7 +49,7 @@ =================================================================== --- android-tools.orig/core/adb/transport_local.c 2013-07-19 23:26:22.408974096 +0200 +++ android-tools/core/adb/transport_local.c 2013-07-19 23:26:22.400974292 +0200 -@@ -118,7 +118,8 @@ +@@ -118,7 +118,8 @@ int local_connect_arbitrary_ports(int co } #endif if (fd < 0) { diff -Nru android-tools-4.2.2+git20130529/debian/README.source android-tools-4.2.2+git20130529/debian/README.source --- android-tools-4.2.2+git20130529/debian/README.source 2013-05-29 14:44:30.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/README.source 2014-11-24 20:27:47.000000000 +0000 @@ -10,3 +10,15 @@ The debian/create-snapshot script may be used to generate an android-tools.tar.xz from the latest upstream; see this script for a list of files to copy from upstream into the tarball. + + +udev rules +---------- + +The udev rules were derived from this project: +https://github.com/M0Rf30/android-udev-rules + +The direct download link is: +https://raw.githubusercontent.com/M0Rf30/android-udev-rules/master/51-android.rules + + -- Hans-Christoph Steiner , Tue, 21 Oct 2014 00:16:55 -0400 diff -Nru android-tools-4.2.2+git20130529/debian/rules android-tools-4.2.2+git20130529/debian/rules --- android-tools-4.2.2+git20130529/debian/rules 2013-06-18 22:13:44.000000000 +0000 +++ android-tools-4.2.2+git20130529/debian/rules 2014-11-24 20:27:47.000000000 +0000 @@ -10,18 +10,8 @@ INSTALL := install INSTALL_PROGRAM = $(INSTALL) -DERIVES_FROM_UBUNTU := $(shell dpkg-vendor --derives-from Ubuntu && echo 1 || echo 0) - -# disable adbd on Debian for now as it's insecure -ifeq ($(DERIVES_FROM_UBUNTU),1) -BUILD_ADBD := 1 -else -BUILD_ADBD := 0 -export DH_OPTIONS += -Nandroid-tools-adbd -endif - %: - dh $@ --with python2 + dh $@ --with python2 --with bash-completion override_dh_clean: dh_clean @@ -30,10 +20,6 @@ override_dh_auto_build: mkdir -p builddir/adb $(MAKE) -f $(M)/adb.mk -C builddir/adb -ifeq ($(BUILD_ADBD),1) - mkdir -p builddir/adbd - $(MAKE) -f $(M)/adbd.mk -C builddir/adbd -endif mkdir -p builddir/fastboot $(MAKE) -f $(M)/fastboot.mk -C builddir/fastboot mkdir -p builddir/ext4_utils