Page MenuHomeSolus

android tools
Closed, ResolvedPublic

Description

Add android tools (adb, fastboot) from android-sdk.

Event Timeline

JoshStrobl triaged this task as Normal priority.Aug 12 2016, 4:43 AM

I don't think this is should be added as a package as a "unpack tarball in /opt" practice for setting up an up-to-date sdk is the common recommended practice, and in no point do Google recommend you install from distribution repos.

Further more, usually you need the minimal working set of sdk to get the proper tools, with their updater, etc.

While I appreciate the possible convenience of this, I don't think it really should be a package.

Android Studio, on third-party, however that's a different thing ;)

Nobody said it would be "unpack into /opt". It needs to be evaluated for packaging first.

If android-tools is open source and they provide tarballs, it goes into the repo. Third Party is for proprietary software.

AFAIK the SDK contains several proprietary tools, being one of the reasons it doesn't work on the BSDs. Nor you get a source tarball for download, rather a prebuilt dist tarball.

Actually after reading a bit more on the subject I may be wrong, lol.

Excerpt from http://www.zdnet.com/article/no-google-is-not-making-the-android-sdk-proprietary-whats-the-fuss-about/

The particular clauses that Grote seems to object to is the restrictions in the Android SDK license in section 3.3 and 3.4:

3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.

This clause applies to the SDK binary, not the SDK source code files, and it has been around for years. The SDK source code, like almost all of Android, is covered by the Apache Software License 2 (ASLv2).

Tick added a subscriber: Tick.Sep 15 2016, 10:12 PM

Just in case, I tested Android studio some days ago and that some problems that I had (and their fixes).

  • Oracle Java is recommended (required ?) to have good performance
  • A symlink to the system libstd is required, otherwise the device emulator didn't work. ( ln -s /usr/lib/libstdc++.so.6 ~/Android/SDK/tools/lib64/libstdc++ )

I too would like to see adb and fastboot tools included. I sometimes mess with custom ROMs on my Nexus 5; I need fastboot to unlock/relock the phone and adb to install apks.

Ubuntu has android-tools-adb and android-tools-fastboot (two separate packages). Fedora and openSUSE include both adb and fastboot in a single android-tools package.

Ubuntu nor openSUSE don't require root for fastboot, but Fedora does (kind of understandable since fastboot is for low-level things).

NeoVsk added a subscriber: NeoVsk.Oct 31 2016, 4:08 PM

Isn't this already available via 3rd Party (Android Studio)?

@NeoVsk Android Studio is the full gamut of Android development with the IDE, requiring a download of the full Android SDK as well. "android-tools" is a package containing two binaries that Android flashaholics can use to flash boot and recovery images as well as remotely install packages, run shell commands, pull/push files to/from the device, and so on. One could download Android Studio, but that is similar to asking someone to download the Libreoffice suite just to edit a text file.

shameempk rescinded a token.
shameempk awarded a token.
shameempk rescinded a token.
shameempk awarded a token.
JoshStrobl changed the task status from Open to In Progress.Nov 12 2016, 2:04 AM

Right so, I dug around and I think I can get android-tools in 3rd-Party. I looked at the repo index file that Android Studio provides and grabbed the Android SDK specific platform-tools. They use a static zip file in a static location and I'm fairly confident I can keep track of changes by watching the repo index file for changes. Inside the platform-tools zip are multiple tools, with the obvious important ones being adb and fastboot.

Bit early in the morning for me to test them with an actual Android device, but the adb and fastboot binaries themselves actually execute, even after I removed all the other cruft that was included.

JoshStrobl closed this task as Resolved.Nov 12 2016, 2:27 AM

Landed in 3rd-Party and available for testing: https://wiki.solus-project.com/3rdParty#Android_Tools

@JoshStrobl I'm glad to see android-tools being available in Solus, but isn't the general consensus to have all buildable packages in the repos and only non-buildable/non-redistributable packages in Third Party? The android-tools package can be built from source. At least, Arch Linux does for their repos. This is the PKGBUILD they use and this is the build.sh script that the PKGBUILD calls. It appears to use git tags, so it should work with the Solus build system, right?

Honestly, there was no indication from Google that it was open source, it wasn't discoverable at all and quite frankly that build.sh is an absolute abomination.

Considering it a low priority on my own list of things to kill off 3rd-Party and move to the repo.

Android Studio is fine, and it installed fine for me out of Third Party, but I still can't open a command line and use ADB or fastboot. That's literally all I want to do, and I would rather drop the binaries in myself that download the entire studio. What's holding back getting the separate packages in the repo/Third Party?

JoshStrobl added a comment.EditedJan 12 2017, 8:45 PM

@tekeous It already is in 3rd-Party. Check my second to last comment, I linked to it...

@JoshStrobl Just noticed that uninstalling it via SC doesn't actually remove anything. This thing leaves behind 2-3GB of data.

Josh's link up above seems to have moved: here's where I found it. https://solus-project.com/articles/software/third-party/en/

@NeoVsk Android Studio is the full gamut of Android development with the IDE, requiring a download of the full Android SDK as well. "android-tools" is a package containing two binaries that Android flashaholics can use to flash boot and recovery images as well as remotely install packages, run shell commands, pull/push files to/from the device, and so on. One could download Android Studio, but that is similar to asking someone to download the Libreoffice suite just to edit a text file.

You didn't answer the question. I find myself in a situation where I already have installed Android Studio, and yet it seems I still need to install android-tools-adb in order to launch an app I am building in Android Studio on my Pixel 2 over USB.

@tekeous It already is in 3rd-Party. Check my second to last comment, I linked to it...

Where? Shouldn't anything that is available be searchable in the Software Center or show up in the Third Party tab? I looked through everything in the 3rd Party tab and don't see it. I also tried searching for android-tools and android-tools-adb, neither of which show up. Just installing Android Studio doesn't seem to install these, and even Android Studio doesn't fully work without them.

Hmm. Apparently not. I went to that link and saw the commands to run. Only after running those commands does it show up in the Software Center. I thought the whole point of the Software Center and the Third Party tab existing in it is that you can do all this kind of stuff from there without needing to search the internet for commands to run in a terminal?

sudo snap install android-studio --classic

et voila!