VIM3 can't boot after flashing the image built from AOSP head

That Android code is the official open-source AOSP (Android Open Source Project) code in https://cs.android.com/android/platform/superproject/main/+/main. And The VIM3 device specific code is here https://cs.android.com/android/platform/superproject/main/+/main:device/amlogic/yukawa/.

The AOSP main branch is the trunk development branch for the next dessert release, so the HEAD on the main branch is newer than any Android U releases.

From the log below, it looks like the Baylibre gerrit is using the Android 14 r15 release:

➜  khadas-aosp-14 repo init -u https://gitlab.baylibre.com/baylibre/amlogic/atv/aosp/manifest.git -b yukawa-android-14 --depth=1
Downloading Repo source from https://gerrit.googlesource.com/git-repo
You are automatically enrolled in Git submodules experiment (go/android-submodules-quickstart) for another two weeks.

NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
/usr/local/google/home/wgtdkp/khadas-aosp-14/.repo/exp-superproject/925043f706ba64db713e9bf3b55987e2-superproject.git: Performing initial setup for superproject; this might take several minutes.
warning: git update of superproject  failed, repo sync will not use superproject to fetch source; while this error is not fatal, and you can continue to run repo sync, please run repo init with the --no-use-superproject option to stop seeing this warning

Your identity is: Kangping Dong <wgtdkp@google.com>
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /usr/local/google/home/wgtdkp/khadas-aosp-14
➜  khadas-aosp-14 repo sync -j96
You are currently enrolled in Git submodules experiment (go/android-submodules-quickstart).  Use --no-use-superproject to override.

NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
repo superproject branch: android-14.0.0_r15 url: https://android.googlesource.com/platform/superproject warning: git fetch call failed, command: git ['fetch', 'https://android.googlesource.com/platform/superproject', '--depth', '1', '--force', '--no-tags', '--filter', 'blob:none', 'android-14.0.0_r15:android-14.0.0_r15'], return code: 128, stderr: fatal: couldn't find remote ref android-14.0.0_r15

Android Android 14 r15 is released in Sep 2023, it’s pretty old and doesn’t include my feature. See here refs/tags/android-14.0.0_r15 - platform/frameworks/base - Git at Google

Okay, I will inquire about baylibre and get back to you.

I found a paused PR on baylibre: Prepare gerrit on aosp (!3) · Merge requests · BayLibre / amlogic / Android TV / aosp / device / amlogic / yukawa · GitLab

Supposed this needs to be merged into AOSP to support VIM3 from there?

There are 2 sources for VIM3:

  1. BayLibre provided (stable) Android 14:
    Welcome to khadas-android-14’s documentation! — khadas-android-14 documentation
    is owned by BayLibre. We push code there and try to make a stable
    Android 14 for VIM3.

  2. Google’s AOSP (googlesource)

repo init -c -u platform/manifest - Git at Google -b main

Is owned by Google. We don’t have any code ownership there. Maxime
(in cc) is working on sending some changes we made to Google to see how
they respond.

Hope that helps

The above is BayLibre’s response regarding the main branch
For the latest Android version, the main branch no longer works, and the reason why the old part you used before can be used is because of this

@xiong.zhang Thanks for your coordination!

Please add me in any CLs sent to aosp/ (my email is wgtdkp@google.com). I can help you push the google guys to merge the CLs.

And kindly let me know when should I expect that CLs will be sent?

Hi @xiong.zhang Is there an update on this?

I will let you know if there is any new news

@xiong.zhang 你好,我下载了vim3完整的固件。https://dl.khadas.com/products/vim3/firmware/android/vim3-u-aosp-v240613.rar.xz
并在ubuntu下按照您的教程刷完了所有的步骤。日志如楼主所术。
但我不知道这几步在哪里操作

setenv force_avb 1
saveenv

现在接着电视开机有反应,日志大概刷到start kernel 。。。后黑屏。不确定是不是哪里有问题。是不是最后这个setenv没有执行的原因。

刷机日志如下

