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

    Backup and restore using ubports-installer

    Scheduled Pinned Locked Moved App Development
    52 Posts 15 Posters 10.2k Views 9 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.
      • AlainW94A Offline
        AlainW94
        last edited by AlainW94

        Hi all, I'm doing some modifications to the ubports-installer in order to be able to manage user and system data backup and restore.

        I have added a backup button on the install screen :
        1.png

        When you click on it you will have the following screen :

        2.png

        The installer will read the size of both system and userdata partition and give you an estimated sized need on your disk. You can name your backup. When you will click ok let's go, the phone will reboot into recovery and the backup will start :

        Capture du 2019-12-03 20-05-51.png

        At this and the phone will reboot into the OS. you will be able to find 2 tar file on your computer disk : one for the system-data, the other one for the user-data.

        It is actually working fine on Meizu Pro 5.
        BUT, in one of my previous thread, I had the issue that in recovery image, the user and system data partition was not mounted on /data.

        In the installer code, I added for the Meizu Pro 5 the mounting of sda44 on /data/

        So my questions to you are :

        • Who else on different phone models have the partition /data/user-data, /data/system-data not mounted in recovery ? If that is the case, what is your partition device to mount ?
        • does every one have the folder user-data and system-data in the /data folder while in recovery ?
        • Are you ok with this feature or do you find it usless ?

        I will now write the restore option.

        Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
        Never forget that they are much more ideas inside two heads than in one...

        LakotaubpL ? 2 Replies Last reply Reply Quote 10
        • LakotaubpL Offline
          Lakotaubp @AlainW94
          last edited by

          @AlainW94 This looks great, will try later. Thanks

          AlainW94A 1 Reply Last reply Reply Quote 0
          • mihaelM Offline
            mihael
            last edited by

            I find it very userul! Thank you! And a question: can this be used to migrate data from one phone to another, maybe even between different types of UT phones?

            AlainW94A 1 Reply Last reply Reply Quote 0
            • AlainW94A Offline
              AlainW94 @mihael
              last edited by

              @mihael Thanks ! I already use this method to backup a Meizu Pro5 to another Meizu Pro5, but I can't try it with a different model as I didn't have other model.
              I don't know if a system backup can work on a different phone model.

              Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
              Never forget that they are much more ideas inside two heads than in one...

              1 Reply Last reply Reply Quote 0
              • AlainW94A Offline
                AlainW94 @Lakotaubp
                last edited by

                @Lakotaubp Thanks !

                Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                Never forget that they are much more ideas inside two heads than in one...

                LakotaubpL 1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User @AlainW94
                  last edited by

                  😄 Great work! Thanks @AlainW94

                  AlainW94A 1 Reply Last reply Reply Quote 0
                  • AlainW94A Offline
                    AlainW94 @Guest
                    last edited by

                    Thanks @3arn0wl !

                    Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                    Never forget that they are much more ideas inside two heads than in one...

                    1 Reply Last reply Reply Quote 0
                    • LakotaubpL Offline
                      Lakotaubp @AlainW94
                      last edited by

                      @AlainW94 Is this available now for all models, it's not showing yet for OPO on 0.4.11 beta

                      AlainW94A 1 Reply Last reply Reply Quote 0
                      • lool_laurisL Offline
                        lool_lauris
                        last edited by

                        HI,
                        An this backup option will accept any phone in its factory setting ?

                        AlainW94A 1 Reply Last reply Reply Quote 0
                        • AlainW94A Offline
                          AlainW94 @Lakotaubp
                          last edited by

                          @Lakotaubp Not yet, I have to cleanup my code before to push it, and I only tried it on Meuzu Pro 5

                          Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                          Never forget that they are much more ideas inside two heads than in one...

                          LakotaubpL 1 Reply Last reply Reply Quote 0
                          • AlainW94A Offline
                            AlainW94 @lool_lauris
                            last edited by

                            @lool_lauris Only working with UbPorts phones, I tried it with a Meizu Pro5 on Android and it's not working.

                            Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                            Never forget that they are much more ideas inside two heads than in one...

                            lool_laurisL 1 Reply Last reply Reply Quote 0
                            • lool_laurisL Offline
                              lool_lauris @AlainW94
                              last edited by

                              @AlainW94 said in Backup and restore using ubports-installer:

                              @lool_lauris Only working with UbPorts phones, I tried it with a Meizu Pro5 on Android and it's not working.

                              When I was asking about any phone, I was meaning the available phones for UT, of course. ☺

                              AlainW94A 1 Reply Last reply Reply Quote 0
                              • AlainW94A Offline
                                AlainW94 @lool_lauris
                                last edited by

                                @lool_lauris 😉 And this is also why I asked if everybody had the folders "user-data" and "system-data" on their devices while in recovery mode, because this folder will be the one to be backing up.

                                Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                Never forget that they are much more ideas inside two heads than in one...

                                1 Reply Last reply Reply Quote 0
                                • LakotaubpL Offline
                                  Lakotaubp @AlainW94
                                  last edited by

                                  @AlainW94 My fault being to keen and not reading properly. Will check other stuff.

                                  1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kugiigi
                                    last edited by

                                    Does this work while the phone is booted normally or in recovery/bootloader mode?
                                    Looks cool, has it been merged already?

                                    AlainW94A 1 Reply Last reply Reply Quote 0
                                    • AlainW94A Offline
                                      AlainW94 @kugiigi
                                      last edited by

                                      @kugiigi It will work only on recovery, because it need to read or write system data. It is not merged yet, I will do it asap.

                                      Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                      Never forget that they are much more ideas inside two heads than in one...

                                      K 1 Reply Last reply Reply Quote 0
                                      • K Offline
                                        kugiigi @AlainW94
                                        last edited by

                                        @AlainW94 It writes? may I know for what?
                                        Anyway, I just thought I can use it for backing up/restoring my MultiROM UT installs 😅
                                        Good luck with this 🙂

                                        AppLeeA AlainW94A 2 Replies Last reply Reply Quote 0
                                        • AppLeeA Offline
                                          AppLee @kugiigi
                                          last edited by

                                          @kugiigi Backup AND RESTORE 😉 so yes, write

                                          1 Reply Last reply Reply Quote 2
                                          • AlainW94A Offline
                                            AlainW94 @kugiigi
                                            last edited by

                                            @kugiigi Yes it write if you restore a backup ! The backup tool will backup the content of 2 folders : /data/user-data and /data/system-data.
                                            If you open a shell on the recovery, and type

                                            ls /data
                                            

                                            And if you can see in there the previouly named folders, then the backup tool will be able to backup this file on your multirom device.

                                            Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                            Never forget that they are much more ideas inside two heads than in one...

                                            LakotaubpL 1 Reply Last reply Reply Quote 0
                                            • K Offline
                                              kugiigi
                                              last edited by

                                              Of course, restoring will write data....what a stupid question from me 😄
                                              I'll check this functionality once it's merged in the app.
                                              Thanks.

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