Utente:Valerio Bozzolan/Android Debug Bridge

The Android Debug Bridge, commonly abbreviated as ADB is a tool to run commands on a connected Android device.[1][2] The adbd daemon runs on the device, and the adb client starts a background server to multiplex commands sent to devices. In addition to the command-line interface,[3] numerous graphical user interfaces exist to control adb.

The format for issuing commands is typically:

adb [-d|-e|-s <serialNumber>] <command>
where -d is the option for specifying the single USB-attached device,
      -e for the single running Android emulator on the computer,
      -s for specifying a USB-attached device by its unique serial number.
If there is only one attached device or running emulator, these options are not necessary.

Features modifica

For example, Android applications can be saved by the command backup to a file, whose name is backup.ab by default.[4]

Installation modifica

For Windows, the Android SDK contains the adb.exe binary that can be extracted and installed.

For Linux, the adb tool has been packaged for various distribtutions. For Debian, it has been recommended to also install the android-sdk-platform-tools-common package next to the adb package, which installs the udev rules which makes it possible to run the tool without root permissions.[5]

Architecture modifica

ADB can be transported over USB or over the network through TCP. It uses a client-server architecture.[2]

Security modifica

Up to Android 2.2, Android was vulnerable to the RageAgainstTheCage exploit. The ADB daemon did not check for the return value of the setuid system call when dropping privileges. The exploit forks processes until it fails due to the exhaustion of process identifiers. When the daemon crashes and restarts, it can't start a new process with dropped privileges and keeps running as root. Then adb provided a root shell.[6]

In Android 4.2.2 or later (API level 17), a dialog is shown with an RSA fingerprint that needs to be accepted. This protects against computers exploiting the debugging mechanism without consent of the phone user.[7]

References modifica

  1. ^ Lauren Darcey, Android wireless application development, Shane Conder, 3rd, Upper Saddle River, NJ, Addison-Wesley, 2012, ISBN 978-0-321-81383-1.
  2. ^ a b Rajaram Regupathy, Unboxing Android USB: a hands-on approach with real World examples, Berkeley, CA, 2014, ISBN 978-1-4302-6209-1.
  3. ^ "Android Debug Bridge | Android Developers" Accessed December 27, 2012
  4. ^ Jack Wallen, How to create a full backup of your Android device without root, su techrepublic.com, 6 marzo 2015.
  5. ^ Debian -- Details of package adb in bullseye, su packages.debian.org.
  6. ^ Joshua J. Drake, Android hacker's handbook, Zach Lanier, Collin Mulliner, Pau Oliva, Stephen A. Ridley, Georg Wicherski, Indianapolis, IN, Wiley, 2014, p. 75, ISBN 978-1-118-60861-6.
  7. ^ (EN) Run apps on a hardware device, su developer.android.com.

External links modifica