How to Build Android?

I want to Build Android. I build with deffault settings.
Uboot to compile successfully.
But I have some errors with Android.

my error:

out/target/common/obj/PACKAGING/system-api.txt:28599: error 5: Added public field android.provider.Settings.Global.WIFI_AP_ON
out/target/common/obj/PACKAGING/system-api.txt:28687: error 5: Added public field android.provider.Settings.Secure.WIFI_AP_ON
out/target/common/obj/PACKAGING/system-api.txt:28805: error 5: Added public field android.provider.Settings.System.WIFI_AP_ON
out/target/common/obj/PACKAGING/system-api.txt:37494: error 5: Added public field android.view.KeyEvent.KEYCODE_NETFLIX


You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:

  1. You can add “@hide” javadoc comments to the methods, etc. listed in the
    errors above.
  1. You can update current.txt by executing the following command:
    make update-api
  To submit the revised current.txt to the main Android repository,
  you will need approval.

make: *** [out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp] Error 38
make: *** Waiting for unfinished jobs…
make: *** [out/target/common/obj/PACKAGING/checksystemapi-current-timestamp] Error 38
out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/animation/PropertyValuesHolder.java:10: warning: [unchecked] Possible heap pollution from parameterized vararg type V
public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String propertyName, android.animation.TypeConverter<V, int[]> converter, android.animation.TypeEvaluator evaluator, V… values) { throw new RuntimeException(“Stub!”); }
^
where V is a type-variable:
V extends Object declared in method ofMultiInt(String,TypeConverter<V,int[]>,TypeEvaluator,V…)
out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/animation/PropertyValuesHolder.java:16: warning: [unchecked] Possible heap pollution from parameterized vararg type V
public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String propertyName, android.animation.TypeConverter<V, float[]> converter, android.animation.TypeEvaluator evaluator, V… values) { throw new RuntimeException(“Stub!”); }

make failed to build some targets (01:35:02 (hh:mm:ss))

What is the problem?

1 Like

Hi,davemf:
You can try to use below command:

$ make installclean
$ make update-api
$ make otapackage -jN

Thanks.

1 Like

Hi, terry!
Thanks!
I generate “update.img” with “make -jN otapackage”, after that I modified kernel and build Linux kernel separately “source device/khadas/kvim/mkern.sh”.
Please, tell me, how to generate “update.img” without “make -jN otapackage” after modify kernel?

1 Like

Hi,davemf:
You can use below command:

 # cd ~/project
 # ./vendor/amlogic/tools/aml_upgrade/aml_image_v2_packer -r 
out/target/product/kvim/upgrade/aml_upgrade_package.conf  out/target/product/kvim/upgrade out/target/product/kvim/update.img

The image ‘out/target/product/kvim/update.img’ you want to.

2 Likes

Please help. :slight_smile:

How to make menuconfig in kernel?
And after that, how to build kernel separately with new konfig?

1 Like

You can follow below steps to have a try:

$ cd <your-path-to-project>
$ make -jN -C common O=../out/target/product/kvim/obj/KERNEL_OBJ menuconfig ARCH=arm64 CROSS_COMPILE=$PREFIX_CROSS_COMPILE
$ source device/khadas/kvim/mkern.sh
2 Likes