Hi Julian,
My build/envsetup.sh also searches for build/make/core/envsetup.mk, but in
my case, both build/make/core/envsetup.mk and build/core/envsetup.mk exist
in the source tree.
[image: image.png]
So I’m thinking maybe some issues occurred during the repo init/sync
process?
Fyi, this is the results when I asked Gemini about my theory, maybe you can
try?
Q: I’ve just pulled AOSP source code (android-latest) but it’s missing
build/make/core/envsetup.mk
Gemini: If build/make/core/envsetup.mk is absent, it usually points to an
issue with how the repo was initialized or synced, rather than a bug in the
source code itself.
Here are the most likely reasons and how to fix them:
1.
Incomplete Sync (repo sync) The most common culprit is a network
interruption or a timeout during the repo sync process. Because AOSP
consists of hundreds of individual Git repositories, it’s easy for one
project (in this case, the build/make project) to fail silently.
-
The Fix: Run the sync again, but specifically target the missing
project to save time:
repo sync -j8 build/make
If that doesn’t work, try a “force-sync”:
repo sync -d --force-sync
2.
Shallow Clone Issues If you initialize your repo using the --depth=1
flag to save space or time, the sync is much more fragile. Sometimes
specific files or history links aren’t pulled correctly if the manifest has
complex dependencies.
- The Fix: If you used a shallow clone, try deepening the history or
re-syncing without the depth flag for that specific repository.
3.
Missing Submodules or Wrong Branch You mentioned android-latest. If you
didn’t specify a stable release tag (like android-14.0.0_rXX), you might be
tracking a development branch that is currently in a “broken” state or
undergoing a major restructuring.
-
Check your branch:
repo info build/make
Ensure it is actually tracking the branch you expect.
4.
Case-Sensitivity (macOS Users) If you are building on a Mac and didn’t
create a case-sensitive disk image (sparse bundle), the build system will
behave unpredictably. While envsetup.mk is lowercase, other parts of the
build system rely on case sensitivity, and errors here often manifest as
“missing” files because the internal pathing fails.
How to Verify the File Path In the android-latest structure, verify the
file exists locally by navigating directly to the subdirectory:
1. Go to your AOSP root.
2. Navigate to: cd build/make/core/
3. Run ls -l envsetup.mk
If the directory build/make is empty or doesn’t exist: Your repo init
didn’t map the projects correctly. You should check your .repo/manifest.xml
to ensure the build/make project is defined.
Sincerely,
Doan Pham - an Android-enthusiast passing by
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/android-building/CANha3f75ge2ii%3D2AOdpbBqLQpFNQfMyA-zF0X-ajxH%3D%3Dox9TvA%40mail.gmail.com.