I have the GitHub app on my Samsung but I don't see how and where to download files from GitHub onto my phone.
Am I an idiot or am I missing something? Please help.
Since the repo's on GitHub, which supports filters, easiest is probably to use its filter support.
git clone --no-checkout --depth=1 --filter=blob:none \
https://github.com/aosp-mirror/platform_frameworks_base
cd platform_frameworks_base
git reset -q -- \*.aidl
git checkout-index -a
which could probably be finessed quite a bit to get the files sent in a single pack instead of the one-at-a-time-fetch that produces.
For instance, instead of blob:none say blob:limit=16384, that gets most of them up front.
To do this in your own code, without relying on a Git install, you'd need to implement the git protocol. Here's the online intro with pointers to the actual Git docs. It's not hard, you send text lines back and forth until the server spits the gobsmacking lot of data you wanted, then you pick through it. You don't need to use https, github supports the plain git protocol. Try running that clone command with GIT_TRACE=1 GIT_PACKET_TRACE=1.
Not sure if this is what you wanted :
#!/usr/bin/env bash
get_github_file_list(){
local user=$1 repo=$2 branch=$3
curl -s "https://api.github.com/repos/$user/$repo/git/trees/$branch?recursive=1"
}
get_github_file_list aosp-mirror platform_frameworks_base android-11.0.0_r33 |\
jq -r '.tree|map(.path|select(test("\\.aidl")))[]'