Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

New Formula for adb and fastboot. #22527

Closed
wants to merge 3 commits into from
Closed

New Formula for adb and fastboot. #22527

wants to merge 3 commits into from

Conversation

michelangelo
Copy link

This commit adds a new Formula to easily install adb and fastboot for AOS device management.

def install
File.rename "Mac/adb_Mac", "Mac/adb"
File.rename "Mac/fastboot_Mac", "Mac/fastboot"
bin.install "Mac/adb", "Mac/fastboot"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can rename a file in one step the install method:

bin.install 'Mac/abd_mac' => 'adb'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The android-sdk formula provides an adb binary, so installing this will conflict. Presumably someone doing Android development will have the SDK installed, so this will always conflict. What's the story here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback and review, I've updated the pull request accordingly.

About the rationale: adb and fastboot are two tools very widely used to flash (fastboot) and debug (adb) AOS-based devices; they're indeed part of the AOS SDK (which is a huge package).

What you may often want is just "flash" a device using fastboot with a blob and connect to it with adb; installing the whole AOS SDK for this whould be a major overkill.

Providing a package only for adb/fastboot is a pretty popular approach on many other platforms.

@mistydemeo
Copy link
Member

Looks like this is a prebuilt binary, is there a way to build from source?

@MikeMcQuaid
Copy link
Member

This isn't a bottle, fyi. Bottles are made with brew bottle (by maintainers or brew-test-bot).

Michelangelo De Simone added 2 commits September 14, 2013 08:43
This Formula allows to install the adb and fastboot binaries alone
for device flashing and debugging without using the whole AOS SDK.
@adamv
Copy link
Contributor

adamv commented Sep 14, 2013

What is the source of these files? Are they copied from the SDK itself originally?

Potentially we could add an option to the android-sdk formula that only installs these two tools, rather than source copies of them from here.

@michelangelo
Copy link
Author

The Google Code project "adb-fastboot-install" is not related to myself but I've been using it for months when I have to set up adb and fastboot without wasting time and energies.
AFAICT the included binaries come from the standard AOS SDK distribution.

The eventual idea of adding an option to the android-sdk Formula is certainly ok but wouldn't solve the issue of downloading hundreds of megabytes for only two simple tools that are not even 300 KB together.

@adamv
Copy link
Contributor

adamv commented Sep 14, 2013

Basically I'm uncomfortable with trusting a 3rd party copy of the official tools, even though they are likely safe.

But since I no longer do any Android development, I'll let another maintainer chime in here.

@MikeMcQuaid
Copy link
Member

I think requiring the android-sdk makes more sense.

@michelangelo
Copy link
Author

Well, I sympathize and share your concern but in this case there are IMHO two only choices: providing a smaller package (not necessarily this one) or just... do nothing and leave the whole > 400MiB android-sdk package to whoever needs these tools. :)

Having something like the android-tools-adb and android-tools-fastboot official packages currently available on Ubuntu and Debian would be pretty handy for brew users, though.

My 2c. Obviously it's up to you guys to have the final word to keep brew supercool.:)

@adamv
Copy link
Contributor

adamv commented Sep 14, 2013

Willing to package in Homebrew if we use the debian tarball http://packages.debian.org/sid/android-tools-fastboot (if it can be used). We should also name it the same as debian. Does debian rename the binaries on install?

@MikeMcQuaid
Copy link
Member

@michelangelo Exaggerrating doesn't help you; the package is 74M and 97M downloaded. I think this would be good in tap instead (or leave it open and see if there is more demand).

@michelangelo
Copy link
Author

@MikeMcQuaid "Exaggerating doesn't help you": what kind of way to respond is that?!!

And to be totally clear: the latest AOS Tools package (that includes the SDK) for OS X (x86_64) is 409M.

The Formula for android-sdk currently available does indeed involve a package of smaller size (because it includes only the SDK, as the name suggests) but yet significally bigger than 300KiB. 78M >> 300K, without "exaggerating".

@michelangelo michelangelo deleted the adb-fastboot branch September 16, 2013 21:46
@licheng
Copy link
Contributor

licheng commented Jan 21, 2014

The official package http://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-macosx.zip is also a pack of prebuilt binaries (adb and fastboot). It is only 1.1M. Compared with a 70+MB package of android-sdk, I feel it would be helpful to add the formula (but use the official url instead).

@MikeMcQuaid
Copy link
Member

@licheng Can you make a pull request?

@licheng
Copy link
Contributor

licheng commented Jan 21, 2014

@MikeMcQuaid ok, i'll make a new pull request later.

@Homebrew Homebrew locked and limited conversation to collaborators Jun 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants