UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. artur_
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Groups 0

    artur_

    @artur_

    2
    Reputation
    2
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    artur_ Unfollow Follow

    Best posts made by artur_

    • Resizing root filesystem

      Documenting my solution here in case anyone is facing the same problem.

      Installing Ubuntu Touch on Fairphone 4 will create a root filesystem with almost no free space, making it impossible to install packages. Writing to the root filesystem is not officially supported in Ubuntu Touch and not how it is intended to be used by regular users, but it is needed for example to test things with ubports-qa.

      This may brick your phone, proceed at your own risk

      This will wipe your data as reverting to Android is required.

      1. The FP4 uses dynamic partitions which must be resized with "userspace fastbootd", which also does not work on Ubuntu Touch on the FP4. Therefore one must first revert to Android. (Install Android 11, keep bootloader unlocked.)

      2. Boot to fastbootd.
        a. Boot to "bootloader" mode (with the phone powered off, hold volume down and connect USB; this is the usual "fastboot mode"), then run fastboot reboot fastboot.
        b. Alternatively, set up USB debugging and run adb reboot fastboot.

      3. When the phone shows the fastbootd menu, manually set up partitioning as required by Ubuntu Touch (refer to the actions listed at https://github.com/ubports/installer-configs/blob/master/v2/devices/FP4.yml#L137).
        a. fastboot delete-logical-partition system_ext_a
        b. Repeat the above for system_ext_b, product_a, product_b, system_b, vendor_b, odm_b.
        c. fastboot resize-logical-partition system_a 5368709120 (this is the step we do differently than the installer)
        d. fastboot reboot bootloader

      4. Run the UBports Installer, select the option to bootstrap and to wipe userdata. Unselect the option to set up partitioning. Install as usual. It should detect your device correctly. It will also prompt you to reboot in bootloader mode but you are already in the correct mode for installation so simply click ok.

      posted in Fairphone 4
      A
      artur_

    Latest posts made by artur_

    • (Almost) fixing clipboard access

      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
      posted in Waydroid
      A
      artur_
    • RE: Resizing root filesystem

      2.b. should read adb reboot fastboot

      posted in Fairphone 4
      A
      artur_
    • Resizing root filesystem

      Documenting my solution here in case anyone is facing the same problem.

      Installing Ubuntu Touch on Fairphone 4 will create a root filesystem with almost no free space, making it impossible to install packages. Writing to the root filesystem is not officially supported in Ubuntu Touch and not how it is intended to be used by regular users, but it is needed for example to test things with ubports-qa.

      This may brick your phone, proceed at your own risk

      This will wipe your data as reverting to Android is required.

      1. The FP4 uses dynamic partitions which must be resized with "userspace fastbootd", which also does not work on Ubuntu Touch on the FP4. Therefore one must first revert to Android. (Install Android 11, keep bootloader unlocked.)

      2. Boot to fastbootd.
        a. Boot to "bootloader" mode (with the phone powered off, hold volume down and connect USB; this is the usual "fastboot mode"), then run fastboot reboot fastboot.
        b. Alternatively, set up USB debugging and run adb reboot fastboot.

      3. When the phone shows the fastbootd menu, manually set up partitioning as required by Ubuntu Touch (refer to the actions listed at https://github.com/ubports/installer-configs/blob/master/v2/devices/FP4.yml#L137).
        a. fastboot delete-logical-partition system_ext_a
        b. Repeat the above for system_ext_b, product_a, product_b, system_b, vendor_b, odm_b.
        c. fastboot resize-logical-partition system_a 5368709120 (this is the step we do differently than the installer)
        d. fastboot reboot bootloader

      4. Run the UBports Installer, select the option to bootstrap and to wipe userdata. Unselect the option to set up partitioning. Install as usual. It should detect your device correctly. It will also prompt you to reboot in bootloader mode but you are already in the correct mode for installation so simply click ok.

      posted in Fairphone 4
      A
      artur_