UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    sepolicy conflicts

    Scheduled Pinned Locked Moved Porting
    6 Posts 2 Posters 2.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • C Offline
        ChrisLuck
        last edited by

        Hi, i am trying to port UT to the ZUK Z1.
        One major problem i am facing is that there are a lot of errors because of the *.te files in some sepolicy folders.
        But before digging into all this selinux stuff i want the phone to boot.
        As a first approach, is it safe to just delete all of these policies (all sepolicy folders) or will this stop my port from booting?

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zeeshanhyder
          last edited by

          Instead of deleting all *.se policy files, just set selinux=permissive in kernel cmdline. And thats not it. You will have to port AppArmor also if your kernel is not backported right now. For that set apparmor=0 too in cmdline. Goodluck!

          1 Reply Last reply Reply Quote 0
          • C Offline
            ChrisLuck
            last edited by

            Thanks for your fast answer 🙂
            Setting selinux=permissive in kernel cmdline will not stop the checks at compile time from failing, so i deleted the folders and the errors were gone.
            Sadly the boot got stuck on the vendor logo and the phone didnt even show up in lsusb....
            And now my question is, why is it not booting? I want to be sure, that this selinux stuff is not needed for the boot, thats why i am asking here 😛

            1 Reply Last reply Reply Quote 0
            • Z Offline
              zeeshanhyder
              last edited by

              Yes setting selinux to permissive will disable selinux check on boot. But first make sure your kernel config is right. Try to boot recovery first. SELinux is least of your worries right now. Android's boot.img and ubuntu's boot.img are earths apart from each other. Make sure your dtb's are in place.

              1 Reply Last reply Reply Quote 0
              • C Offline
                ChrisLuck
                last edited by

                I had recovery booting without errors, but ubuntu just stopped on the vendor logo as already said.
                After hours of trial and error i got frustraded and deleted everything.
                Am im now giving it a second try 😉

                1 Reply Last reply Reply Quote 0
                • Z Offline
                  zeeshanhyder
                  last edited by

                  Hahaha.....seems like you are on same error as mine. Even i have recovery working properly but when booting normally it gets stuck at vendor logo. Check which initrd version are u using and then see if ubuntu rootfs version is same as initrd version. I think the issue is somewhere in initrd as stressed by ubuntu porting guide. Also get last_kmsg. That will help alot us in figuring out the problem. 🙂

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post