|
|
Línea 48: |
Línea 48: |
| {{note|note=Some devices require a file at <code>.android/adb_usb.ini</code> be added to help your computer find the correct device. For example, the "encore" device requires that this file include a line containing <code>0x2080</code>, the identification code for the device. If you have installed adb and are unable to find the device, you may wish to inquire as to whether this may be the case for your device.}} | | {{note|note=Some devices require a file at <code>.android/adb_usb.ini</code> be added to help your computer find the correct device. For example, the "encore" device requires that this file include a line containing <code>0x2080</code>, the identification code for the device. If you have installed adb and are unable to find the device, you may wish to inquire as to whether this may be the case for your device.}} |
| | | |
− | === libncurses.so.5 64-bit troubles === | + | ==Requisitos para usar adb== |
| + | *Si lo utilizamos para debuggear una aplicación se debe indicar en el Android Manifest añadiendo android:debuggable="true" al elemento <application>. Eclipse lo hace solo. |
| + | |
| + | |
| + | |
| + | === Problema con libncurses.so.5 64-bit=== |
| Under 64bits version of Linux Mint 14 and maybe other Debian/Ubuntu flavours <code>adb</code> shows the following error: | | Under 64bits version of Linux Mint 14 and maybe other Debian/Ubuntu flavours <code>adb</code> shows the following error: |
| ./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory | | ./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory |
Revisión de 22:47 12 abr 2013
Guía Administración Android
Tutorial sobre conceptos básicos sobre el sistema operativo Android
Habilitar el modo de depuración por USB: Esta opción es una casilla que debéis marcar en "Ajustes->Aplicaciones->Depuración USB". A partir de ahora deberíamos acostumbrar-nos a tener siempre esta casilla marcada, ya que en caso de problemas con esta modalidad funcionando podremos conectarnos al aparato mediante el programa ADB para intentar salvar el dispositivo.
What is adb?
ADB ("adb
"), or the Android Debug Bridge, is a development tool included with the Android SDK (Software Developer Kit), which allows for communication from an Android device (such as a phone or tablet) to a personal computer, and vice-versa. This communication can be made over a wifi connection. However more commonly, it is made via a USB cable. adb
can also be used by developers for communicating from a computer to a virtual android machine that is also running on the computer.
adb
is the "Swiss-army knife" of Android development. It provides numerous functions that can be accessed in detail via the command: adb --help
Popular adb commands
Among the most popular among CyanogenMod include the following, which can be typed from a Terminal program on the attached computer:
-
adb shell
-- this command establishes a shell interface for establishing a command-line session with the device. In practical purposes, this allows a person to type "into" their devices, much as one would use a terminal program a Linux or Mac OS X. Individual shell commands can be sent to the device by typing adb shell <command_to_be_executed_on_the_device>
-
adb push <local> <remote>
-- this command pushes a local file on the computer to a remote file on the device. You can include the full path to either the local or remote file.
-
adb pull <remote> [<local>]
-- this command will pull a remote file on the device (you can include the path) to either a specified location on the computer or, if no destination is specified, to the current directory where the command was issued.
-
adb install <file>
-- this is used to "side-load" apps (in their .apk format) to the device.
There are many more useful commands. Check out the full instruction list here.
Downloading and installing adb
Although adb
can be downloaded as a simple binary, perhaps the best way to get adb is to install the Android SDK directly from Google. That will ensure that, as adb
is updated with the rest of the SDK, you can always have the latest version. adb
will be located in the /platform-tools
directory inside the SDK directory.
New behavior as of Android 4.2.2
In Android 4.2.2, Google implemented some new security features for using adb
. This requires you accept the shell session prompt from within your ROM once past whatever unlock mechanism you use for the lock screen. In order to access your device via adb
within a booted ROM, you MUST download the latest Android SDK and kill any existing adb
daemon sessions to proceed. Once you receive the prompt on your device, you may check the 'trust this computer' box to not be prompted again when connecting your device to that specific PC.
Troubleshooting adb
Plantilla:Paths
"Device not found" errors
Sometimes adb can't find your device. One solution is to run adb kill-server
and then adb start-server
as root or Administrator to restart the adb daemon with elevated privileges.
Also, you should make sure that the USB debugging or Android Debug Bridge option (this will vary depending on the version of Android) is checked in the Settings under Developer Options.
Plantilla:Note
Requisitos para usar adb
- Si lo utilizamos para debuggear una aplicación se debe indicar en el Android Manifest añadiendo android:debuggable="true" al elemento <application>. Eclipse lo hace solo.
Problema con libncurses.so.5 64-bit
Under 64bits version of Linux Mint 14 and maybe other Debian/Ubuntu flavours adb
shows the following error:
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
You can solve it by installing libncurses5 i386's version. Just type apt-get install libncurses5:i386
as root.
adb vía wifi
To update ADB use SDK Manager.
For some reason the SDK Manager does not automatically show the new release versions of Android SDK Tools and Android Platform-Tools, so if the versions of your Android SDK Tools and/or Android Platform-Tools are respectively older than 21.1 and 16.0.1, you will need to first delete them then reload the SDK Manager to get their new release versions to be displayed and available for installation.
Also, it appears that Android Support Libraries (under Extra) is also required for ADB to work, so you should install it as well.
Also, to get ADB-over-WiFi to work, first use ADB-over-USB to the same given PC/Laptop and grant access with "always" box checked.
Comandos habituales de Linux en Android