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
    23 Posts 5 Posters 427 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.
      • Vlad NirkyV Online
        Vlad Nirky @Charly
        last edited by

        @Charly
        Hello.
        If I understood correctly, UT formats the SD card in FAT, but on my phone, it was able to use ext4 without any issues. Let me know if it works for you too.

        G 1 Reply Last reply Reply Quote 1
        • G Offline
          gpatel-fr @Vlad Nirky
          last edited by

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

          UT formats the SD card in FAT

          I'd think that using a command line tool it could be possible to use other formats.

          Vlad NirkyV 1 Reply Last reply Reply Quote 1
          • Vlad NirkyV Online
            Vlad Nirky @gpatel-fr
            last edited by

            @gpatel-fr
            Yes, I was thinking to the SD app present in Lomiri panel.

            G 1 Reply Last reply Reply Quote 0
            • G Offline
              gpatel-fr @Vlad Nirky
              last edited by

              @Vlad-Nirky

              looking at the 'ciborium' code, it is hardcoding only exfat at one point, when checking on dynamic insertion of a sdcard. I will not be able to do any tests on that since my phone can't accept a new sdcard without removing the battery.

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

                @Moem Thanks for your input, backing up your home directory is definitely a great idea and is what people normally opt for.

                Below I'll try and summarise what I've learnt for solving my problem, which might help people facing a similar problem.

                Please remember I have not tried restoring yet to see if every single thing on the list was backed up, the one thing that's certain is if you have files in the home directory and you back up that, those are safe (you can always check they successfully made it to your computer by browsing inside the folder).

                Backing up your home directory
                1. Connect phone to computer.
                2. Make sure the adb command is working (run adb devices to see if there's any output etc.).
                3. Run adb pull /home.

                You should receive some output about whether all your files made it to your computer, and obviously you can check for yourself by browsing them on your PC.

                Why should I backup userdata instead of just home?

                If you want to take it a step further, I'd recomment backing up the entire userdata folder, which also contains the home folder mentioned previously: as far as I've been able to gather just by asking other users on UBPorts' Telegram servers, this includes the items on the list below.

                Things inside userdata which are useful to back up
                • the settings you changed in the settings app
                • your fingerprints for unlocking your phone
                • the apps currently installed on your device
                • the apps' data: for example, all the apps and everything else needed to run your Waydroid container exactly in the state it is in now
                • packages installed via nix and snap
                Backing up userdata

                Do the same but run adb pull /userdata.
                Basically if you ever lose your userdata you just need to replace your current /userdata folder on your phone with the previous backup of /userdata on your computer.

                While I would probably simply run something like adb shell 'rm -rf /userdata && mkdir -p /userdata' && adb push /path/to/userdata /userdata for restore, do not run it unless you know what you're doing, I have not verified this to be working and need to check with people more knowledgeable than me on UT to confirm/fix.

                This is the best I have for now, I'll update / add to this if I come across anything better 🙂

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

                  @GooglyBear
                  With this procedure, are Waydroid's specific directory rights preserved?

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

                    @Vlad-Nirky The truth is I have no idea, only way is to test it I guess. I also assume I'll have to run adb root first to download all files.

                    The adb user documentation (https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/docs/user/adb.1.md) doesn't seem to be of much use in answering this question.

                    Vlad NirkyV 1 Reply Last reply Reply Quote 0
                    • 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 Online
                        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?

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