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

    [Question] getprop in a confined app?

    Scheduled Pinned Locked Moved App Development
    5 Posts 2 Posters 34 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.
      • pparentP Online
        pparent
        last edited by

        Hi,

        In order to adapt properly the scaling of my app I would need to do

        /usr/bin/getprop ro.sf.lcd_density
        

        The problem is that if I do that inside a confined app I get

        aa-exec[6536]: ./launcher.sh: 12: /usr/bin/getprop: Permission denied
        

        But if I copy the binary /usr/bin/getprop inside my app install repo in /opt/click.ubuntu.com/ and call it then it works well. The thing is I want to make something clean, and not dumping a binary from the phone inside my app, not even knowing if it will work for every phone.

        Is there a way to do without copying the getprop binary in my app install dir? Otherwise is there a way to download the getprop binary from official ubports build sources? Where does this binary come from?

        Thank's a lot in advance!

        lduboeufL 1 Reply Last reply Reply Quote 0
        • lduboeufL Offline
          lduboeuf @pparent
          last edited by

          @pparent
          I doubt a confined app can access Android properties.
          For the "where does it came from" :
          https://gitlab.com/ubports/development/core/packaging/libhybris/-/blob/ubports/latest/debian/control?ref_type=heads#L153

          pparentP 2 Replies Last reply Reply Quote 0
          • pparentP Online
            pparent @lduboeuf
            last edited by

            @lduboeuf said in [Question] getprop in a confined app?:

            I doubt a confined app can access Android properties.

            I can garanty you that if it embeeds a local copy of /usr/bin/getprop then it can.

            1 Reply Last reply Reply Quote 0
            • pparentP Online
              pparent @lduboeuf
              last edited by

              @lduboeuf said in [Question] getprop in a confined app?:

              For the "where does it came from" :
              https://gitlab.com/ubports/development/core/packaging/libhybris/-/blob/ubports/latest/debian/control?ref_type=heads#L153

              Thank's but it there a way to download the compiled version in a similar fashion that it would be doable with lauanchpad in official Canonical Ubuntu ?

              1 Reply Last reply Reply Quote 0
              • pparentP Online
                pparent
                last edited by

                This is outdated:

                https://launchpad.net/ubuntu/xenial/+package/libhybris-utils

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