• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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.
    • A Offline
      AlainW94 @lool_lauris
      last edited by 3 Dec 2019, 22:06

      @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...

      L 1 Reply Last reply 3 Dec 2019, 22:28 Reply Quote 0
      • L Offline
        lool_lauris @AlainW94
        last edited by 3 Dec 2019, 22:28

        @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. ☺

        A 1 Reply Last reply 3 Dec 2019, 22:47 Reply Quote 0
        • A Offline
          AlainW94 @lool_lauris
          last edited by 3 Dec 2019, 22:47

          @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
          • L Offline
            Lakotaubp @AlainW94
            last edited by 4 Dec 2019, 05:56

            @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 4 Dec 2019, 07:42

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

              A 1 Reply Last reply 4 Dec 2019, 18:03 Reply Quote 0
              • A Offline
                AlainW94 @kugiigi
                last edited by 4 Dec 2019, 18:03

                @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 5 Dec 2019, 05:42 Reply Quote 0
                • K Offline
                  kugiigi @AlainW94
                  last edited by 5 Dec 2019, 05:42

                  @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 πŸ™‚

                  A A 2 Replies Last reply 5 Dec 2019, 12:49 Reply Quote 0
                  • A Offline
                    AppLee @kugiigi
                    last edited by 5 Dec 2019, 12:49

                    @kugiigi Backup AND RESTORE πŸ˜‰ so yes, write

                    1 Reply Last reply Reply Quote 2
                    • A Offline
                      AlainW94 @kugiigi
                      last edited by 5 Dec 2019, 17:36

                      @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...

                      L 1 Reply Last reply 5 Dec 2019, 18:34 Reply Quote 0
                      • K Offline
                        kugiigi
                        last edited by 5 Dec 2019, 17:52

                        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
                        • L Offline
                          Lakotaubp @AlainW94
                          last edited by 5 Dec 2019, 18:34

                          @AlainW94 Like this ?
                          SWAP.img android-data system-data system.img ubuntu.img user-data

                          A 1 Reply Last reply 5 Dec 2019, 22:55 Reply Quote 0
                          • A Offline
                            AlainW94 @Lakotaubp
                            last edited by 5 Dec 2019, 22:55

                            @Lakotaubp Yes perfect ! what device is this ?

                            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...

                            L 1 Reply Last reply 6 Dec 2019, 05:14 Reply Quote 0
                            • L Offline
                              Lakotaubp @AlainW94
                              last edited by 6 Dec 2019, 05:14

                              @AlainW94 OnePlus one

                              1 Reply Last reply Reply Quote 1
                              • L Offline
                                Lakotaubp
                                last edited by Lakotaubp 12 Jun 2019, 16:06 6 Dec 2019, 13:29

                                SWAP.img      lost+found    system.img    user-data
                                android-data  system-data   ubuntu.img
                                

                                Bq M10fhd

                                1 Reply Last reply Reply Quote 1
                                • L Offline
                                  Lakotaubp
                                  last edited by 6 Dec 2019, 16:06

                                  Nexus 7

                                  SWAP.img        audio           data            nfc             system-data
                                  adb             backup          drm             property        system.img
                                  android-data    bootchart       local           qcks            tombstones
                                  app             bugreports      lost+found      resource-cache  ubuntu.img
                                  app-asec        cam_socket1     media           security        user
                                  app-lib         cam_socket2     mediadrm        ss              user-data
                                  app-private     dalvik-cache    misc            system
                                  
                                  
                                  A 1 Reply Last reply 6 Dec 2019, 17:12 Reply Quote 1
                                  • A Offline
                                    AlainW94 @Lakotaubp
                                    last edited by 6 Dec 2019, 17:12

                                    @Lakotaubp Many thanks ! it seems that the backup tool will work for at least those devices (Nexus 7, One Plus, Bq M10, Meizu 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...

                                    L 1 Reply Last reply 6 Dec 2019, 17:37 Reply Quote 0
                                    • L Offline
                                      Lakotaubp @AlainW94
                                      last edited by Lakotaubp 12 Jun 2019, 17:39 6 Dec 2019, 17:37

                                      @AlainW94 Nexus 5

                                      ~ # ls /data
                                      SWAP.img      android-data  system-data   system.img    ubuntu.img    user-data
                                      ~ # 
                                      
                                      

                                      Tried MX4 twice but got device off line message also OP3 no connection but guess that is to be expected at present.

                                      1 Reply Last reply Reply Quote 1
                                      • M Offline
                                        matteo
                                        last edited by 7 Dec 2019, 08:57

                                        @AlainW94 that is a very awesome functionality for the UT phone! Thank you for your work Alain! I also own a Pro5 so looking forward to use such a useful utility. I feel the day my UT phone will become my daily driver again is always closer and closer, thank to committed Community people as you are πŸ™‚

                                        1 Reply Last reply Reply Quote 1
                                        • F Offline
                                          flohack
                                          last edited by 8 Dec 2019, 09:30

                                          Hello, some answers:

                                          1. the 2 folders /data/user-data and /data/system-data are available on all devices and are the only ones you need to back up. They do not need mounting, but are real folders. You need to be careful with the symlinks though, as they are invalid if the normal OS is not active. So you might get backup errors during this process

                                          2. The feature is great and much anticipated. Just want to know if the target could be either PC or sd card. Some users might want to have the backup on the internal SD card (and later on the UT recovery could utilize this also to backup/restore, just would need baking it into the code there)

                                          3. Please get in contact with @NeoTheThird if you didnt do it already, he is the maintainer for the installer and you should coordinate any big features like this with him, to get aligned with his plans for the installer.

                                          Thanks and happy coding!

                                          My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                          A 1 Reply Last reply 8 Dec 2019, 16:05 Reply Quote 0
                                          • N Offline
                                            NeoTheThird
                                            last edited by 8 Dec 2019, 10:15

                                            Hey @AlainW94,

                                            maintainer of the installer here πŸ‘‹

                                            Kudos on how far you've come already, that's really cool! This is very similar to what we had planned in this issue. The commands there should work pretty much on every device with enough storage. Could you maybe open a PR soon, so we can coordinate the code to not conflict with the other things we have planned in the installer?

                                            Some notes:

                                            • You might want to avoid streaming output of adb commands to tar directly to the disk of your machine, but rather tar on the device. Even though it'll take up some space on the device, it'll be worth the added stability. Adb is very unreliable when it comes to exit codes and what buffer to write to. You don't want it to silently write "waiting for devices" to your precious backup file and corrupting it without you knowing.
                                            • You'll need to implement adb pull in the promise-android-tools module. It'd be great if you could open a pr for that rather sooner than later.
                                            • This is not a small undertaking, so in try to aim to get your changes in early wherever possible to avoid merge conflicts going forward. You might for example want to get your pull animation in now already.
                                            • Avoid device-specific hacks and workarounds in the installer code. You'll have heard about the config file format introduced in 0.3.x-beta, which aims to pave the way to make the installer code device- and os-agnostic. I could imagine adding another field like actions[], which holds steps like this, to the entry in operating_systems. We might even want to introduce some braking changes to the file strucutre to do this really right.

                                            Hope i did not overwhelm you, just excited for community contributions to my pet project XD

                                            If you need any help, hints or pointers, please let me know.

                                            Thank you!

                                            A 1 Reply Last reply 8 Dec 2019, 16:20 Reply Quote 1
                                            20 out of 52
                                            • First post
                                              20/52
                                              Last post