- Android Debug Bridge
- Contents
- Installation
- Usage
- Connect device
- Figure out device IDs
- Adding udev rules
- Detect the device
- Transferring files
- Backup and restore
- Tips and tricks
- Bash completion
- Tools building on ADB
- Troubleshooting
- Empty device list
- No permissions error
- Arch Linux User Repository
- Search Criteria
- Package Details: android-studio 2020.3.1.24-1
- Package Actions
- Dependencies (8)
- Required by (6)
- Sources (3)
- Latest Comments
- TheGreatAndyChow commented on 2021-08-25 14:02
- baba.opensource commented on 2021-08-22 03:51
- kanaida commented on 2021-08-22 02:15
- baba.opensource commented on 2021-08-22 02:11
- kanaida commented on 2021-08-11 08:02
- kanaida commented on 2021-08-04 04:01
- dreamingincode commented on 2021-07-30 23:59
- duerrwlu commented on 2021-07-29 23:48
- johnson.lukose commented on 2021-07-16 19:46
- Arch Linux User Repository
- Search Criteria
- Package Details: android-sdk 26.1.1-1
- Package Actions
- Dependencies (22)
- Required by (55)
- Sources (5)
- Pinned Comments
- dreamingincode commented on 2020-03-11 07:51
- dreamingincode commented on 2017-04-18 11:40
- Latest Comments
- qualphey commented on 2020-10-23 11:35
- ulidtko commented on 2020-10-23 11:30
- qualphey commented on 2020-10-23 11:28
- relrel commented on 2020-08-23 19:19
- dreamingincode commented on 2020-06-01 18:26
- ulidtko commented on 2020-06-01 16:26
- dreamingincode commented on 2020-03-11 07:51
- Anonymous comment on 2020-03-10 17:54
- AndreVallestero commented on 2020-02-25 16:32
- AndreVallestero commented on 2020-02-25 16:28
Android Debug Bridge
The Android Debug Bridge (ADB) is a command-line tool that can be used to install, uninstall and debug apps, transfer files and access the device’s shell.
Contents
Installation
ADB is part of the Platform-Tools SDK package and the android-tools package.
Usage
Connect device
To connect to a real device or phone via ADB under Arch, you must:
- You might want to install android-udev if you wish to connect the device to the proper /dev/ entries.
- plug in your android device via USB.
- Enable USB Debugging on your phone or device:
- Jelly Bean (4.2) and newer: Go to Settings > About Phone tap Build Number 7 times until you get a popup that you have become a developer. Build number may be under a menu called Software info on newer Android OS versions. Then go to Settings > Developer > USB debugging and enable it. The device will ask to allow the computer with its fingerprint to connect. Allowing it permanently will copy
/.android/adbkey.pub onto the devices /data/misc/adb/adb_keys folder.
If ADB recognizes your device ( adb devices shows it as «device» and not as «unauthorized» , or it is visible and accessible in IDE), you are done. Otherwise see the instructions below.
Figure out device IDs
Each Android device has a USB vendor/product ID. An example for HTC Evo is:
Plug in your device and execute:
It should come up something like this:
Adding udev rules
Use the rules from android-udev (or android-udev-git AUR ), install them manually from Android developer, or use the following template for your udev rules, just replace [VENDOR ID] and [PRODUCT ID] with yours. Copy these rules into /etc/udev/rules.d/51-android.rules :
Then, to reload your new udev rules, execute:
Make sure you are member of adbusers user group to access adb devices.
Detect the device
After you have setup the udev rules, unplug your device and replug it.
you should see something like:
If adb still does not detect the device after plugging your device back in, kill and restart the adb server as root and check devices again:
If adb devices still shows «unauthorized» next to your device, make sure that that device has debugging permission allowed on the device itself. A ‘Allow USB Debugging?’ dialog should be presented when you physically connect the device. Select ‘Always Allow. «, then tap «OK». If the dialog was never presented, try Settings > Developer Options > Revoke USB Debugging Authorizations (then «OK»), and repeat the steps in this section. If you still do not see the ‘Allow USB Debugging?’ dialog, and the device is listed as unauthorized, then enter the Developer Options on the device and first uncheck «USB Debugging» and then check it again.
Transferring files
You can now use adb to transfer files between the device and your computer. To transfer files to the device, use
To transfer files from the device, use
Backup and restore
You can also backup and restore your device with adb. Moreover, no root is required to follow the process. The commands below led to backup your device to a single file which can also be successively restored.
The command to create a backup is
The command parameters list is
Then confirm the process on your device’s display and provide a password whether a backup password has been set before.
The command to restore a previous backup is
Tips and tricks
Bash completion
In order to enable Bash completion, install one of the following:
- android-completionAUR – Bash completion for adb and fastboot , taken from AOSP.
- android-bash-completionAUR – Bash completion for android , adb , emulator , fastboot , and repo , developed independently.
Tools building on ADB
- adbfs-rootless-gitAUR – a FUSE filesystem over ADB.
- adb-sync (available as adb-sync-gitAUR ) – a tool to synchronize files between a PC and an Android device using the ADB protocol.
- AndroidScreencast (available as androidscreencast-binAUR ) – view and control your Android device from a PC (via ADB).
- logcat-colorAUR – a colorful and highly configurable alternative to the standard adb logcat command.
- scrcpy (available as scrcpyAUR ) – display and control your Android device.
- qtscrcpy (available as qtscrcpy-gitAUR ) – Android real-time display control software.
Troubleshooting
Empty device list
A possible cause for your device not showing up is not having enabled USB debugging on your device. You can do that by going to Settings > Applications > Development and enabling USB debugging. Since Android 4.2 (Jelly Bean), the development menu is hidden; to enable it go to Settings > About phone and tap Build number 7 times.
No permissions error
If the device shows up with a «no permissions» label, it probably has a different vendor/product ID with respect to the ones collected by android-udev .
This can happen for instance when the device uses a custom ROM, or when it is switched from MTP to USB tethering mode, sideload and/or fastboot mode. Verify the actual device’s ID with lsusb and add the appropriate udev rules as described above.
Источник
Arch Linux User Repository
Search Criteria
Package Details: android-studio 2020.3.1.24-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/android-studio.git (read-only, click to copy) |
---|---|
Package Base: | android-studio |
Description: | The official Android IDE (Stable branch) |
Upstream URL: | https://developer.android.com/ |
Keywords: | android |
Licenses: | Apache |
Submitter: | TamCore |
Maintainer: | kordianbruck (SailReal) |
Last Packager: | kordianbruck |
Votes: | 977 |
Popularity: | 8.09 |
First Submitted: | 2013-05-15 19:45 |
Last Updated: | 2021-09-02 11:49 |
Dependencies (8)
- alsa-lib (alsa-lib-x205ta, alsa-lib-git, alsa-lib-minimal-git)
- freetype2 (freetype2-old-hinting, freetype2-infinality, freetype2-infinality-remix, freetype2-minimal-git, freetype2-ultimate5, freetype2-ttmetrics, freetype2-v35, freetype2-git)
- libxrender
- libxtst
- which
- gtk2 (gtk2-ubuntu, gtk2-git, gtk2-minimal-git, gtk2-patched-filechooser-icon-view, gtk2-maemo) (optional) – GTK+ look and feel
- libgl (glshim-git, libhybris-ext-libgl-git, libhybris-libgl-git, mesa-libgl-noglvnd, swiftshader-git, nvidia-340xx-utils, libglvnd-git, amdgpu-pro-libgl, libglvnd) (optional) – emulator support
- ncurses5-compat-libs(optional) – native debugger support
Required by (6)
- android-studio-launcher
- flutter(optional)
- flutter-beta(optional)
- flutter-dev(optional)
- flutter-git(optional)
- kode-studio-bin(optional)
Sources (3)
Latest Comments
TheGreatAndyChow commented on 2021-08-25 14:02
Contrary to «baba.opensource», I find everything works perfectly with this 2020.3.1 Arctic Fox. Thank you for the update.
baba.opensource commented on 2021-08-22 03:51
For the record, I had serious issues with 2020.3.1.22 & 2020.3.1.23.
I could not create new projects, gradle build would get stuck on old projects, etc.
I started the studio from the command line and noticed a bizzar exception. I have appended it to this comment in case it may be helpful.
Ended up downloading the tar file and manually unpacking, etc. Then everything started working.
Sorry couldn’t figure out what was wrong — spent a few hours but not cigar
kanaida commented on 2021-08-22 02:15
Flatpak works confirmed.
baba.opensource commented on 2021-08-22 02:11
I think there is a patch for arctic fox. Here is how I updated my system
kanaida commented on 2021-08-11 08:02
It’s still broken today. I tried it in windows just to see if it works, it works fine on windows 10.
kanaida commented on 2021-08-04 04:01
This latest update causes the IDE to give an error on startup about a corrupt installation. I tried a complete uninstall and reinstall with the same error.
Corrupted Installation Missing essential plugin: org.jetbrains.android Please reinstall Android Studio from scratch.
dreamingincode commented on 2021-07-30 23:59
Note that ‘ncurses5-compat-libs’ is an optional dependency needed for native debugger support.
duerrwlu commented on 2021-07-29 23:48
Please kindly consider updating this package to the new version numbering system.
My personal changes for the first new release were…
[line 11-12]
pkgver=2020.3.1.22
_build=214.7075529
[line 23 & must add latest checksum @26]
source=(«https://dl.google.com/dl/android/studio/ide-zips/$pkgver/android-studio-$pkgver-linux.tar.gz»
Although I am not quite sure myself: In the «-beta» package they believe the pkgrel to still be ‘1’ and the (never officially mentioned) «.22» being part of the version number. Furthermore, the build number might be something else or obsolete entirely (I got it from the latest NDK).
The latest checksum can be found directly on the according website, so I won’t provide mine. Many thanks.
johnson.lukose commented on 2021-07-16 19:46
[johnson@johnson-x550ep android-studio]$ makepkg -s -f ==> Making package: android-studio 4.2.2.0-1 (Sabtu 17 Jul 2021 03:20:58 ) ==> Checking runtime dependencies. ==> Checking buildtime dependencies. ==> Retrieving sources. -> Found android-studio-ide-202.7486908-linux.tar.gz -> Found android-studio.desktop -> Found license.html ==> Validating source files with sha256sums. android-studio-ide-202.7486908-linux.tar.gz . Passed android-studio.desktop . Passed license.html . Passed ==> Extracting sources. -> Extracting android-studio-ide-202.7486908-linux.tar.gz with bsdtar ==> Removing existing $pkgdir/ directory. ==> Entering fakeroot environment. ==> Starting package(). ==> Tidying install. -> Removing libtool files. -> Purging unwanted files. -> Removing static library files. -> Compressing man and info pages. ==> Checking for packaging issues. ==> Creating package «android-studio». -> Generating .PKGINFO file. -> Generating .BUILDINFO file. -> Generating .MTREE file. -> Compressing package. ==> Leaving fakeroot environment. ==> Finished making: android-studio 4.2.2.0-1 (Sabtu 17 Jul 2021 03:27:55 )
I tried this command twice but same result.
Источник
Arch Linux User Repository
Search Criteria
Package Details: android-sdk 26.1.1-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/android-sdk.git (read-only, click to copy) |
---|---|
Package Base: | android-sdk |
Description: | Google Android SDK |
Upstream URL: | https://developer.android.com/studio/releases/sdk-tools.html |
Keywords: | android development |
Licenses: | custom |
Submitter: | None |
Maintainer: | dreamingincode |
Last Packager: | dreamingincode |
Votes: | 1473 |
Popularity: | 1.76 |
First Submitted: | 2007-11-12 19:26 |
Last Updated: | 2020-09-30 12:40 |
Dependencies (22)
- fontconfig (fontconfig-srb, fontconfig-infinality-ultimate, fontconfig-infinality, fontconfig-infinality-remix, fontconfig-git, fontconfig-minimal-git, fontconfig-ubuntu) (x86_64)
- fontconfig (fontconfig-srb, fontconfig-infinality-ultimate, fontconfig-infinality, fontconfig-infinality-remix, fontconfig-git, fontconfig-minimal-git, fontconfig-ubuntu) (i686)
- freetype2 (freetype2-old-hinting, freetype2-infinality, freetype2-infinality-remix, freetype2-minimal-git, freetype2-ultimate5, freetype2-ttmetrics, freetype2-v35, freetype2-git) (x86_64)
- freetype2 (freetype2-old-hinting, freetype2-infinality, freetype2-infinality-remix, freetype2-minimal-git, freetype2-ultimate5, freetype2-ttmetrics, freetype2-v35, freetype2-git) (i686)
- gcc-libs (fastgcc, gcc-libs-multilib-git, gcc-libs-git) (i686)
- java-environment (jdk5, jdk7-openjdk-infinality, java-8-openjdk-shenandoah, jdk8-openjdk-infinality, java-gcj-compat, jdk9, zulu-10-bin, jdk-devel, jdk6, jdk12-openj9-bin, zulu-12-bin, jdk12, jdk8-openjdk-dcevm, jdk13-openj9-bin, jdk9-openj9-bin, jdk10, jdk11-openjdk-dcevm, jdk8-openjdk-jetbrains, jdk10-openj9-bin, jdk14-openj9-bin, jdk7, jdk8-jetbrains, zulu-14-bin, zulu-13-bin, jdk-bcl, amazon-corretto-15, jdk11-openjdk-dcevm-conflicts-fixed, zulu-embedded-jdk8, sapmachine-jdk-bin, jdk15-adoptopenjdk, jdk11-msopenjdk-bin, liberica-jre-8-full-bin, jdk8-arm, jdk11-jetbrains-imfix, zulu-11-bin, zulu-8-bin, zulu-15-bin, amazon-corretto-16, jdk11-graalvm-bin, jdk8-graalvm-bin, jdk16-graalvm-bin, jdk-openj9-bin, jdk11-adoptopenjdk, liberica-jdk-8-full-bin, liberica-jdk-11-bin, liberica-jdk-11-full-bin, liberica-jdk-11-lite-bin, liberica-jre-11-bin, liberica-jre-11-full-bin, zulu-embedded-jdk11, jdk8-adoptopenjdk, jdk-openj9, jdk8, jdk11, jdk8-openjdk-shenandoah, zulu-16-bin, jdk-arm, jdk7-j9-bin, jdk7r1-j9-bin, jdk11-openj9-bin, jdk11-graalvm-ee-bin, jdk17-graalvm-bin, jdk8-openj9-bin, jdk8-j9-bin, jdk11-j9-bin, java-openjdk-bin, amazon-corretto-17, jdk, zulu-17-bin, jdk-jetbrains, liberica-jdk-full-bin, amazon-corretto-8, amazon-corretto-11, zulu-embedded-jdk, jdk-adoptopenjdk, jdk16-adoptopenjdk, java-openjdk-loom-ea-bin, jre-jetbrains, java-openjdk-ea-bin, jdk-openjdk, jdk11-openjdk, jdk7-openjdk, jdk8-openjdk) (x86_64)
- java-environment (jdk5, jdk7-openjdk-infinality, java-8-openjdk-shenandoah, jdk8-openjdk-infinality, java-gcj-compat, jdk9, zulu-10-bin, jdk-devel, jdk6, jdk12-openj9-bin, zulu-12-bin, jdk12, jdk8-openjdk-dcevm, jdk13-openj9-bin, jdk9-openj9-bin, jdk10, jdk11-openjdk-dcevm, jdk8-openjdk-jetbrains, jdk10-openj9-bin, jdk14-openj9-bin, jdk7, jdk8-jetbrains, zulu-14-bin, zulu-13-bin, jdk-bcl, amazon-corretto-15, jdk11-openjdk-dcevm-conflicts-fixed, zulu-embedded-jdk8, sapmachine-jdk-bin, jdk15-adoptopenjdk, jdk11-msopenjdk-bin, liberica-jre-8-full-bin, jdk8-arm, jdk11-jetbrains-imfix, zulu-11-bin, zulu-8-bin, zulu-15-bin, amazon-corretto-16, jdk11-graalvm-bin, jdk8-graalvm-bin, jdk16-graalvm-bin, jdk-openj9-bin, jdk11-adoptopenjdk, liberica-jdk-8-full-bin, liberica-jdk-11-bin, liberica-jdk-11-full-bin, liberica-jdk-11-lite-bin, liberica-jre-11-bin, liberica-jre-11-full-bin, zulu-embedded-jdk11, jdk8-adoptopenjdk, jdk-openj9, jdk8, jdk11, jdk8-openjdk-shenandoah, zulu-16-bin, jdk-arm, jdk7-j9-bin, jdk7r1-j9-bin, jdk11-openj9-bin, jdk11-graalvm-ee-bin, jdk17-graalvm-bin, jdk8-openj9-bin, jdk8-j9-bin, jdk11-j9-bin, java-openjdk-bin, amazon-corretto-17, jdk, zulu-17-bin, jdk-jetbrains, liberica-jdk-full-bin, amazon-corretto-8, amazon-corretto-11, zulu-embedded-jdk, jdk-adoptopenjdk, jdk16-adoptopenjdk, java-openjdk-loom-ea-bin, jre-jetbrains, java-openjdk-ea-bin, jdk-openjdk, jdk11-openjdk, jdk7-openjdk, jdk8-openjdk) (i686)
- lib32-gcc-libs (lib32-gcc-libs-git) (x86_64)
- lib32-glibc (glibc-force-mmap, lib32-glibc-force-mmap, lib32-glibc-minimal-git, lib32-glibc-linux4, lib32-glibc-dso) (x86_64)
- libx11 (libx11-git) (x86_64)
- libx11 (libx11-git) (i686)
- libxext (libxext-git) (x86_64)
- libxext (libxext-git) (i686)
- libxrender(x86_64)
- libxrender(i686)
- libxtst(x86_64)
- libxtst(i686)
- zlib (zlib-static, zlib-git, zlib-asm, minizip-asm, zlib-ng-git, zlib-ng) (x86_64)
- zlib (zlib-static, zlib-git, zlib-asm, minizip-asm, zlib-ng-git, zlib-ng) (i686)
- android-emulator (android-emulator-canary, android-emulator-dummy) (optional) – emulator has become standalone since 25.3.0
- android-sdk-platform-tools (android-sdk-platform-tools-dummy) (optional) – adb, aapt, aidl, dexdump and dx
- android-udev (android-udev-git) (optional) – udev rules for Android devices
Required by (55)
- android-aarch64-boost(make)
- android-aarch64-kirigami2(make)
- android-aarch64-openssl
- android-aarch64-qt5
- android-aarch64-qt6-base
- android-armv7a-eabi-boost(make)
- android-armv7a-eabi-kirigami2(make)
- android-armv7a-eabi-openssl
- android-armv7a-eabi-qt5
- android-auto-api-simulators
- android-constraint-layout
- android-google-play-apk-expansion
- android-google-play-licensing
- android-google-repository
- android-platform
- android-platform-13
- android-platform-14
- android-platform-15
- android-platform-16
- android-platform-17
- android-platform-18
- android-platform-19
- android-platform-20
- android-platform-21
- android-platform-22
- android-platform-23
- android-platform-24
- android-platform-25
- android-platform-26
- android-platform-27
- android-platform-28
- android-platform-29
- android-platform-30
- android-platform-dummy
- android-sdk-ant
- android-studio-launcher(optional)
- android-support-repository
- android-x86-64-boost(make)
- android-x86-64-kirigami2(make)
- android-x86-64-openssl
- android-x86-64-qt5
- android-x86-boost(make)
- android-x86-kirigami2(make)
- android-x86-openssl
- android-x86-qt5
- droidbot-git(optional)
- fdroidserver(optional)
- fdroidserver-git(optional)
- flipper(optional)
- flipper-bin(optional)
- flutter(optional)
- flutter-beta(optional)
- flutter-dev(optional)
- flutter-git(optional)
- lambdanative
Sources (5)
Pinned Comments
dreamingincode commented on 2020-03-11 07:51
cmdline-tools should be a different package because it’s installed at android-sdk/cmdline-tools/latest, not android-sdk/tools of this package. They show up as different packages in Android Studio SDK manager as well, and they can be installed side-by-side.
dreamingincode commented on 2017-04-18 11:40
I’m going to update this package to 26.0.1 (it has been long-outdated), according to https://dl.google.com/android/repository/repository2-1.xml which is used by Android Studio.
Some tools have been removed by upstream in this update (namely the standalone SDK Manager’s GUI), and you may want to check against https://developer.android.com/studio/releases/sdk-tools.html for the breaking changes before this update.
If you are using an AUR helper and you want to stay on the old version, consult your AUR helper’s manual.
Latest Comments
qualphey commented on 2020-10-23 11:35
@ulidtko Ah yes, that worked. Thank you! My bad. 😛
ulidtko commented on 2020-10-23 11:30
@qualphey as you can see from pacman -Ql android-sdk , it installs its tools under /opt/android-sdk/tools/bin — so you have to ensure that dir appears on your $PATH.
qualphey commented on 2020-10-23 11:28
Does the sdkmanager get installed with this package? I get bash: sdkmanager: command not found when trying to run it? What am I missing?
relrel commented on 2020-08-23 19:19
@ulidtko @dreamingincode After encountering the same issue, running the following worked for me:
It uses Android Studio’s built-in java instead of the globally installed one. I haven’t dig to the root cause (probably java versioning issue), but I think this issue should be resolved appropriately in the sdkmanager shell wrapper.
dreamingincode commented on 2020-06-01 18:26
@ulidtko I would suggest selecting an older default Java version with archlinux-java .
ulidtko commented on 2020-06-01 16:26
With java-11-openjdk x86_64 the tools from android-sdk fail for me, like so:
$ sdkmanager —list Exception in thread «main» java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion. (SchemaModule.java:156) at com.android.repository.api.SchemaModule. (SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler. (AndroidSdkHandler.java:81) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) . 5 more
From half a day of research (I’m not really into java), I understand that the JAXB apis, including the package javax.xml.bind, have been deprecated in Java 9 & 10, and dropped altogether from JDK 11.
Okay, that’s fine. But how to fix it. Everyone online is quick to suggest adding jakarta.xml.bind dependency to my Maven/Gradle/SBT build. But with aur/android-sdk, I don’t have such thing. My attempts to —add-modules to the systemwide java were not successful.
@dreamingincode are you aware of this problem? I don’t remember making any java-related customizations on this machine; and as-is, this package seems completely broken here.
dreamingincode commented on 2020-03-11 07:51
cmdline-tools should be a different package because it’s installed at android-sdk/cmdline-tools/latest, not android-sdk/tools of this package. They show up as different packages in Android Studio SDK manager as well, and they can be installed side-by-side.
Anonymous comment on 2020-03-10 17:54
@dreamingincode: This package could be updated to the new commandline tools. This is an alternative to the full android studio wit sdkmanager command line.
I would like to do this.
AndreVallestero commented on 2020-02-25 16:32
Please add support for aarch64. This can be simply done by adding ‘aarch64’ to the arch list and by replacing lib32 packages with their 64bit equivalents (gcc-libs, glibc).
AndreVallestero commented on 2020-02-25 16:28
sdkmanager is intended to be used with jdk8 or lower.
It can work with jdk9 and jdk10 with the following export: export JAVA_OPTS=’-XX:+IgnoreUnrecognizedVMOptions —add-modules java.se.ee’
It will NOT work with jdk11 or higher as java.se.ee is removed after jdk 10
Copyright © 2004-2021 aurweb Development Team.
AUR packages are user produced content. Any use of the provided files is at your own risk.
Источник