Booting a linux file system with crosvm
provided in android. ( experiment )
# ~2GB size
dd if=/dev/zero of=udroid_image.ext4.img bs=1M count=2000
# format to ext4
mkfs.ext4 udroid_image.ext4.img
# mount the formated image
mkdir udroid_image
sudo mount -o loop udroid_image.ext4.img udroid_image
# download a tarball
wget https://github.com/RandomCoderOrg/udroid-download/releases/download/V3R77/jammy-gnome-arm64.tar.gz
# extract to image dir and unmount it
sudo tar -xvpf jammy-gnome-arm64.tar.gz -C udroid_image
# resolve some dir's (just in case)
mkdir -pv udroid_image/{dev,proc,sys}
## setup root password
cd udroid_image
sudo mount -t sysfs /sys sys/
sudo mount -t proc /proc proc/
sudo mount -o bind /dev dev/
sudo chroot ../udroid_image
# set your password
passwd root
# then exit the chroot
exit
# unmount
sudo umount sys
sudo umount proc
sudo umount dev
# finally umount dir
cd ..
sudo umount udroid_image
# push image to android
adb
cd /apex/com.android.virt@2/bin
./crosvm run --disable-sandbox --block /data/local/tmp/udroid-noble.img,root -p 'root=/dev/vda' /data/local/tmp/Image
with network ( not working rn - need help )
./crosvm run --disable-sandbox --net tap-name=crosvm_tap --block /data/local/tmp/udroid-noble.img,root -p 'root=/dev/vda' /data/local/tmp/Image
New find:/dev/kvm
is exposed for read writes for everyone excepth usersUpdate
Its not working, only option to boot is crosvm now