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

    Executing linux commands feom QML App

    Scheduled Pinned Locked Moved App Development
    3 Posts 2 Posters 329 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.
      • H Offline
        Homer
        last edited by

        Hello,
        I would like to transfer files between waydroid and UT folders (eg. Images, videos, ...).
        The App would accept media from other apps snf copy those files into the waydroid folders.
        Then from gallery for instance I could use share with my app to have it copied to waydroid.

        I believe this app would require full system access?
        Is there a way to run os commands from within qml app?

        Thanks.

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          aarontheissueguy @Homer
          last edited by aarontheissueguy

          @homer I dont think it is possible (or practical) to do this through QT alone. If you are able to use a programming language, it is definitely possible. In python you can use the os module to run system commands. If you need root access, os will not be very practical though. We use pexpect to do more complex operations. It allows you to start a bash session and work with that, as if you were in the terminal.

          If you want to see an example of this look here: https://github.com/Aarontheissueguy/WaydroidHelper/blob/main/src/installer.py

          We are also planning to add a similar feature to WayDroidHelper eventually

          H 1 Reply Last reply Reply Quote 0
          • H Offline
            Homer @aarontheissueguy
            last edited by

            @aarontheissueguy thanks for the advise. I will look into that

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