Hi Everyone,
As far as I understand there is possibility run Android under crosvm on ChromiumOS. I checked openwrt under crosvm on ChromiumOS works fine.
Run Android 12 a pretty complicated has a lot of images vendor.img, system.img, product.img etc.
I tried to run Android 12 following:
./crosvm run --no-smt --cpus 4 --mem 8642 --balloon-bias-mib 48 --no-smt --delay-rt --per-vm-core-scheduling \
> --initrd /test/out/cuttlefish_assembly/vendor_ramdisk00 \
> --rwdisk /test/out/target/product/vsoc_x86_64/system.img \
> --rwdisk /test/out/target/product/vsoc_x86_64/vendor.img \
> --rwdisk /test/out/target/product/vsoc_x86_64/product.img \
> --socket=/tmp/vcrosvm.sock \
> --pstore=path=/test/out/cuttlefish_runtime.1/pstore,size=2097152 \
> --disable-sandbox --cid=3 \
> --serial=hardware=virtio-console,num=1,type=sink \
> --serial=hardware=virtio-console,num=2,type=sink \
> --serial=hardware=virtio-console,num=3,type=sink \
> --serial=hardware=virtio-console,num=4,type=sink \
> --serial=hardware=virtio-console,num=5,type=sink \
> --serial=hardware=virtio-console,num=6,type=sink \
> -p "androidboot.serialno=CUTTLEFISHCVD011 root=/dev/vda init=/init androidboot.hardware=bertha androidboot.container=1 androidboot.host_is_in_vm=1 androidboot.dev_mode=1 ramoops.record_size=262144 ramoops.console_size=262144 ramoops.ftrace_size=4096 ramoops.pmsg_size=4096 ramoops.dump_oops=1 squashfs.cached_blks=20 androidboot.fstab_suffix=f2fs" \
> /test/out/target/product/vsoc_x86_64/kernel
And faced with issue, full log attached, snippet below:
...
[ 0.991713] virtio_blk virtio6: [vda] 1932744 512-byte logical blocks (990 MB/944 MiB)
[ 0.992951] vda: detected capacity change from 0 to 989564928
[ 0.999361] virtio_blk virtio7: [vdb] 636304 512-byte logical blocks (326 MB/311 MiB)
[ 0.999952] vdb: detected capacity change from 0 to 325787648
[ 1.006905] virtio_blk virtio8: [vdc] 595568 512-byte logical blocks (305 MB/291 MiB)
[ 1.008122] vdc: detected capacity change from 0 to 304930816
...
[ 1.046247] printk: init: 108 output lines suppressed due to ratelimiting
[ 1.066298] init: [libfs_mgr]Error updating for slotselect
[ 1.066777] init: [libfs_mgr]ReadFstabFromFile(): failed to load fstab from : '/etc/recovery.fstab'
[ 1.068094] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[ 1.069329] init: Could not read default fstab
[ 1.070102] init: Could not find mount entry for /system
It seems /system mount point is placed on vda virtio_blk so the fstab should be specified to crosvm via --android-fstab <path to Android fstab> option something like was done for old Android version
https://android.googlesource.com/device/google/cuttlefish/+/bf9f2563bdddbf2fac3bed98120bcf6d8a578409/shared/config/gsi.fstab 1. Could you please confirm run Android 12 under crosvm on ChromiumOS is supported?
2. What is the format of the Android fstab file is required for --android-fstab option? If issue not here correct me please
Thanks,
Igor