Android AOSP make target

54 篇文章 0 订阅
27 篇文章 1 订阅

Refer to https://elinux.org/Android_Build_System

Refer to https://android.googlesource.com/platform/build/+/master/core/Makefile

Make targets

Here is a list of different make targets you can use to build different parts of the system:

  • make sdk - build the tools that are part of an SDK (adb, fastboot, etc.)
  • make snod - build the system image from the current software binaries
  • make services
  • make runtime
  • make droid - make droid is the normal build.
  • make all - make everything, whether it is included in the product definition or not
  • make clean - remove all built files (prepare for a new build). Same as rm -rf out/<configuration>/
  • make modules - shows a list of submodules that can be built (List of all LOCAL_MODULE definitions)
  • make <local_module> - make a specific module (note that this is not the same as directory name. It is the LOCAL_MODULE definition in the Android.mk file)
  • make clean-<local_module> - clean a specific module
  • make bootimage TARGET_PREBUILT_KERNEL=/path/to/bzImage - create a new boot image with custom bzImage

Helper macros and functions

There are some helper macros and functions that are installed when you source envsetup.sh. They are documented at the top of envesetup.sh, but here is information about a few of them:

  • hmm - List this help text
  • lunch <product_name>-<build_variant> - Load product & build variant config (driver files, device specific configs, etc).
  • tapas [<App1> <App2> ...] [arm|x86|mips|armv5|arm64|x86_64|mips64] [eng|userdebug|user] - command is for building unbundled apps. If you don't supply a build variant, it defaults to eng.
  • provision - Flash device with all required partitions. Options will be passed on to fastboot.

Build Macros and functions

  • croot - change directory to the top of the tree
  • m - execute 'make' from the top of the tree (even if your current directory is somewhere else)
  • mm - builds all of the modules in the current directory
  • mmm <dir1> ... - Builds all of the modules in the supplied directories, but not their dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2.
  • mma - Builds all of the modules in the current directory, and their dependencies.
  • mmma <dir1> ... - Builds all of the modules in the supplied directories, and their dependencies.

Grep macros and functions

  • cgrep <PATTERN> Greps on all local C/C++ files.
  • ggrep <PATTERN> Greps on all local Gradle files.
  • jgrep <PATTERN> Greps on all local Java files.
  • resgrep <PATTERN> Greps on all local res/*.xml files.
  • mangrep <PATTERN> Greps on all local AndroidManifest.xml files.
  • mgrep <PATTERN> Greps on all local Makefiles files.
  • sepgrep <PATTERN> Greps on all local sepolicy files.
  • sgrep <PATTERN> Greps on all local source files.
  • godir <filename> Go to the directory containing a file
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值