I've been trying to compile Resurrection Remix Pie for xiaomi mi Max 3 (nitrogen) and am facing an error I am finding myself unable to resolve. After previously fixing some other sepolicy fails, I encounter this one:
FAILED: /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests
/bin/bash -c "(/home/albertoduqe/rr/out/host/linux-x86/bin/sepolicy_tests -l /home/albertoduqe/rr/out/host/linux-x86/lib64/libsepolwrap.so -f /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts -f /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts -p /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/sepolicy_intermediates/sepolicy ) && (touch /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/sepolicy_tests_intermediates/sepolicy_tests )"
The following types on /data/ must be associated with the "core_data_file_type" attribute: fingerprint_data_file
I then go to my device tree, open file.te (in sepolicy/vendor folder in this case), and att the specified type to the given attribute, so that it now looks like this:
type fingerprint_data_file, file_type, data_file_type, core_data_file_type;
And build again. Now it comes the funny part: fails again with this error:
FAILED: /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0
/bin/bash -c "(/home/albertoduqe/rr/out/host/linux-x86/bin/treble_sepolicy_tests -l /home/albertoduqe/rr/out/host/linux-x86/lib64/libsepolwrap.so -f /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/plat_file_contexts_intermediates/plat_file_contexts -f /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts -b /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/built_plat_sepolicy_intermediates/built_plat_sepolicy -m /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/treble_sepolicy_tests_26.0_intermediates/26.0_mapping.combined.cil -o /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/treble_sepolicy_tests_26.0_intermediates/built_26.0_plat_sepolicy -p /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/sepolicy_intermediates/sepolicy --fake-treble ) && (touch /home/albertoduqe/rr/out/target/product/nitrogen/obj/ETC/treble_sepolicy_tests_26.0_intermediates/treble_sepolicy_tests_26.0 )"
The following types on /data/vendor/ /data/vendor_ce/ /data/vendor_de/ must not be associated with the "core_data_file_type" attribute: fingerprint_data_file
And it all starts all over again.
I am no developer or expert, although I have been compiling custom roms for android devices for a while. I had never encountered something like this.
How come the attribute fingerprint_data_file must have the core_data_file_type in /data/ but not in /data/vendor/ /data/vendor_ce/ /data/vendor_de/? What are those anyway?
Any hint will be most appreciated!