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.

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: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.
>
> 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
>>
>>
>
_______________________________________________
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