Skip to content

addpkg(root): crosvm, addpkg(main): libandroid-fexecve#29792

Open
truboxl wants to merge 4 commits into
masterfrom
crosvm
Open

addpkg(root): crosvm, addpkg(main): libandroid-fexecve#29792
truboxl wants to merge 4 commits into
masterfrom
crosvm

Conversation

@truboxl
Copy link
Copy Markdown
Member

@truboxl truboxl commented May 15, 2026

Close #19194

Untested

Comment thread packages/libandroid-fexecve/fexecve.c
@robertkirkman
Copy link
Copy Markdown
Member

I tried to test it with this command on one of my devices, and I saw this error first:

1|:/data/data/com.termux/files/home # crosvm run vmlinuz                                                                                
[2026-05-17T06:38:07.435853810+00:00 INFO  crosvm::crosvm::sys::linux] crosvm entering multiprocess mode
[2026-05-17T06:38:07.467433820+00:00 ERROR crosvm] exiting with error 1: "/var/empty" is not a directory, cannot create jail

After I tried to bypass that error, I saw this:

Program received signal SIGABRT, Aborted.
0x00007ffff56bc69f in abort () from /apex/com.android.runtime/lib64/bionic/libc.so
(gdb) bt
#0  0x00007ffff56bc69f in abort () from /apex/com.android.runtime/lib64/bionic/libc.so
#1  0x000055555700037a in do_fatal_log (priority=priority@entry=3, 
    format=format@entry=0x5555558e3245 "libminijail[%d]: clone(CLONE_NEWPID | ...) failed: %m")
    at /data/data/com.termux/files/home/.termux-build/crosvm/src/third_party/minijail/util.c:173
#2  0x0000555556ffb388 in minijail_run_internal (j=0x7fff0d4a9850, config=config@entry=0x7ffffffdb820, 
    state_out=state_out@entry=0x7ffffffdb7b0)
    at /data/data/com.termux/files/home/.termux-build/crosvm/src/third_party/minijail/libminijail.c:3829
#3  0x0000555556ffa2a2 in minijail_run_config_internal (j=0x53c1, config=0x53c1, config@entry=0x7ffffffdb820)
    at /data/data/com.termux/files/home/.termux-build/crosvm/src/third_party/minijail/libminijail.c:4135
#4  0x0000555556ffa860 in minijail_fork (j=0x53c1)
    at /data/data/com.termux/files/home/.termux-build/crosvm/src/third_party/minijail/libminijail.c:3689
#5  0x0000555556feb146 in minijail::Minijail::fork_remap (self=0x7ffffffdc670, inheritable_fds=...)
    at third_party/minijail/rust/minijail/src/lib.rs:1023
#6  0x0000555556febf8d in minijail::Minijail::fork (self=0x7ffffffdc670, inheritable_fds=...)
    at third_party/minijail/rust/minijail/src/lib.rs:979
#7  0x0000555556237360 in jail::fork::fork_process<devices::proxy::{impl#1}::new::{closure_env#0}<alloc::boxed::Box<dyn devices::pci::pci_device::PciDevice, alloc::alloc::Global>>> (jail=..., keep_rds=..., debug_label=..., post_fork_cb=...) at jail/src/fork.rs:101
#8  0x00005555561e69f0 in devices::proxy::ChildProcIntf::new<alloc::boxed::Box<dyn devices::pci::pci_device::PciDevice, alloc::alloc::Global>> (device=..., jail=..., keep_rds=...) at devices/src/proxy.rs:375
#9  0x00005555561e4525 in devices::proxy::ProxyDevice::new<alloc::boxed::Box<dyn devices::pci::pci_device::PciDevice, alloc::alloc::Global>> (device=..., jail=..., keep_rds=...) at devices/src/proxy.rs:452
#10 0x000055555622ed7f in arch::generate_pci_root (devices=..., irq_chip=..., mmio_bus=..., mmio_base=..., mmio_register_bit_num=12, 
    io_bus=..., resources=0x7ffffffedbd0, vm=..., max_irqs=4, vcfg_base=...) at arch/src/lib.rs:1257
#11 0x000055555616fff6 in x86_64::{impl#2}::build_vm (components=..., arch_memory_layout=0x7fffffff3310, vm_evt_wrtube=0x7ffffffedb98, 
    system_allocator=0x7ffffffedbd0, serial_parameters=0x7fffffff4138, serial_jail=..., battery=..., vm=..., ramoops_region=..., 
    devs=..., irq_chip=..., vcpu_ids=0x7fffffff0e80, dump_device_tree_blob=..., debugcon_jail=..., pflash_jail=..., fw_cfg_jail=..., 
    guest_suspended_cvar=..., device_tree_overlays=..., _fdt_position=..., _no_pmu=false) at x86_64/src/lib.rs:1113
