aosp 为什么某些目录没有编译_Android AOSP 单独编译某一模块

在AOSP项目中,如果只需要修改特定模块,如设置应用,不需要完整编译。通过source build/envsetup.sh获取命令权限,使用mmm命令编译指定目录,如mmm packages/apps/Settings/。完成编译后,使用make snod生成system.img,用emulator -wipe-data启动模拟器以确保修改生效。
摘要由CSDN通过智能技术生成

由于AOSP 项目太大,我只修改了一个模块,比如设置。

那么只需要单独编译设置这个模块就可以了。

首先执行Source:

source build/envsetup.sh

执行之后,就会有一些额外的命令可以使用:

- croot: Changes directory to the top of the tree.

- m: Makes from the top of the tree.

- mm: Builds all of the modules in the current directory.

- mmm: Builds all of the modules in the supplied directories.

- cgrep: Greps on all local C/C++ files.

- jgrep: Greps on all local Java files.

- resgrep: Greps on all local res/*.xml files.

- godir: Go to the directory containing a file.

这些命令的具体用法,可以在命令的后面加-help来查看,这里我们只关注mmm命令,也就是可以用它来编译指定目录的所有模块,通常这个目录只包含一个模块。

修改设置apk

设置apk 的项目在aosp/packages/apps/Settings下,我们在里面加上一个toast.

修改之后,lunch 一下

lunch

然后指定自己编译的模块

接着,使用mmm命令来编译指定的模块,例如系统的设置应用程序&#x

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值