Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions docs/EMMC_BACKUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To perform a backup follow these steps:

## By the uboot console

1. Use the original app version 2.39 and stop the booting process by holding key 's' (or use any custom firmware update that has the UART enabled)
1. Use the original app version 2.39 and stop the booting process by holding key 's' (or use any custom firmware update that has the UART enabled such as u-boot-sunxi-with-spl-cc1.bin)
2. Insert a USB disk (FAT32 formatted) with the file [backup.scr](../extra-stuff/emmc/backup.scr) on it for complete emmc backup.
3. From the uboot shell enter the following:

Expand Down Expand Up @@ -36,29 +36,53 @@ fatload usb 0:1 42000000 backup.scr

(Partition 1)

1. Remove the USB disk with the scripts and insert at least 8GB USB disk for a complete backup. It might be formatted or not and it will be completely rewritten by the contents of the eMMC. NOTE: Do not use a disk with important information! All data on it will be lost!
4. Remove the USB disk with the scripts and insert at least 8GB USB disk for a complete backup. It might be formatted or not and it will be completely rewritten by the contents of the eMMC. NOTE: Do not use a disk with important information! All data on it will be lost!

2. Type the following to execute the script:
5. Type the following to execute the script:

```sh
source 42000000
```

1. Wait about 15 minutes and the entire emmc will be transferred 1:1 to the USB disk sector by sector
Wait about 15 minutes and the entire emmc will be transferred 1:1 to the USB disk sector by sector
If you see an error and the script stopped before showing 100%, insert another type USB disk and enter again:

```sh
source 42000000
```

7. From a Linux machine export the complete backup as a file from the USB disk:
6. From a Linux machine export the complete backup as a file from the USB disk:

```sh
dd if=/dev/sdh of=emmc_backup.bin bs=512 count=15269888 status=progress
```

Note: replace the `/dev/sdh` with the device name of your USB disk.

### On Windows: pull the image off with diskcpy

Windows has no `dd`. After the script finishes writing the eMMC onto the USB stick, copy the raw
image off the stick with [`diskcpy`](https://github.com/suchmememanyskill/diskcpy/releases) — a
small standalone utility that does a block-level read of a physical drive into a file.

1. Plug the USB stick into your PC. **Click _Cancel_** on any "format this drive" prompt — the
stick is a raw eMMC dump with no Windows-readable filesystem.
2. In **PowerShell (run as Administrator)**, find the stick's physical-drive number:

```powershell
Get-CimInstance Win32_DiskDrive | Select-Object DeviceID, Model, Size
```

3. Dump it to an image file (replace `PHYSICALDRIVE#` with your stick — **double-check the number
and size first**):

```powershell
diskcpy.exe \\.\PHYSICALDRIVE# emmc_backup.bin
```

Pair [`diskcpy`](https://github.com/suchmememanyskill/diskcpy/releases) with the precompiled [`sunxi-fel.exe`](../extra-stuff/emmc/sunxi-fel.exe) for a
fully Windows-native workflow (no WSL or `dd` needed).

## By the standard or the custom xfel tool in uboot mode

This mode can be used when the version you are using has the uart disabled and you are unable to stop the booting process and to enter in the uboot shell.
Expand Down
Loading
Loading