Backup Guide: Difference between revisions
(Added the backup instructions from the current wiki) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
#* Backup using SSH and <code>dd</code> | #* Backup using SSH and <code>dd</code> | ||
#: Navigate to a folder where you want to store the backup. Or add a full path before the image name (after <code>of=</code>) in the next command. | #: Navigate to a folder where you want to store the backup. Or add a full path before the image name (after <code>of=</code>) in the next command. | ||
#: < | #: <pre>ssh root@192.168.2.15 "dd if=/dev/mmcblk0" | dd "of=watch-backup.img" bs=4096 status=progress</pre> | ||
#* Backup using ADB | #* Backup using ADB | ||
#: < | #: <pre>adb pull /dev/mmcblk0 watch-backup.img</pre> | ||
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. | ||
Line 22: | Line 22: | ||
# Clone asteroid-hosttools | # Clone asteroid-hosttools | ||
#: Clone the asteroid-hosttools using the following command: | #: Clone the asteroid-hosttools using the following command: | ||
#: < | #: <pre>git clone https://github.com/beroset/asteroid-hosttools</pre> | ||
#: And change into the asteroid-hosttools directory: | #: And change into the asteroid-hosttools directory: | ||
#:< | #:<pre>cd asteroid-hosttools</pre> | ||
# Temporarily install AsteroidOS | # Temporarily install AsteroidOS | ||
#: Adapt <code><watch-codename></code> in the following commands according to your watches codename listed on the [https://asteroidos.org/watches/ Watches page]. I.e <code>dory</code> for the LG G Watch or <code>sturgeon</code> for the Huawei Watch. | #: Adapt <code><watch-codename></code> in the following commands according to your watches codename listed on the [https://asteroidos.org/watches/ Watches page]. I.e <code>dory</code> for the LG G Watch or <code>sturgeon</code> for the Huawei Watch. | ||
#:< | #:<pre>./flashy <watch-codename> --temp --nightly</pre> | ||
# Backup the entire watch | # Backup the entire watch | ||
#: Following command will create a file called <code>original-<watch-codename>.img</code>. | #: Following command will create a file called <code>original-<watch-codename>.img</code>. | ||
#:< | #:<pre>./watch-image <watch-codename> --save</pre> | ||
# Restore a backup | # Restore a backup | ||
#: To restore the backup image created in step 3, make sure the <code>original-<watch-codename>.img</code> file exists. | #: To restore the backup image created in step 3, make sure the <code>original-<watch-codename>.img</code> file exists. | ||
#:Then issue the restore command: | #:Then issue the restore command: | ||
#: < | #: <pre>./watch-image <watch-codename> --restore</pre> |
Latest revision as of 21:51, 4 July 2023
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.
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.edory
for the LG G Watch orsturgeon
for 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>.img
file exists. - Then issue the restore command:
./watch-image <watch-codename> --restore
- To restore the backup image created in step 3, make sure the