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
3 Likes