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

    (Almost) fixing clipboard access

    Scheduled Pinned Locked Moved Waydroid
    2 Posts 2 Posters 160 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.
      • A Offline
        artur_
        last edited by

        It is possible to install the required components for Waydroid clipboard access in Ubuntu Touch, and access them from outside Waydroid. Still remains to be discovered how to transfer those to the system clipboard.

        1. Install pyclip
          1. Install pip
            1. Set up a writable /usr/local

              1. As root, copy /usr/local to /home/.usr-local
                # cp -r /usr/local /home/.usr-local
                
              2. Create /etc/systemd/system/usr-local.mount with the following contents:
                [Unit]
                Before=basic.target
                
                [Mount]
                What=/home/.usr-local
                Where=/usr/local
                Options=bind
                
                [Install]
                WantedBy=basic.target
                
              3. Reload systemd units with systemctl daemon-reload
              4. Enable the mount with systemctl enable --now usr-local.mount
            2. Install pip

              # wget https://bootstrap.pypa.io/get-pip.py
              # python3 get-pip.py --break-system-packages
              
          2. Install pyclip
            # pip install pyclip --break-system-packages
            
        2. Install wl-clipboard
          1. Install the nix package manager
            1. Ubuntu Touch lacks "xz", so we will download and decompress the nix tarball on another computer:
              $ wget https://releases.nixos.org/nix/nix-2.31.2/nix-2.31.2-aarch64-linux.tar.xz
              $ xz -d nix-2.31.2-aarch64-linux.tar.xz
              $ adb push nix-2.31.2-aarch64-linux.tar /home/phablet/
              
            2. Install nix on the phone:
              $ mkdir -p /tmp/nix-binary-tarball-unpack/unpack
              $ tar -xf /home/phablet/nix-2.31.2-aarch64-linux.tar -C /tmp/nix-binary-tarball-unpack/unpack
              $ /tmp/nix-binary-tarball-unpack/unpack/nix-2.31.2-aarch64-linux/install
              $ rm -r /tmp/nix-binary-tarball-unpack
              
          2. Install wl-clipboard
            $ nix-env -iA nixpkgs.wl-clipboard
            
        3. Reboot your phone (just in case)
        4. Test copying from Waydroid
          1. Copy something in Waydroid
          2. Open the terminal app
          3. Run wl-paste to retrieve the contents
        5. Test pasting to Waydroid
          1. Open the terminal app
          2. Run echo hi | wl-copy
          3. Paste in Waydroid
        1 Reply Last reply Reply Quote 0
        • K Offline
          kugiigi
          last edited by

          Someone actually has a weird discovery. You can copy paste between Waydroid and Mimi browser. You can't even do it anymore inside Waydroid since A13 😅
          No one knows yet why that is the case.
          It won't help with accessing clipboard from and to Waydroid though since Mimi browser also can't access system clipboard but perhaps something to look at 😄

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