https://en.droidwiki.org/w/index.php?title=Android_Debug_Bridge&feed=atom&action=historyAndroid Debug Bridge - Revision history2024-03-29T00:03:17ZRevision history for this page on the wikiMediaWiki 1.41.0-wmf.5https://en.droidwiki.org/w/index.php?title=Android_Debug_Bridge&diff=387&oldid=prevFlorian at 17:30, 4 August 20172017-08-04T17:30:04Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:30, 4 August 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{DISPLAYTITLE:Android Debug Bridge (ADB)}}</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The '''A'''ndroid-'''D'''ebug-'''B'''ridge (abbreviated as ''adb'') is a software-interface for the [[android]] system, which can be used to connect an android device with a computer using an USB cable or a wireless connection. It can be used to execute commands on the phone or transfer data between the device and the computer.<ref>[http://developer.android.com/guide/developing/tools/adb.html Dokumentation zu ADB (englisch)]</ref></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The '''A'''ndroid-'''D'''ebug-'''B'''ridge (abbreviated as ''adb'') is a software-interface for the [[android]] system, which can be used to connect an android device with a computer using an USB cable or a wireless connection. It can be used to execute commands on the phone or transfer data between the device and the computer.<ref>[http://developer.android.com/guide/developing/tools/adb.html Dokumentation zu ADB (englisch)]</ref></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<!-- diff cache key endroidwikiwiki:diff::1.12:old-386:rev-387 -->
</table>Florianhttps://en.droidwiki.org/w/index.php?title=Android_Debug_Bridge&diff=386&oldid=prevFlorian: /* Install applications */2017-08-04T17:28:07Z<p><span dir="auto"><span class="autocomment">Install applications</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:28, 4 August 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l55">Line 55:</td>
<td colspan="2" class="diff-lineno">Line 55:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If you now open a new command line window at any directory on your computer, you should get a list of adb commands when you just type:<pre>adb</pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If you now open a new command line window at any directory on your computer, you should get a list of adb commands when you just type:<pre>adb</pre></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Linux ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Linux ===</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On most big Linux distirbutions, there's an adb and fastboot package, e.g.:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On most big Linux distirbutions, there's an adb and fastboot package, e.g.:</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l75">Line 75:</td>
<td colspan="2" class="diff-lineno">Line 71:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On other distributions you can look in your packet manager for a package named ''android'' or ''adb'' and install the corresponding one. If there's no package, you can download the separate platform-tools package (see the introduction section) and put it somewhere. If you also want to use adb (and maybe fastboot) from anywhere in your system, you can symlink the binaries to the /bin directory:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>On other distributions you can look in your packet manager for a package named ''android'' or ''adb'' and install the corresponding one. If there's no package, you can download the separate platform-tools package (see the introduction section) and put it somewhere. If you also want to use adb (and maybe fastboot) from anywhere in your system, you can symlink the binaries to the /bin directory:</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">ln -s /path/to/android/platform-tools/adb /bin/adb</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>ln -s /path/to/android/platform-tools/fastboot /bin/fastboot</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><code>ln -s /path/to/android/platform-tools/adb /bin/adb</code></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><code></ins>ln -s /path/to/android/platform-tools/fastboot /bin/fastboot<ins style="font-weight: bold; text-decoration: none;"></code></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td></tr>
<!-- diff cache key endroidwikiwiki:diff::1.12:old-385:rev-386 -->
</table>Florianhttps://en.droidwiki.org/w/index.php?title=Android_Debug_Bridge&diff=385&oldid=prevFlorian: Created by translating the page "Android Debug Bridge"2017-08-04T17:27:35Z<p>Created by translating the page "<a href="http://www.droidwiki.org/wiki/Special:Redirect/revision/16326" class="extiw" title="de:Special:Redirect/revision/16326">Android Debug Bridge</a>"</p>
<p><b>New page</b></p><div>The '''A'''ndroid-'''D'''ebug-'''B'''ridge (abbreviated as ''adb'') is a software-interface for the [[android]] system, which can be used to connect an android device with a computer using an USB cable or a wireless connection. It can be used to execute commands on the phone or transfer data between the device and the computer.<ref>[http://developer.android.com/guide/developing/tools/adb.html Dokumentation zu ADB (englisch)]</ref><br />
<br />
The tool is part of the [[Android SDK]] (Android '''S'''oftware '''D'''evelopment '''K'''it) and is located in the subdirectory ''platform-tools''. In previous versions of the SDK it was located in the subdirectory ''tools''. Since January 2017, Google also provides the package in a separate, unbundled downloadable package with all other ''platform-tools'', in which'' ''also the ADB and fastboot is included. The user now does not need to download the complete SDK just for the ADB and/or fastboot anymore.<ref>[http://www.androidpolice.com/2017/01/05/google-makes-adb-fastboot-platform-tools-available-without-full-sdk-android-studio-download/ ''Google makes ADB, fastboot, and other platform tools available without full SDK or Android Studio download.'']&#x20;</ref><ref>[http://www.androidcentral.com/get-adb-and-fastboot-utilities-without-installing-sdk-directly-google ''How to get ADB and Fastboot utilities without installing the Android SDK.'']&#x20;5.&nbsp;</ref><ref>[http://www.redmondpie.com/you-can-now-download-adb-and-fastboot-tools-without-sdk-or-android-studio/ ''Download ADB And Fastboot Tools Without SDK Or Android Studio, Here's How | Redmond Pie.'']&#x20;6.&nbsp;</ref><ref>[http://www.androidauthority.com/google-adb-fastboot-platform-tools-standalone-download-741582/ ''Google makes ADB and fastboot available without Android Studio or SDK.'']&#x20;6.&nbsp;</ref> The download link is provided on the [https://developer.android.com/studio/releases/platform-tools.html Android-Developer] website.<br />
<br />
== What is ADB? ==<br />
The Android Debug Bridge is a software interface between the device and the local computer, which allows the direct communication of both components. This includes the possibility to transfer files from one component to the other one, as well as executing commands from the computer on the connected device. The ADB can be used through a command line windows, terminal/shell in Linux-based systems, a command line (cmd) for Windows. There's no official graphical user interface for now.<br />
<br />
The main advantage is to execute commands on the phone directly out of the computer, without any direct user interaction to the phone, which makes especially debugging a lot easier.<br />
<br />
Apart from the possibility to connect a phone for using ADB using the usb cable (which was, for a long time, the only possible way), there's also the possibility to connect to the ADB daemon on the device using a [[wikipedia:TCP|tcp]] connection, which also includes the [[WiFi]] network.<br />
<br />
== Important commands ==<br />
In the following list you find some ''important ''commands, which you may need more often when working with the adb. If you want to view the help and a complete list of adb commands of the version you're using, just type the following command and hit return:<pre>adb help</pre><br />
<br />
=== Show connected devices ===<br />
Lists connected and available devices (only devices which have [[USB-Debugging]] enabled)<pre>adb devices</pre>If there's an output something like this:<pre><br />
List of devices attached<br />
</pre>there're most likely no devices connected, or there're no USB drivers installed (correctly)<br />
<br />
Does the output look like:<pre><br />
List of devices attached<br />
???????????? no permissions<br />
</pre>you, if you're using Windows, most likely need to write the Vendor ID of the device manufacturer (which can be found in the device manager) into this file (the format is: 0xZZZZ, where Z is a hexadecimal number from 0 to F):<br />
%USERPROFILE%\.android\adb_usb.ini<br />
<br />
The important thing is, that the vendor ID is written as it's own line in this file. When using Linux, the file can be found in the home directory of the current user in the hidden directory .android. The Vendor ID can be found with the command ''lsusb''.<br />
<br />
=== Copy files ===<br />
* From the device to the computer:<pre>adb pull /pfad/am/handy.txt /pfad/am/computer.txt</pre><br />
* From the computer to the device:<pre>adb push /pfad/am/computer.txt /pfad/am/handy.txt</pre><br />
<br />
=== Install applications ===<br />
You can install [[App|apps]] on the device. However, this requires the APK file to be present on the local computer (the user also needs to be able to access this file):<pre>adb install /pfad/zur/datei/anwendung.apk</pre><br />
<br />
=== Logcat ===<br />
{{Main article|Logcat}}You can also show the system log using adb:<pre>adb logcat</pre>Sometimes it's useful to write (pipe) the output/the system log to a separate file (however, this is the default behavior of the system and not a special function of the ADB):<pre>adb logcat > datei.txt</pre><br />
<br />
=== Open an interactive shell ===<br />
{{Main article|Shell}}To execute commands on the android device, you can use the following command. It will, if called without any arguments, open an interactive shell on the device, which is disaplayed in your console/terminal window. If you pass a string as an argument to the command, it will be executed on the device as a command for the device and the shell will be closed, once the command was executed.<pre><br />
adb shell<br />
</pre><br />
<br />
== Installation ==<br />
<br />
=== Installation and setting the adb as a system environment variable in Windows ===<br />
{{Main article|Adb und Fastboot Installation (Windows)}}To avoid the need to navigate to the directory where the adb is located in each time you want to use the adb, you can add the directory to the PATH environment variable of your WIndows sytsem. That allows you to use adb commands in a command line windows, no matter ''where ''on the system you currently are. If you're using Windows 7 (it's slightly different on future versions of Windows, but basically the same) you can follow these steps:<br />
# Control Panel<br />
# System and security<br />
# System<br />
# Advanced System settings<br />
# Environment variables<br />
Afterwards look for the ''Path'' variable in the ''System variables'' section and add the path to the ''platform-tools''directory on the system. The path needs to be absolute (not relative) and needs to be separated from the current value using a semicolon (;) (take a look to the image).<br />
<br />
[[File:Systemvariable_adb_windows.jpeg]]<br />
<br />
If you now open a new command line window at any directory on your computer, you should get a list of adb commands when you just type:<pre>adb</pre><br />
<br />
<br />
<br />
<br />
=== Linux ===<br />
On most big Linux distirbutions, there's an adb and fastboot package, e.g.:<br />
{| class="wikitable" style="margin-bottom: 10px;"<br />
!Distribution<br />
!Packagename<br />
|-<br />
|Ubuntu, Debian<br />
|android-tools-adb<br />
|-<br />
|openSUSE, Fedora, Arch Linux<br />
|android-tools<br />
|-<br />
|Slackware<br />
|android-tools (as aSlackBuild)<br />
|}<br />
On other distributions you can look in your packet manager for a package named ''android'' or ''adb'' and install the corresponding one. If there's no package, you can download the separate platform-tools package (see the introduction section) and put it somewhere. If you also want to use adb (and maybe fastboot) from anywhere in your system, you can symlink the binaries to the /bin directory:<br />
ln -s /path/to/android/platform-tools/adb /bin/adb<br />
<br />
ln -s /path/to/android/platform-tools/fastboot /bin/fastboot<br />
<br />
== See also ==<br />
* [[ADB Sideload]]<br />
* [[Wireless ADB]]<br />
<br />
== References ==<br />
<references /></div>Florian