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

    Backup and restore (TWRP-style)

    Scheduled Pinned Locked Moved Unsolved Support
    27 Posts 5 Posters 1.5k Views 3 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.
      • G Offline
        GooglyBear @Charly
        last edited by

        @Charly said in Backup and restore (TWRP-style):

        If you copy to an ext4 usb stick and use rsync with sudo, all different rights should be applied correctly.

        This might help I suppose, and there's probably a way to configure rsync to work via cable. We'll see...

        1 Reply Last reply Reply Quote 0
        • Vlad NirkyV Offline
          Vlad Nirky @GooglyBear
          last edited by Vlad Nirky

          @GooglyBear
          I'll try...
          Hum. No, the pull don't have access to waydroid data folder.

          adb pull /home/phablet/.local/share/waydroid
          /home/phablet/.local/share/waydroid/: 0 files pulled, 0 skipped.

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            GooglyBear @Vlad Nirky
            last edited by

            @Vlad-Nirky Did you run adb root beforehand?

            Vlad NirkyV 1 Reply Last reply Reply Quote 0
            • Vlad NirkyV Offline
              Vlad Nirky @GooglyBear
              last edited by Vlad Nirky

              @GooglyBear
              No, only the commands mentioned above.
              Let's try again.
              It seems that adb root is disabled by default.
              You need to add a module to be able to use it.
              Is that correct?

              G 1 Reply Last reply Reply Quote 1
              • G Offline
                GooglyBear @Vlad Nirky
                last edited by GooglyBear

                @Vlad-Nirky Hmm, not sure. Running adb root for me gives error message adb: unable to connect for root: closed, but I can use sudo inside adb shell: using that would probably let me get a step closer, by allowing me to copy data to an SD card for instance. The problem is my computer isn't an adb client so I can't just use my phone as a host and run adb root on it.

                Going back to the module installation, I should definitely look into that (or whatever procedure I need to enable adb root), as it sounds better than the whole hassle of the SD card (which funnily enough is one of TWRP's limitations).

                [UPDATE]

                I've been told by an admin of UT's Telegram group that adb root simply hasn't been added to UT. This shouldn't be a problem, as utilities like rsync and scp, which are meant to work over a network, can be set up to work over for example USB (or maybe even Ethernet, don't know which would be faster or in what scenario).

                I may test backing up and restoring a Waydroid container with SD card, SSD and PC (using sudo on UT so that I have the priviledges to save all kinds of rights).

                I've been told by the same admin this works: therefore, all that's left is finding the right command for the job, so that it restores a Waydroid container to a working state (although this procdeure should be applicable to any app or user data or configuration).

                1 Reply Last reply Reply Quote 0
                • G Offline
                  GooglyBear @Vlad Nirky
                  last edited by GooglyBear

                  @Vlad-Nirky What phone and version did you try it on? On Fairphone 5 24.04-1.1 I can't get the SD to appear.

                  Interestingly enough, when I have an SD card insertd on my phone and I run dmesg | grep ciborium I repeatedly get udisks2.go:322: Issues while processing /org/freedesktop/UDisks2/block_devices/loop6: interface org.freedesktop.UDisks2.Block not found, while when I don't have it inserted the output is empty.

                  I can read/write to a USB I had though: I hopped onto my Pi 5 running Ubuntu 24.04 and ran these commands:

                  sudo umount /dev/sda
                  sudo mkfs.ext4 /dev/sda
                  

                  This formatted the drive to ext4, and with an adapter the drive was recognised.

                  This is what it looks like on the GUI (the very bottom icon is the USB drive, which wouldn't show up if it weren't correctly connected (ie. in such a way to make read/write operations possible):

                  photo_2025-12-17 10.29.42.jpeg

                  After performing the same formatting process on an SD card and using an external adapter, it also allowed read/write operations.

                  I also formatted another SD to FAT format, so UT can handle a variety of formats (probably ExFAT as well for example): it wasn't reading it before, but my other devices weren't either, so it ended up being a problem with the SD (fixable with reformatting in this case) rather than the phone.

                  It also works with my Samsung T7 SSD, without any need for sudo there for whatever reason.

                  Vlad NirkyV 1 Reply Last reply Reply Quote 0
                  • Vlad NirkyV Offline
                    Vlad Nirky @GooglyBear
                    last edited by Vlad Nirky

                    @GooglyBear
                    I have two Xiaomi Redmi Note 9 Pro phones and I transfer files from one to the other.
                    For the SD card, I used the external storage app in the panel.
                    ext4 is usable but cannot be formatted via this app.
                    Without sudo,,you won't access to the waydroid folder (if you use it).

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