Resolving git-lfs pointers in android-16.0.0

225 views
Skip to first unread message

Michael Devine

unread,
Jul 7, 2025, 2:21:19 PM7/7/25
to Repo and Gerrit Discussion
The new AOSP major release android-16.0.0_r1 has at least one use of git-lfs, but I can't find any corresponding configuration for git-lfs in that repository branch. I'm expecting to find a .gitattributes file (to track while files use LFS) and a .lfsconfig file (to indicate where the LFS contents are stored).

Is this intended? Am I missing some configuration somewhere? What is the right way to resolve the LFS contents for this file and any others that may exist?

Yingchun Li

unread,
Jul 8, 2025, 5:14:11 AM7/8/25
to Repo and Gerrit Discussion
On Tuesday, July 8, 2025 at 2:21:19 AM UTC+8 Michael Devine wrote:
The new AOSP major release android-16.0.0_r1 has at least one use of git-lfs, but I can't find any corresponding configuration for git-lfs in that repository branch. I'm expecting to find a .gitattributes file (to track while files use LFS) and a .lfsconfig file (to indicate where the LFS contents are stored).

Is this intended? Am I missing some configuration somewhere? What is the right way to resolve the LFS contents for this file and any others that may exist?
repo init xxx --git-lfs 
should checkout the real content of lfs. 

Michael Devine

unread,
Jul 9, 2025, 12:52:22 PM7/9/25
to Repo and Gerrit Discussion
That doesn't seem to be the case. I suspect that --git-lfs would work if there were proper LFS configuration, including .lfsconfig and .gitattributes, but I don't see how git-repo would resolve a pointer file without those configuration files.

$ repo init --manifest-url=https://android.googlesource.com/platform/manifest --manifest-branch=android-16.0.0_r1 --repo-url=<personal git-repo repository> --repo-rev="v2.54" --git-lfs --no-clone-bundle
$ repo sync
$ cat external/rust/android-crates-io/crates/android_bp/src/test_db.tar.xz
version https://git-lfs.github.com/spec/v1
oid sha256:faa09385f32d8b3e4518c14384b52ef94f6430da5a838307a2e0af2940b89608
size 1803816


Yingchun Li

unread,
Jul 10, 2025, 1:43:11 AM7/10/25
to Repo and Gerrit Discussion
On Thursday, July 10, 2025 at 12:52:22 AM UTC+8 Michael Devine wrote:
That doesn't seem to be the case. I suspect that --git-lfs would work if there were proper LFS configuration, including .lfsconfig and .gitattributes, but I don't see how git-repo would resolve a pointer file without those configuration files.

$ repo init --manifest-url=https://android.googlesource.com/platform/manifest --manifest-branch=android-16.0.0_r1 --repo-url=<personal git-repo repository> --repo-rev="v2.54" --git-lfs --no-clone-bundle
$ repo sync
$ cat external/rust/android-crates-io/crates/android_bp/src/test_db.tar.xz
Yes, that's strange, I also clone this repo and using `git lfs pull`, still cannot checkout the real content.
Maybe they didn't upload the real content to their lfs server.

Michael Devine

unread,
Jul 10, 2025, 12:38:14 PM7/10/25
to Repo and Gerrit Discussion
Thanks for trying this out Yingchun!

I think there's a deeper problem: they haven't told us where the LFS server is. Even if they have an LFS server, and they put the file on the server, if there isn't a .lfsconfig file, git-lfs won't be able to find it and fetch from it.

Michael Devine

unread,
Jan 16, 2026, 12:31:14 PM (2 days ago) Jan 16
to Repo and Gerrit Discussion
It looks like this might be a bug in the upstream repository. The project is available on github, and I've been able to find a raw file with a matching sha256 there. I've also filed a bug here: https://issuetracker.google.com/issues/476172414
Reply all
Reply to author
Forward
0 new messages