➜  main-aosp-2 sudo ~/myvenv/bin/boot-g12.py ${BOOTLOADER_NAME}
[sudo] password for wgtdkp: 
/usr/local/google/home/wgtdkp/myvenv/bin/boot-g12.py:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing device/amlogic/yukawa/bootloader/u-boot_kvim3_noab.bin at 0xfffa0000...
[DONE]
Running at 0xfffa0000...
[DONE]
AMLC dataSize=16384, offset=65536, seq=0...
[DONE]
AMLC dataSize=49152, offset=393216, seq=1...
[DONE]
AMLC dataSize=16384, offset=229376, seq=2...
[DONE]
AMLC dataSize=49152, offset=245760, seq=3...
[DONE]
AMLC dataSize=49152, offset=294912, seq=4...
[DONE]
AMLC dataSize=16384, offset=65536, seq=5...
[DONE]
AMLC dataSize=1135472, offset=81920, seq=6...
[DONE]
[BL2 END]
➜  main-aosp-2 fastboot oem format
fastboot flash bootloader ${BOOTLOADER_NAME}
fastboot erase bootenv
fastboot reboot bootloader
OKAY [  0.172s]
Finished. Total time: 0.172s
Warning: skip copying bootloader image avb footer (bootloader partition size: 0, bootloader image size: 1217392).
Sending 'bootloader' (1188 KB)                     OKAY [  0.060s]
Writing 'bootloader'                               OKAY [  0.118s]
Finished. Total time: 0.245s
Erasing 'bootenv'                                  OKAY [  0.013s]
Finished. Total time: 0.079s
Rebooting into bootloader                          OKAY [  0.006s]
Finished. Total time: 0.106s
➜  main-aosp-2 fastboot devices
C863147585CE	 Android Fastboot
➜  main-aosp-2 adb devices
List of devices attached
41101FDAP0008F	device

➜  main-aosp-2 fastboot lsusb
fastboot: usage: unknown command lsusb
➜  main-aosp-2 cd out/target/product/yukawa
➜  yukawa 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
fastboot reboot
Sending 'boot' (32768 KB)                          OKAY [  1.505s]
Writing 'boot'                                     OKAY [  1.734s]
Finished. Total time: 3.264s
Sending sparse 'super' 1/14 (114684 KB)            OKAY [  5.285s]
Writing 'super'                                    OKAY [  6.239s]
Sending sparse 'super' 2/14 (112052 KB)            OKAY [  5.188s]
Writing 'super'                                    OKAY [  6.186s]
Sending sparse 'super' 3/14 (114684 KB)            OKAY [  5.314s]
Writing 'super'                                    OKAY [  6.305s]
Sending sparse 'super' 4/14 (114684 KB)            OKAY [  5.376s]
Writing 'super'                                    OKAY [  6.191s]
Sending sparse 'super' 5/14 (107304 KB)            OKAY [  5.000s]
Writing 'super'                                    OKAY [  5.825s]
Sending sparse 'super' 6/14 (114684 KB)            OKAY [  5.337s]
Writing 'super'                                    OKAY [  6.199s]
Sending sparse 'super' 7/14 (109200 KB)            OKAY [  5.101s]
Writing 'super'                                    OKAY [  5.994s]
Sending sparse 'super' 8/14 (114684 KB)            OKAY [  5.376s]
Writing 'super'                                    OKAY [  6.340s]
Sending sparse 'super' 9/14 (114684 KB)            OKAY [  5.328s]
Writing 'super'                                    OKAY [  6.229s]
Sending sparse 'super' 10/14 (114684 KB)           OKAY [  5.409s]
Writing 'super'                                    OKAY [  6.302s]
Sending sparse 'super' 11/14 (114368 KB)           OKAY [  5.344s]
Writing 'super'                                    OKAY [  6.148s]
Sending sparse 'super' 12/14 (114685 KB)           OKAY [  5.330s]
Writing 'super'                                    OKAY [  6.776s]
Sending sparse 'super' 13/14 (114684 KB)           OKAY [  5.350s]
Writing 'super'                                    OKAY [  6.569s]
Sending sparse 'super' 14/14 (67708 KB)            OKAY [  3.189s]
Writing 'super'                                    OKAY [  3.706s]
Finished. Total time: 157.055s
Warning: skip copying cache image avb footer due to sparse image.
Sending 'cache' (56 KB)                            OKAY [  0.022s]
Writing 'cache'                                    OKAY [  0.033s]
Finished. Total time: 0.087s
Warning: skip copying userdata image avb footer due to sparse image.
Sending 'userdata' (128 KB)                        OKAY [  0.026s]
Writing 'userdata'                                 OKAY [  0.042s]
Finished. Total time: 0.102s
Sending 'recovery' (32768 KB)                      OKAY [  1.547s]
Writing 'recovery'                                 OKAY [  1.697s]
Finished. Total time: 3.281s
Sending 'dtbo' (7 KB)                              OKAY [  0.020s]
Writing 'dtbo'                                     OKAY [  0.018s]
Finished. Total time: 0.070s
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 0.100s

在启动过程中,连接到串行端口并按住 Enter 键进入。输入以下命令,然后重新启动以设置启动

这一步我没有太明白,如何连接到串行端口?有说明文档吗

不过我刚才又刷了一遍系统,发现最后一步不执行也可以。这个系统对显示器要求可能比较高,我接在我的dell显示器上可以正常进桌面。电视上不行。黑屏了。

但是存储好像有问题,emmc没有识别。这存储感觉怎么是内存的大小。

而且遥控器应该是不能响应,需要接鼠标操作。

adb shell 可以进机器正常操作,但是setenv命令也是没有的。

总结这个14的系统可能不适合电视使用。

这个Android 14是用来体验的,很多功能并不支持或者使用