Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sepolicy #18

Open
Ingvarr71 opened this issue Feb 13, 2020 · 7 comments
Open

sepolicy #18

Ingvarr71 opened this issue Feb 13, 2020 · 7 comments

Comments

@Ingvarr71
Copy link

Hello! I am collecting 10 android, help solve the error.

[ 39% 49338/125733] build out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy
FAILED: out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ "userdebug" = "user" -a -s out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then echo "==========" 1>&2; echo "ERROR: permissive domains not allowed in user builds" 1>&2; echo "List of invalid domains:" 1>&2; cat out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; exit 1; fi ) && (mv out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/twolip/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
device/xiaomi/sdm660-common/sepolicy/vendor/hal_power_default.te:2:ERROR 'unknown type debugfs_wlan' at token ';' on line 88255:
#line 2
allow hal_power_default debugfs_wlan:dir { open getattr read search ioctl lock };
checkpolicy: error(s) encountered while parsing configuration
05:50:13 ninja failed with: exit status 1

failed to build some targets (03:06:40 (hh:mm:ss))

@simrat39
Copy link

@Ingvarr71 dont build user for now , build eng or userdebug

@Abhinavgupta371
Copy link

@Ingvarr71 Fix ur sepolicy

@aarish124
Copy link

@Ingvarr71 Use minimal sepolicy for now kek

@Ingvarr71
Copy link
Author

dont build user for now , build eng or userdebug

iodine71@iodine71 ~/boot $ lunch

You're building on Linux

Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_x86-eng
4. aosp_x86_64-eng
5. beagle_x15-userdebug
6. bootleg_twolip-eng
7. bootleg_twolip-user
8. bootleg_twolip-userdebug
9. poplar-eng
10. poplar-user
11. poplar-userdebug

Which would you like? [aosp_arm-eng] 8

@dinosnore1
Copy link
Member

@Ingvarr71 Userdebug

@Ingvarr71
Copy link
Author

@Ingvarr71 Userdebug

I collect userdebug and get this error

@islem19
Copy link

islem19 commented Mar 2, 2020

@Ingvarr71 seems you have an error in device/xiaomi/sdm660-common/sepolicy/vendor/hal_power_default.te, the defined rule allow hal_power_default debugfs_wlan:dir { open getattr read search ioctl lock }; seems have an unknown type debugfs_wlan .
check inside sepolic/vendor/ for file.te and look for something like :
type debugfs_wlan, file_type, sysfs_type
if you don't find it, means you have to define your own file_context
check this link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants