sepolicy_neverallows_vendor causes emulator build failure

1,972 views
Skip to first unread message

Mohammad Tauqir Ansari

unread,
Apr 4, 2023, 12:06:44 AM4/4/23
to Android Building
Hello all, 

I am new to AOSP devlopment. 
I am trying to build source code following guidelines here.

I am getting below error. Not sure what is wrong. I am not able to fix this. Tried m -j8 several times along with m clean however the error won't go away.

Please suggest what is wrong here. Thanks in advance.

Config:
============================================
PLATFORM_VERSION_CODENAME=UpsideDownCake
PLATFORM_VERSION=UpsideDownCake
TARGET_PRODUCT=aosp_car_x86_64
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.19.0-38-generic-x86_64-Ubuntu-22.04.2-LTS
HOST_CROSS_OS=windows
BUILD_ID=AOSP.MASTER
OUT_DIR=out
============================================

Error:
[ 49% 78147/156849] //system/sepolicy:sepolicy_neverallows_vendor Neverallow check: sepolicy_neverallows_vendor
FAILED: out/soong/.intermediates/system/sepolicy/sepolicy_neverallows_vendor/policy
out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/soong/.intermediates/system/sepolicy/sepolicy_neverallows_vendor/policy out/soong/.intermediates/system/sepolic
y/sepolicy_neverallows_vendor.checkpolicy.conf/android_common/sepolicy_neverallows_vendor.checkpolicy.conf # hash of input list: 15871fa7f1904c26cfc726ea362c19ede
7f225bff09f1871b1f7d5657882753a
device/generic/car/emulator/usbpt/bluetooth/btusb/sepolicy/domain.te:2:ERROR 'unknown type qemu_device' at token ';' on line 83857:
#line 1 "device/generic/car/emulator/usbpt/bluetooth/btusb/sepolicy/domain.te"
allow domain qemu_device:chr_file { { getattr open read ioctl lock map watch watch_reads } { open append write lock map } };

checkpolicy:  error(s) encountered while parsing configuration
01:19:55 ninja failed with: exit status 1



Mohammad Hossein Heydarchi

unread,
Apr 5, 2023, 11:36:04 AM4/5/23
to Android Building
Hi Mohammad,

Do you get the same error for the others variants?
Are you sure the repo sync was successful?

Michael Swartout

unread,
Apr 5, 2023, 11:36:47 AM4/5/23
to android-...@googlegroups.com
It doesn't hurt to repo sync.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/e3073c7c-954f-47e5-aa0f-04e42aee79f6n%40googlegroups.com.

Mohammad Tauqir Ansari

unread,
Apr 5, 2023, 3:30:48 PM4/5/23
to Android Building
@Michael and @Mohammad Hossein
The code build successfully for - aosp_cf_x86_64_phone. For car do I need to checkout of different branch?
fyi - I did repo sync.

Mohammad Hossein Heydarchi

unread,
Apr 6, 2023, 10:26:48 AM4/6/23
to android-...@googlegroups.com
Hi Mohammad,

No, you don't need to checkout any branch. You only need to select the variant.
 What works for me is:
aosp_car_x86_64-userdebug

You received this message because you are subscribed to a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/eS6e6kCRO58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/e1b8e3ee-960b-400f-a043-15050b02f38cn%40googlegroups.com.


--
Best Regards
Mohamad Hosein Heydarchi
Reply all
Reply to author
Forward
0 new messages