The question is published on by Tutorial Guruji team.
I want to get package source code base on package name, eg
I know it could filter by grep
LOCAL_PACKAGE_NAME. but the AOSP source was too large.
Is it any build system command could list all package name and path?
. build/envsetup.sh # Show list of modules for the selected configuration. lunch m modules # Grep for your module. mgrep <module>
. build/envsetup.sh you can use
mgrep to only grep build configuration files.
Be aware, that Android currently uses two build configuration types in parallel. The old makefile type files (
Android.mk) will contain
LOCAL_PACKAGE_NAME. However, the new Soong module files (
Android.bp) have a different syntax. You better grep for the module name and not for
You can use
m modules to get a list of all modules known to the build system. This command requires you to run
lunch first. Also the list returned by
m modules will only contain the modules that are selected by the