Open joneschrisg opened 12 years ago
Another solution is to override BUILD_XXX variables in build/core/config.mk. Content of these variables are pathes to makefiles in build/core/. We only need to create noop makefiles which creates noop module for Android, and assign their path to BUILD_XXX varaibles. Then, build system of android would do nothing for Java packages and libraries.
It seems work to override BUILD_XXX variables fro me, but some modules would define rules by them-self. Most of modules having customized rules can be override by LOCAL_OVERRIDES_PACKAGES variable to stop them from being built. But, host tools that will not be installed to target system can not be override. I am finding another solution for host tools.
https://github.com/ThinkerYzu/android-build/tree/decaf-noop-mk This is the branch for my efforts on decaf tasks. I have overrode BUILD_XXX variables in config.mk, and change attributes of some modules at run-time. It make |make gonk| faster by taking 1m35s. But, it does not boot correctly. Mediaserver does not run. Does mediaserver need dalvik to help him?
After clobbering my working directory, the problem have been fixed. But, audio seems broken. Dialer does not play tones. After check logcat, I believe it is about audio_policy. I remember dialer does not play tones, too, at beginning. It is also about audio_policy. I think @philikon or @qdot may know what is happened.
I have shifted to another more flexible and less impacted way (I think so). Instead of rewrote BUILD_XXX, I let building system works as normal. After building system having found all Android.mk and loaded them, the code that I have added would look into ALL_MODULES and relative variables. Building system decides what targets should be built according these variables. The code would remove all targets with Java to prevent them from being built. It seems works fine for me. The only one exception is droiddoc targets, they don't generate modules. They are handled by rewriting BUILD_XXX.
It is very similar to #123 the audio policy issue that I have mentioned.
@michaelwu found that a maguro fix for mediaserver broken the sgs2. So your patches didn't cause that.
First step in Operation Decaf. I would hope we can achieve this with steps something like