I want to run user mode linux on Android system; but there is somthing when running uml!
Android source version: 9.0
Kernel source branch: android-4.14-p
I followed on these steps:
1) Compile UML userspace
$ . build/envsetup.sh
$ lunch uml-userdebug
$ make -j40
2) Compile UML Kernel on android-4.14-p branch
$ ARCH=um SUBARCH=x86_64 scripts/kconfig/merge_config.sh
arch/um/configs/x86_64_defconfig kernel/configs/android-base.config
kernel/configs/android-recommended.config
$ make ARCH=um SUBARCH=x86_64 CROSS_COMPILE= -j40
3) ./vmlinux initrd=ramdisk.img ubda=system.img ubdb=userdata.img androidboot.hardware=uml mem=256M umid=uml
The log output:
init: First stage mount skipped (missing/incompatible fstab in device tree)
init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
init: Loading SELinux policy
SELinux: Class process2 not defined in policy.
SELinux: Permission watch in class filesystem not defined in policy.
SELinux: Permission watch in class file not defined in policy.
SELinux: Permission watch_mount in class file not defined in policy.
SELinux: Permission watch_sb in class file not defined in policy.
SELinux: Permission watch_with_perm in class file not defined in policy.
SELinux: Permission watch_reads in class file not defined in policy.
SELinux: Permission watch in class dir not defined in policy.
SELinux: Permission watch_mount in class dir not defined in policy.
SELinux: Permission watch_sb in class dir not defined in policy.
SELinux: Permission watch_with_perm in class dir not defined in policy.
SELinux: Permission watch_reads in class dir not defined in policy.
SELinux: Permission watch in class lnk_file not defined in policy.
SELinux: Permission watch_mount in class lnk_file not defined in policy.
SELinux: Permission watch_sb in class lnk_file not defined in policy.
SELinux: Permission watch_with_perm in class lnk_file not defined in policy.
SELinux: Permission watch_reads in class lnk_file not defined in policy.
SELinux: Permission watch in class chr_file not defined in policy.
SELinux: Permission watch_mount in class chr_file not defined in policy.
SELinux: Permission watch_sb in class chr_file not defined in policy.
SELinux: Permission watch_with_perm in class chr_file not defined in policy.
SELinux: Permission watch_reads in class chr_file not defined in policy.
SELinux: Permission watch in class blk_file not defined in policy.
SELinux: Permission watch_mount in class blk_file not defined in policy.
SELinux: Permission watch_sb in class blk_file not defined in policy.
SELinux: Permission watch_with_perm in class blk_file not defined in policy.
SELinux: Permission watch_reads in class blk_file not defined in policy.
SELinux: Permission watch in class sock_file not defined in policy.
SELinux: Permission watch_mount in class sock_file not defined in policy.
SELinux: Permission watch_sb in class sock_file not defined in policy.
SELinux: Permission watch_with_perm in class sock_file not defined in policy.
SELinux: Permission watch_reads in class sock_file not defined in policy.
SELinux: Permission watch in class fifo_file not defined in policy.
SELinux: Permission watch_mount in class fifo_file not defined in policy.
SELinux: Permission watch_sb in class fifo_file not defined in policy.
SELinux: Permission watch_with_perm in class fifo_file not defined in policy.
SELinux: Permission watch_reads in class fifo_file not defined in policy.
SELinux: Permission name_connect in class sctp_socket not defined in policy.
SELinux: Permission association in class sctp_socket not defined in policy.
SELinux: Class infiniband_pkey not defined in policy.
SELinux: Class infiniband_endport not defined in policy.
SELinux: Class xdp_socket not defined in policy.
SELinux: Class perf_event not defined in policy.
SELinux: the above unknown classes and permissions will be denied
SELinux: policy capability network_peer_controls=1
SELinux: policy capability open_perms=1
SELinux: policy capability extended_socket_class=1
SELinux: policy capability always_check_network=0
SELinux: policy capability cgroup_seclabel=0
SELinux: policy capability nnp_nosuid_transition=0
audit: type=1403 audit(1577771151.933:2): auid=4294967295 ses=4294967295 lsm=selinux res=1
selinux: SELinux: Loaded policy from /sepolicy
audit:
type=1404 audit(1577771151.933:3): enforcing=1 old_enforcing=0
auid=4294967295 ses=4294967295 enabled=1 old-enabled=1 lsm=selinux res=1
selinux: SELinux: Loaded file_contexts
random: init: uninitialized urandom read (40 bytes read)
init: init second stage started!
init: Using Android DT directory /proc/device-tree/firmware/android/
selinux: SELinux: Loaded file_contexts
init: Running restorecon...
selinux: SELinux: Could not stat /dev/block: No such file or directory.
init: waitid failed: No child processes
init: Created socket '/dev/socket/property_service', mode 666, user 0, group 0
init: Forked subcontext for 'u:r:vendor_init:s0' with pid 68
init: Forked subcontext for 'u:r:vendor_init:s0' with pid 69
random: init: uninitialized urandom read (40 bytes read)
random: init: uninitialized urandom read (40 bytes read)
audit:
type=1400 audit(1577771151.993:4): avc: denied { map } for pid=68
comm="init" path="/plat_file_contexts" dev="rootfs" ino=2651
scontext=u:r:vendor_init:s0 tcontext=u:object_r:file_contexts_file:s0
tclass=file permissive=0
audit: type=1400 audit(1577771151.993:5):
avc: denied { map } for pid=69 comm="init" path="/plat_file_contexts"
dev="rootfs" ino=2651 scontext=u:r:vendor_init:s0
tcontext=u:object_r:file_contexts_file:s0 tclass=file permissive=0
random: fast init done
My question is: why can not loggin into shell terminal?
The detail log shows in the attachment!