Build android framework resources

11,128

Hope this helps you:Building, running & debugging Android source

Share:
11,128

Related videos on Youtube

nbarraille
Author by

nbarraille

;

Updated on June 04, 2022

Comments

  • nbarraille
    nbarraille almost 2 years

    I'm trying to build a custom Android image from the Open Source repo, and make changes inside the android base framework code (both resource and Java code changes), and I have a couple of questions about how to build my changes without having to clean and rebuild the whole system.

    My understanding of it, was that I could just do mmm frameworks/base after making my changes, and that would automatically rebuild the framework-res.apk and framework.jar in out/target/product/<my-config>/system/framework/.

    But it looks like mmm frameworks/base doesn't do anything. I have to manually do mmm frameworks/base/core/res in order for the framework-res.apk to be compiled and then redo mmm frameworks/base to recompile the JAR.

    Is that normal? Why doesn't mmmframeworks/baserecompile everything? Plus, the/out/target/common/R/com/android/internal/R.javafile that is used by Eclipse to locate the resources is never re-generated unless I do a wholemake clobber; makewhich takes forever. How can I simply re-generate theR.java` file.

    Additional question: I wanted to add some third-party APKs to my ROM, I placed them in /vendor/<vendor-name>/ along with a Android.mk file that I include from my main mk script. The apks are copied over to /out/target/product/<my-config>/system/app, but are not included in the system.img image. Why is that?

    • EyalBellisha
      EyalBellisha about 11 years
      That's normal behaviour. Sometimes you only want frameworks/base/services/java to be compiled so I compile it on its own. Use "mmm frameworks/base/core/res snod" if you don't want to run the command twice.