Thanks William.
I don't know why a .mk file load two times BoardConfig.mk, but anyway i solved 
the issue.

Thanks

> On May 7, 2015, at 1:25 PM, William Roberts <[email protected]> wrote:
> 
> 
> 
>> On Wed, May 6, 2015 at 8:57 PM, William Roberts <[email protected]> 
>> wrote:
>> 
>> 
>>> On Wed, May 6, 2015 at 8:30 PM, Jaeik Cho <[email protected]> wrote:
>>> Dear William,
>>> 
>>> 
>>> I added file_contexts file to $PLATFORM/device/.../test/sepolicy/ and added 
>>> few lines to $PLATFORM/device/.../test/BoardConfig.mk as follows.
>>> 
>>> 113 #SELINUX
>>> 114 BOARD_SEPOLICY_DIRS += \
>>> 115                device/xxx/test/sepolicy
>>> 116 
>>> 117 BOARD_SEPOLICY_UNION += \
>>> 118                file_contexts \
>>> 119                device.te \
>>> 120                surfaceflinger.te
>>> 
>>> If I add new device to $PLATFORM/external/sepolicy/file_contexts, no error 
>>> observed and all policy including on system. But I added to under 
>>> /dev/.../test/sepolicy/file_contexts,
>>> I got this error when I build platform.
>> 
>> If it as you described, I have never encountered this issue. However, these 
>> are things I would try to debug it. Off of the top of my head, check the 
>> combined $OUT/obj/ETC/file_contexts_intermediates/file_contexts is well 
>> formed. Make sure you don't have any weird characters (windows) in it or 
>> anything like that (use fromdos command to convert)). What happends if you 
>> replace the offending line with something different (ie no regular 
>> expressions, just label something that doesn't really exist like /dev/foobar 
>> u:object_r:app_data_file:s0), does it still trigger an error? If it does 
>> this likely hints to the problem isn't that line itself, but around it.
>> 
>> Also what version of Android base are you working on, as it may help, 
>> perhaps Nick or Stephen have seen this crop up.
> 
> Sorry dropped the list. Lastly, before I go to bed, it may be an ordering 
> issue but for some reason I doubt that.
>  
>>  
>>> 
>>> Install: out/target/product/test/root/property_contexts
>>> Install: out/target/product/test/root/seapp_contexts
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts: 
>>> Multiple same specifications for /dev/mali0.
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts: 
>>> Multiple same specifications for /dev/ump.
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts: 
>>> Multiple same specifications for /dev/ttySAC3.
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts: 
>>> Multiple same specifications for /dev/ttySAC0.
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts: 
>>> Multiple same specifications for /data/block/mmcblk0p3.
>>> Error loading context file from 
>>> out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts
>>> make: *** 
>>> [out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts] 
>>> Error 4
>>> make: *** Deleting file 
>>> `out/target/product/test/obj/ETC/file_contexts_intermediates/file_contexts'
>>> make: *** Waiting for unfinished jobs....
>>> Install: out/target/product/test/root/sepolicy
>>> 
>>> 
>>> 
>>> 
>>> Jaeik Cho
>>> Skype: chojaeik
>>> BBM:
>>> 
>>> 
>>>> On Thu, May 7, 2015 at 12:01 PM, William Roberts 
>>>> <[email protected]> wrote:
>>>> 
>>>> 
>>>>> On Wed, May 6, 2015 at 7:08 PM, Jaeik Cho <[email protected]> wrote:
>>>>> Dear All,
>>>>> 
>>>>> If i try to add new device to file_contexts in 
>>>>> device/.../.../sepolicy/file_contexts (even one device), i got build 
>>>>> error likes as follows,
>>>>> 
>>>>> ....: Multiple same specification for /dev/???
>>>>> 
>>>>> However, i couldn't find same device in external/sepolicy/file_contexts
>>>>> 
>>>>> I added file_contexts on BOARD_SEPOLICY_UNION += file_contexts
>>>>> 
>>>>> Any suggestion?
>>>> 
>>>> You must have multiple definitions, can you give us the error snippet from 
>>>> the console and the offending entries? Since this is conflicting
>>>> with an AOSP label, I don't see any worries in exposing this. My 
>>>> assumption is that you might have too large a regex match and inadvertently
>>>> matching on device labeled via the base policy.
>>>>  
>>>>> 
>>>>> Thanks
>>>>> _______________________________________________
>>>>> Seandroid-list mailing list
>>>>> [email protected]
>>>>> To unsubscribe, send email to [email protected].
>>>>> To get help, send an email containing "help" to 
>>>>> [email protected].
>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> Respectfully,
>>>> 
>>>> William C Roberts
>> 
>> 
>> 
>> 
>> -- 
>> Respectfully,
>> 
>> William C Roberts
> 
> 
> 
> -- 
> Respectfully,
> 
> William C Roberts
> 
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to 
[email protected].

Reply via email to