One step away from running Android 9 on the jetson nano

I’ve tried to boot Android 9 with the image provided by Tango and at least it boots with a little modification :

#!/bin/sh -e

if [ -n "1" ]; then INSTANCE_ID=(printf “%02d” 1) INSTANCE_DIR=run-{INSTANCE_ID}
mkdir -p ${INSTANCE_DIR}
shift
else
echo “Must specify instance id”
exit 1
fi

ANDROID_IMAGE_PATH=./

QEMU_ARCH=$(arch)

WIDTH=480
HEIGHT=800

#QEMU_DISPLAY="-device virtio-gpu-pci,virgl=on,xres={WIDTH},yres={HEIGHT} -display gtk,gl=on"
#QEMU_DISPLAY="-device virtio-gpu-pci,virgl=on,xres={WIDTH},yres={HEIGHT} -display egl-headless,gl=on"
QEMU_DISPLAY="-device virtio-gpu-pci,virgl=on,xres={WIDTH},yres={HEIGHT} -display sdl,gl=on"

QEMU_DISPLAY="{QEMU_DISPLAY} -vnc :{INSTANCE_ID}"

QEMU_OPTS="-machine virt,gic-version=host -cpu host -smp 4 -enable-kvm"
KERNEL_CMDLINE=“console=ttyAMA0,38400 video={WIDTH}x{HEIGHT}”
KERNEL=Image

if [ ! -f {INSTANCE_DIR}/cache.raw -o system.raw -nt {INSTANCE_DIR}/cache.raw ]; then
rm -f {INSTANCE_DIR}/*.raw mkfs.ext4 -L cache {INSTANCE_DIR}/cache.raw 1G
mkfs.ext4 -L data ${INSTANCE_DIR}/userdata.raw 4G
fi

qemu-system-{QEMU_ARCH} \ {QEMU_OPTS}
-append "{KERNEL_CMDLINE} vt.global_cursor_default=0 androidboot.selinux=permissive debug drm.debug=0" \ -m 2048 \ -kernel {ANDROID_IMAGE_PATH}/KERNEL \ -initrd {ANDROID_IMAGE_PATH}/ramdisk.img
-drive index=0,if=none,format=raw,id=system,file=system.raw,readonly=on
-device virtio-blk-pci,drive=system
-drive index=1,if=none,format=raw,id=cache,file={INSTANCE_DIR}/cache.raw \ -device virtio-blk-pci,drive=cache \ -drive index=2,if=none,format=raw,id=userdata,file={INSTANCE_DIR}/userdata.raw
-device virtio-blk-pci,drive=userdata
-netdev user,id=mynet,hostfwd=tcp::54${INSTANCE_ID}-:5555 -device virtio-net-pci,netdev=mynet
-device virtio-mouse-pci -device virtio-keyboard-pci
-d guest_errors
-nodefaults
-serial mon:stdio
{QEMU_DISPLAY} \ *

but its not usable. The error that u see does not go away :


We don’t have experience to run Android on Jetson platform, may other developers help to provide suggestions.

Hi,
Let us know if you have succeeded in this. Also would be good if you can share the links to the Android images. Thanks

Try using “adb shell service call bluetooth_manager 8” to disable the bluetooth service which is crashing. You may need to run the command multiple times times since it doesn’t always work. Also I would like to point out that our Android 9 image isn’t really supported any more. It’s also quite broken and many apps don’t work on it. The proper way to run Android would be to use the Android emulator which has recently added support for arm64 (but which I haven’t managed to get working).

Amanieu d’Antras