termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.94k stars 2.98k forks source link

[Package]: Android command line tools #17701

Open matheusmoreira opened 1 year ago

matheusmoreira commented 1 year ago

Why is it worth to add this package?

Termux already packages numerous tools that support Android application development:

However, the cmdline-tools are missing.

Especially important is sdkmanager which allows downloading and managing multiple Android SDK versions.

Home page URL

https://developer.android.com/tools#tools-sdk

Source code URL

https://developer.android.com/studio#command-tools

Packaging policy acknowledgement

Additional information

It doesn't seem to be permissively licensed. Maybe it doesn't allow packaging?

sylirre commented 1 year ago

The main issue with sdkmanager is that people can assume it is fully usable in Termux whereas really it is not even if it was ported. The stuff available in Google repository is not entirely platform independent. Certain things are x86_64 only.

SDKs can be manually packaged and be made installable via pkg. The sdkmanager is not needed for this.

SDK platform download URL format looks like (old SDKs):

http://dl-ssl.google.com/android/repository/android-${APILEVEL}_${REVISION}.zip

And for new SDKs:

http://dl-ssl.google.com/android/repository/platform-${SDKLEVEL}_${REVISION}.zip

Commands to download platform for API 24 (Android 7):

curl -LO http://dl-ssl.google.com/android/repository/platform-24_r02.zip
matheusmoreira commented 1 year ago

SDKs can be manually packaged and be made installable via pkg. The sdkmanager is not needed for this.

I would greatly appreciate that!

It seems I've been a victim of the X-Y problem. My actual objective is to develop Android apps inside Termux. I'm new to this so I assumed one needed the Google tools. If this can be done without them, it'd be great!

agnostic-apollo commented 1 year ago

For reference https://github.com/termux/termux-packages/pull/7227#issuecomment-893022283

Links are outdated.