Home > Mobile >  How to list all possible packages / modules in AOSP via command line?
How to list all possible packages / modules in AOSP via command line?

Time:01-29

In AOSP, I often use the following to setup my environment and build target and build the entire image:

$ cd ~/aosp
$ source build/envsetup.sh
$ lunch sdk_phone_x86_64
$ m

I also like to use the following to build a specific package/module instead of the entire image:

$ m <my package>

or

$ cd <path_to_package>
$ mm 

Is there a way to simply list all possible packages/modules in all of AOSP? Similar to how running lunch displays all possible targets, I'm interested in seeing a list of all possible packages/modules (e.g. defined in Android.bp and Android.mk).

Follow up question: given a package/module name, is there a way to get the directory or path to the file that defines it?

CodePudding user response:

build/make/envsetup.sh has define the shell function:

- allmod:     List all modules.
- pathmod:    Get the directory containing a module.
  • Related