asteroidos.org icon indicating copy to clipboard operation
asteroidos.org copied to clipboard

[information request] how to backup userdata and boot partitions?

Open violoncelloCH opened this issue 7 years ago • 7 comments

I would be very nice if you could provide information on how to backup userdata and boot partitions and maybe even how to restore them. What's the best way to do this? this would really help newcomers...

violoncelloCH avatar Jun 10 '18 08:06 violoncelloCH

or at least a guide to find and reflash the original os

violoncelloCH avatar Jun 10 '18 09:06 violoncelloCH

I'm not entirely sure whether we can document how to reinstall WearOS (both technically and legally). That being said, we could add a documentation page for "backups" with one subsection for backups of WearOS and one subsection for backups of AsteroidOS. I would recommend the usage of TWRP (when available) with links to official downloads https://twrp.me/Devices/ We could then point to that documentation page from the install pages.

FlorentRevest avatar Jun 10 '18 12:06 FlorentRevest

Ohh, havn't known the legal issue Is it possible to backup the boot and userdata partition of Wear OS with twrp? If so I will try this and I could prepare a documentation page with at least some indications...

violoncelloCH avatar Jun 10 '18 17:06 violoncelloCH

It is possible indeed. That would be super cool if you could send a PR! Keep me updated.

FlorentRevest avatar Jun 10 '18 17:06 FlorentRevest

of course I could sand a PR! But twrp shows /system as 0MB and then fails to back up because it is unable to mount /system. any ideas or tricks?

violoncelloCH avatar Jun 11 '18 15:06 violoncelloCH

Cool! Does this happen with wearOS or AsteroidOS? Because Asteroid doesn't use the /system partition at all. (but it shouldn't be empty, it should be wearOS's partition left untouched)

FlorentRevest avatar Jun 12 '18 07:06 FlorentRevest

It's with wearOS. Thought I'will have to back it up too... Maybe it's something with Androids encryption? But if AsteroidOS lets /system untouched, it should be sufficient to back up /boot and /data...?

violoncelloCH avatar Jun 12 '18 07:06 violoncelloCH

I'd like to propose an addition to our pages that may partially resolve this. It's possible to get a dump of all partitions using a temporary AsteroidOS installation, and possible to restore as well, so one reasonable thing we could do would be to describe how to do this with these steps:

  1. do a temporary install of AsteroidOS
  2. make a backup of all partitions
  3. do a permanent install of AsteroidOS

With those accomplished, it's possible to restore to more or less the original state using this:

  1. restore the boot partition
  2. reboot to original OS
  3. do a "reset" within that OS which should restore/wipe the userdata partition
  4. use ADB to delete the temporary install of AsteroidOS

beroset avatar Jan 13 '23 15:01 beroset

I've created some tools that help with this: https://github.com/beroset/asteroid-hosttools

beroset avatar Jan 17 '23 19:01 beroset

I've created some tools that help with this: https://github.com/beroset/asteroid-hosttools

Great work indeed. Tested the tools on catfish and found no issues. Happy to test specific tasks.

moWerk avatar Jan 17 '23 19:01 moWerk

Thanks for the useful hint! Just tested the watch-image tool to backup a sparrow device. Works fine for me: 3909091328 bytes (3,9 GB, 3,6 GiB) copied, 598,255 s, 6,5 MB/s

Maybe a link to the hosttools could be added to the install page: https://github.com/AsteroidOS/asteroidos.org/blob/master/templates/layouts/aw-install.hbs#L92

es-ka avatar Mar 05 '23 01:03 es-ka

This is now fixed by this commit https://github.com/AsteroidOS/asteroidos.org/pull/298

beroset avatar Apr 11 '23 12:04 beroset