Android 9 build error (build sepolicy_tests)

666 views
Skip to first unread message

Simon Schoenmackers

unread,
Jul 16, 2019, 1:21:00 PM7/16/19
to Android Building
Im trying to build AOSPextended but the build fails with this error:



FAILED: /home/simon/AOSP_Extended/out/target/product/a5y17lte/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(/home/simon/AOSP_Extended/out/host/linux-x86/bin/sepolicy_tests -l /home/simon/AOSP_Extended/out/host/linux-x86/lib64/libsepolwrap.so          -f /home/simon/AOSP_Extended/out/target/product/a5y17lte/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts  -f /home/simon/AOSP_Extended/out/target/product/a5y17lte/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts  -p /home/simon/AOSP_Extended/out/target/product/a5y17lte/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch /home/simon/AOSP_Extended/out/target/product/a5y17lte/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /sys/ must be associated with the "sysfs_type" attribute: sysfs_sec
The following types on /data/ must be associated with the "core_data_file_type" attribute: gps_data_file tee_data_file

Anyone knows how to fix this?

jeffv

unread,
Jul 16, 2019, 3:53:24 PM7/16/19
to Android Building
The error message suggests how oww to fix it. In your device-specific selinux policy, you need to add the suggested attributes. e.g.

Change:
type sysfs_sec, file_type; 
To:
type sysfs_sec, file_type, sysfs_type;

Similarly add core_data_file_type for gps_data_file and tee_data_file.

Simon Schoenmackers

unread,
Jul 17, 2019, 10:40:15 AM7/17/19
to Android Building
Thanks for the answer.
I fixed the sysfs_sec and gps_data_file errors but I cant seem to find any tee_data_file entry in my sepolicy files.
Any ideas?
Reply all
Reply to author
Forward
0 new messages