Backup Guide: Difference between revisions
No edit summary |
(→Manual backup method: Add alternate debug ramdisk method) |
||
| Line 16: | Line 16: | ||
The copy process might take up to an hour on watches with 8GB of storage. | The copy process might take up to an hour on watches with 8GB of storage. | ||
Mind that taking multiple backups during runtime will result in different checksums. This is expected, because the live AsteroidOS system continuously writes to files, logs and other data on the block device while the dump is running. | |||
If you want consistent backups, the debug ramdisk method may work on some watches. Boot the debug ramdisk with the following command (replace <code>zImage-dtb-dory.fastboot</code> with the correct image for your watch): | |||
<pre>fastboot --cmdline debug-ramdisk boot zImage-dtb-dory.fastboot</pre> | |||
The debug ramdisk is booted when the manufacturer logo is standing/hanging. You can then run the normal <code>adb pull /dev/mmcblk0 watch-backup.img</code> command and repeated dumps will have identical checksums. | |||
= Scripted backup and restore= | = Scripted backup and restore= | ||
Latest revision as of 23:34, 18 March 2026
Before flashing AsteroidOS to your watch to replace WearOS, we advise to make a complete backup.
Manual backup method
- Temporarily install AsteroidOS
- Follow the install instructions for a temporary installation. Once booted into AsteroidOS, we can enable SSH or ADB with root access to all partitions on the internal storage.
- Enable SSH or ADB
- Open the settings app and the USB page. Select SSH Mode to enable SSH. Or ADB Mode to use ADB connection.
- Copy mmcblk0 into a local image file
- Backup using SSH and
dd
- Navigate to a folder where you want to store the backup. Or add a full path before the image name (after
of=) in the next command. ssh root@192.168.2.15 "dd if=/dev/mmcblk0" | dd "of=watch-backup.img" bs=4096 status=progress
- Backup using ADB
adb pull /dev/mmcblk0 watch-backup.img
- Backup using SSH and
The copy process might take up to an hour on watches with 8GB of storage.
Mind that taking multiple backups during runtime will result in different checksums. This is expected, because the live AsteroidOS system continuously writes to files, logs and other data on the block device while the dump is running.
If you want consistent backups, the debug ramdisk method may work on some watches. Boot the debug ramdisk with the following command (replace zImage-dtb-dory.fastboot with the correct image for your watch):
fastboot --cmdline debug-ramdisk boot zImage-dtb-dory.fastboot
The debug ramdisk is booted when the manufacturer logo is standing/hanging. You can then run the normal adb pull /dev/mmcblk0 watch-backup.img command and repeated dumps will have identical checksums.
Scripted backup and restore
Beroset has written a set of tools to make working with watches from a Linux computer very convenient. This backup guide will only cover the backup and restore features of asteroid-hosttools. Please be sure to read the asteroid-hosttools documentation to make use of the full capabilities they provide.
- Clone asteroid-hosttools
- Clone the asteroid-hosttools using the following command:
git clone https://github.com/beroset/asteroid-hosttools
- And change into the asteroid-hosttools directory:
cd asteroid-hosttools
- Temporarily install AsteroidOS
- Adapt
<watch-codename>in the following commands according to your watches codename listed on the Watches page. I.edoryfor the LG G Watch orsturgeonfor the Huawei Watch. ./flashy <watch-codename> --temp --nightly
- Adapt
- Backup the entire watch
- Following command will create a file called
original-<watch-codename>.img. ./watch-image <watch-codename> --save
- Following command will create a file called
- Restore a backup
- To restore the backup image created in step 3, make sure the
original-<watch-codename>.imgfile exists. - Then issue the restore command:
./watch-image <watch-codename> --restore
- To restore the backup image created in step 3, make sure the