@tenk.wang
I find Android 12 AOSP.
The UART port not /dev/ttyS1 (VIM3 PIN ),or /dev/ttyS3.
Mapping to VIM3 PIN 14 ~ PIN 19
But the UART port is dev/tty in Android 12 AOSP.
Do you know how to modify the mapping table ?
Or I only use dev/tty this port . I can not use dev/ttyS1 or ttyS3 in android 12?
I have do the experiment.
ex :
VIM3 Android
Echo “A” > /dev/tty
echo A
Echo “A” > /dev/ttyS3
no echo
Echo “A” > /dev/ttyS1
no echo
Android AOSP 12 第二組uart 的設定方法:
修改
…/…/android/hikey-linaro/arch/arm64/boot/dts/amlogic
File : meson-khadas-vim3.dtsi

重新編輯kernel code .
更換編輯好的kernel image
Image.lz4 , meson-g12b-a311d-khadas-vim3.dtb , meson-g12b-a311d-khadas-vim3-android.dtb

Kernel 編輯SOP 可以參考
https://source.android.google.cn/setup/build/devices?hl=zh-cn
然後重新compile整包AOSP code.
然後置換boot.img. (…/out/target/product/yukawa)
adb reboot bootloader
fastboot flash boot boot.img
更新好後
進device 內
adb shell
cd /dev
ls
可以看到ttyAML3 (這個部份就是之前設定的Uart3)

Android AOSP 12 目在VIM3 的配置
PIN 17~ 19 → ttyAML0
PIN 14~ 16 → ttyAML3