#12 0x0000555555f3689b in crosvm::crosvm::sys::linux::run_vm (cfg=..., components=..., arch_memory_layout=0x7fffffff3310, vm=..., 
    irq_chip=..., ioapic_host_tube=...) at src/crosvm/sys/linux.rs:2487
#13 0x0000555555f3a263 in crosvm::crosvm::sys::linux::run_kvm (device_path=..., cfg=..., components=...) at src/crosvm/sys/linux.rs:2006
#14 0x0000555555f14622 in crosvm::crosvm::sys::linux::run_config (cfg=...) at src/crosvm/sys/linux.rs:2133
#15 0x0000555555e47a1a in crosvm::run_vm (cmd=..., log_config=...) at src/main.rs:175
#16 0x0000555556099a5d in crosvm::crosvm_main<std::env::Args> (args=...) at src/main.rs:804
#17 0x0000555555e46ec5 in crosvm::main () at src/main.rs:924

I can't confirm whether the issues I'm seeing are because of this crosvm, or because of a misconfiguration of my device or the commands I'm trying to use. Unfortunately I have never tried to use virtual machines on Android before.

I have used crosvm and QEMU/KVM on desktop PC and they work for me there, but using standard builds on GNU/Linux on PC, which is already set up to be intended for running VMs.

This is what I see from the same command on a GNU/Linux device with GNU/Linux crosvm:

tacokoneko@CORSAIR /mnt/Storage2/code2/images2/crosvm $ target/debug/crosvm run vmlinuz 
syslog init failed: guess of fd for syslog connection was invalid
syslog init failed: guess of fd for syslog connection was invalid
[2026-05-17T08:23:30.980758091+00:00 INFO  crosvm::crosvm::sys::linux] crosvm entering multiprocess mode
[2026-05-17T08:23:30.994997395+00:00 INFO  devices::sys::linux::acpi] Listening on acpi_mc_group of acpi_event family
[2026-05-17T08:23:31.005760496+00:00 INFO  x86_64] Loaded bzImage kernel
[    0.193933] /dev/root: Can't open blockdev
[    0.195141] List of all bdev filesystems:
[    0.196304]  ext3
[    0.196305]  ext2
[    0.197026]  ext4
[    0.197726]  fuseblk
[    0.198404]  btrfs
[    0.199136] 
[    0.200622] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.202802] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 7.0.8-arch1-1 #1 PREEMPT(full)  c2ec282795e9f47cb8bc86f69b5629c84ae881f4
[    0.205914] Hardware name: ChromiumOS crosvm, BIOS 0 
[    0.207335] Call Trace:
[    0.208108]  <TASK>
[    0.208806]  dump_stack_lvl+0x5d/0x80
[    0.209892]  vpanic+0x20a/0x410
[    0.210858]  panic+0x6b/0x70
[    0.211768]  mount_root_generic+0x1d0/0x280
[    0.212957]  prepare_namespace+0x1cb/0x260
[    0.214128]  kernel_init_freeable+0x295/0x2c0
[    0.215569]  ? __pfx_kernel_init+0x10/0x10
[    0.216803]  kernel_init+0x1a/0x140
[    0.217847]  ret_from_fork+0x2bc/0x350
[    0.218945]  ? __pfx_kernel_init+0x10/0x10
[    0.220126]  ret_from_fork_asm+0x1a/0x30
[    0.221277]  </TASK>
[    0.222027] Kernel Offset: 0x1600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[2026-05-17T08:23:31.499749978+00:00 INFO  crosvm::crosvm::sys::linux] vcpu requested reset
[2026-05-17T08:23:31.574950913+00:00 INFO  crosvm] exiting with success
tacokoneko@CORSAIR /mnt/Storage2/code2/images2/crosvm $ 

if a kernel is booted with no userspace it will perform a short operation and exit, which is printing these messages, so the behavior shown on GNU/Linux is expected.

@robertkirkman
Copy link
Copy Markdown
Member

robertkirkman commented May 17, 2026

termux-info for the device which I tried to use:

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/~~TBu5la-kb2V3qCWzKmKHtA==/com.termux-lDhB_P0FWH1mF-dID78c-g==/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1022
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.3
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=3235
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c42,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.3
TERMUX__APPS_DIR=/data/user/0/com.termux/termux/apps
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c42,c257,c512,c768
TERMUX__UID=10298
TERMUX__USER_ID=0
Packages CPU architecture:
x86_64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# root-repo (sources.list.d/root.list)
deb https://packages-cf.termux.dev/apt/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.45.0
Android version:
13
Kernel build information:
Linux localhost 6.1.112-gloria-xanmod1 #1 SMP PREEMPT_DYNAMIC Fri Oct 11 19:39:04 EDT 2024 x86_64 Android
Device manufacturer:
Dell Inc.
Device model:
08NPPY
Supported ABIs:
SUPPORTED_ABIS: x86_64,arm64-v8a,x86,armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: x86,armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: x86_64,arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so

it is rooted and logs with # indicate use of root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Package]: crosvm

2 participants