我想在android-9(API 28)avd上运行自定义内核(goldfish)。 所以我刚刚下载了金鱼内核:
git clone https://android.googlesource.com/kernel/goldfish/ -b android-4.4
make x86_64_ranchu_defconfig
make -j4
然后我运行模拟器:
emulator -avd test -kernel goldfish/arch/x86/boot/bzImage -show-kernel
但是我的内核和供应商的SELinux策略之间存在一些错误。 这里的日志:
[ 1.170669] init: init first stage started!
[ 1.172289] init: Using Android DT directory /sys/bus/platform/devices/ANDR0001:00/properties/android/
[ 1.174652] init: First stage mount skipped (missing/incompatible fstab in device tree)
[ 1.176724] init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
[ 1.178464] init: Loading SELinux policy
[ 1.182955] init: No precompiled sepolicy: No such file or directory
[ 1.184557] init: Compiling SELinux policy
[ 1.185672] init: Failed to read /vendor/etc/selinux/plat_sepolicy_vers.txt: No such file or directory
[ 1.188030] init: Unable to load SELinux policy
[ 1.189192] init: Reboot start, reason: reboot, rebootTarget: bootloader
显然,系统进入启动循环。 我怎样才能解决这个问题?