Error: could not load context file

While working on AOKP 7.0, I came across an interesting error:

[CODE]
libsepol.context_from_record: could not create context structure
/home/alaskalinuxuser/Documents/projects/phones/compile/build_aokp7/out/target/product/jfltetmo/obj/ETC/file_contexts.bin_intermediates/file_contexts.device.tmp: line 475 has invalid context u:object_r:misc_partition:s0
Error: could not load context file from /home/alaskalinuxuser/Documents/projects/phones/compile/build_aokp7/out/target/product/jfltetmo/obj/ETC/file_contexts.bin_intermediates/file_contexts.device.tmp
[/CODE]

The reason this was interesting, is because I could not find the sepolicy file to change in my device trees to fix this. Generally, when there is an sepolicy issue, I look through my device tree (in this case, jf-common/sepolicy) and edit those files to solve the issue. However, this time, the issue did not stem directly from one of those files. In the end, I opened build_aokp7/out/target/product/jfltetmo/obj/ETC/file_contexts.bin_intermediates/file_contexts.device.tmp and removed line 475, which was causing the error. That did allow the build to continue, but only time will tell if that was the right answer or not.

Linux – keep it simple.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s