How to build the latest AOSP for VIM3, since Google no longer officially supports VIM3

Which Khadas SBC do you use?

**VIM3 Pro**

Which system do you use? Android, Ubuntu, OOWOW or others?

**Android**

Which version of system do you use? Khadas official images, self built images, or others?

**Self Build Images**

Please describe your issue below:

**How to build the latest AOSP for VIM3, since Google no longer officially supports VIM3 any more.**

First you need to download the source code and build Android. This will take a few hours as the Android project is very large.

// Download AOSP source code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-12.0.0_r7
$ repo sync -j16
//  Build Command(VIM3):
$ source build/envsetup.sh
$ lunch yukawa-userdebug
$ make TARGET_USE_TABLET_LAUNCHER=true TARGET_VIM3=true TARGET_KERNEL_USE=5.4

Then on your board (flashed with this image) type the following command.

kvim3#fastboot

This will start a fastboot session between your computer and the board.

Then move back to the host device and check that the device is visible. You might have to use sudo for this command

$ fastboot devices
1234567890	fastboot

Now we want to prepare the bootloader for our new android image. Your board should be in upgrade mode for this step.

$ cd <path-to-aosp>/device/amlogic/yukawa/bootloader/
$ ./tools/update write u-boot_kvim3_noab.bin 0xfffa0000 0x10000
$ ./tools/update run 0xfffa0000
$ ./tools/update bl2_boot u-boot_kvim3_noab.bin

After these commands run your board will automatically open up a fastboot session. These commands do a little tidying of the vim3 board

$ fastboot oem format
$ fastboot flash bootloader u-boot_kvim3_noab.bin
$ fastboot erase bootenv
$ fastboot reboot bootloader

Finally navigate to /out/target/product/yukawa and flash the partition images. You might have to run fastboot flashing unlock on your computer before flashing.

$ fastboot flash boot boot.img
$ fastboot flash super super.img
$ fastboot flash cache cache.img
$ fastboot flash userdata userdata.img
$ fastboot flash recovery recovery.img
$ fastboot flash dtbo dtbo-unsigned.img
1 Like

This is just from the info I’ve seen. No clue if it is official.

Please check here, VIM3 support is back.

https://source.android.com/docs/setup/create/devices

1 Like

Thank you guys. I’ll try this.