10

For my thesis, I'm modifying the android framework and building the source (4.1.1 Jelly Bean). I can do a full build, but because this is very time consuming (I'm developing on a ubuntu 12.04 64bit virtual machine) I'd like to build separate modules.

For example: When doing changes to the location modules, it should be possible to just build the changed module, and make a new system image:

mmm frameworks/base
make snod

But this doesn't work. Every time I try to boot, the new system image won't boot because of:

I/dalvikvm( 1696): DexOpt: mismatch dep signature for '/system/framework/framework.odex'

After some research, I tried to disable dexpreopt with the enviroment variables

export $WITH_DEXPREOPT=false 

and

export $DISABLE_DEXPREOPT=true 

and doing a full rebuild with 'make installclean'. The full rebuild works, and the changes to the framework are present in the build. But after doing a new change, still 'mmm frameworks/base' and 'make snod' result in dexpreopt mismatch.

The build/core/makefile from 'make snod' also gives the warning: 'Warning: with dexpreopt enabled, you may need a full rebuild.', which comes from this line in the makefile:

ifeq (true,$(WITH_DEXPREOPT))
$(warning Warning: with dexpreopt enabled, you may need a full rebuild.)
endif

This leads me to believe the $WITH_DEXPREOPT variable isn't correctly set or read? So far I haven't been able to get a bootable system image without doing a clean full rebuild. Is the procedure I follow the correct to disable dexpreopt, or are there any other ways to build separate modules after doing changes to the framework and getting a new system image?

Build target is 'full-eng'.

4

1 回答 1

12

显然 WITH_DEXPREOPT 环境变量被内部 WITH_DEXPREOPT 变量覆盖

build/target/board/generic/BoardConfig.mk

将其更改为 false,或者根据 google 群组中的人员的说法,使用以下命令开始制作:

make showcommands WITH_DEXPREOPT=false

成功了。构建特定模块并制作新系统映像现在会生成可引导构建。

(来源:https ://groups.google.com/d/topic/android-building/vJCkg8Yq9Ic/discussion )

于 2012-10-31T08:00:45.490 回答