Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I download a single directory from android.googlesource.com or github.com?

Tags:

git

github

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

like image 365
Rob Pitt Avatar asked Aug 19 '13 22:08

Rob Pitt


2 Answers

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.

like image 112
18446744073709551615 Avatar answered Oct 13 '22 07:10

18446744073709551615


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
like image 21
Rory O'Kane Avatar answered Oct 13 '22 07:10

Rory O'Kane