15

I want to download either:

https://android.googlesource.com/platform/frameworks/base.git/+/master/tools/aapt/

or

https://github.com/android/platform_frameworks_base/tree/master/tools/aapt

Rob Pitt
  • 354
  • 3
  • 10

4 Answers4

24

As of today, android.googlesource.com has a link [tgz] on each directory page, it is in small font, but it works:

the [tgz] link works!

You cannot download a separate file, but you can download a directory.

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127
  • I can't believe I didn't find this link by myself and had to come to SO for help! Still working in 2018, thanks. ;-) – Micer Jan 31 '18 at 19:47
  • Actually is possible to download a file directly, more info here https://stackoverflow.com/questions/72876327/what-is-the-official-android-repository-containing-apksigner/76419232#76419232 – Gruber Jun 07 '23 at 00:58
5

Yes, you can download single file in base64 text format:

curl https://github.com/android/platform_frameworks_base/tree/master/tools/aapt?format=text | base64 -d
Duzy Chan
  • 51
  • 1
  • 3
3

This answer looks like it will work. It tells you how to make a sparse checkout using Git. Make sure you have Git 1.7.0 or later installed, then run this:

git init platform_frameworks_base-aapt
cd platform_frameworks_base-aapt
git remote add -f origin https://github.com/android/platform_frameworks_base.git
git config core.sparsecheckout true
echo tools/aapt/ >> .git/info/sparse-checkout
git pull origin master
Community
  • 1
  • 1
Rory O'Kane
  • 29,210
  • 11
  • 96
  • 131
  • 1
    `git remote add -f origin https://github.com/android/platform_frameworks_base.git` uses an unacceptable amount of bandwidth, but thank you for this method when only git access is available. `svn export` as detailed below provides a great method specific to **github.com**. – Rob Pitt Aug 20 '13 at 06:30
  • 1
    You’re right, this does download the whole repository. I tried leaving out the `-f` (“fetch”) flag on the [`git remote add`](http://schacon.github.io/git/git-remote.html), but Git still fetches the whole repo later, at the `git pull`. I looked at some more SO questions, but it looks like Git doesn’t support what you want. – Rory O'Kane Aug 20 '13 at 14:46
3

If you have svn, you can do this:

svn export https://github.com/android/platform_frameworks_base/trunk/tools/aapt

It will create the aapt directory locally, without any version control files in it.

janos
  • 120,954
  • 29
  • 226
  • 236