sabato 13 ottobre 2012

Compiling Android sub-packages

This should be a really obvious question for an Android modder but I think it's better to explain how to compile sub-packages in the android source tree when doing some modifications to them.

This should be done when the whole source tree is already built.

Go in the Android source root dir and launch:

source build/envsetup.sh

Now you are ready to compile sub-packages.
A sub-package can be identified by the presence of an Android.mk file.
Android.mk files are particular makefiles that are interpreted by the Android build system.

If, for example, we want to recompile the SettingsProvider base package we only need to :

  1. cd frameworks/base/packages/SettingsProvider
  2. mm -B

The "-B" option will force the re-compilation of the whole package. If you only need to recompile just only the files you have modified then use simply "mm".

Compiled packages will be placed in the out directory, in this case the SettingsProvider.apk file will be placed in your custom /system/app/ folder.

Nessun commento:

Posta un commento