Project

General

Profile

BackupsResearch » History » Version 13

doak complex, 01/20/2020 08:26 AM
Make clear that link is to current version (which should be like that) but add info about revision to look into manually if wanted.

1 1 Denis 'GNUtoo' Carikli
h1. BackupsResearch
2
3
{{>toc}}
4
5 8 Denis 'GNUtoo' Carikli
h2. Introduction
6
7
The [[BackupTheEFS]] page has instructions to backup the EFS. This page instead tries to document why it is done in that way, and what are the advantages and disadvantages of various other backups methods.
8
9 9 Denis 'GNUtoo' Carikli
This can also be useful to write more generic backup instructions to do a more complete backup.
10
11 1 Denis 'GNUtoo' Carikli
h2. Doing the backup of partitions or other block devices
12
13
h3. adb shell cat pipe
14
15 13 doak complex
Old versions of the "EFS backup instructions":https://redmine.replicant.us/projects/replicant/wiki/BackupTheEFS (revision 17) used the following command:
16 1 Denis 'GNUtoo' Carikli
<pre>
17
adb shell "cat /dev/block/platform/*/by-name/EFS > /EFS.img"
18
</pre>
19
20
At some point or under some condition, this stopped working and the backup were corrupted.
21 2 Denis 'GNUtoo' Carikli
22
h3. adb shell cat adb pull
23
24
<pre>
25
adb shell "cat /dev/block/platform/*/by-name/EFS /dev/block/platform/*/by-name/EFS" > /EFS.img" EFS.img
26
adb pull /EFS.img ./
27
</pre> 
28
29 7 Kurtis Hanna
Doing it in two stages like that seem to be widely used in other instructions (like the ones found in XDA forums).
30 2 Denis 'GNUtoo' Carikli
31
Normally cat should produce a valid backup, however it might be better to use dd for extra safety.
32
33 10 Denis 'GNUtoo' Carikli
On Replicant 6.0 0004, at least the recoveries for the following devices have 'dd':
34 2 Denis 'GNUtoo' Carikli
* Galaxy Nexus
35
* Galaxy SIII
36
37
h3. adb pull the block device
38
39
The following should also work:
40
<pre>
41
adb pull /dev/block/mmcblk0p3 ./EFS.img
42
</pre>
43 3 Denis 'GNUtoo' Carikli
44 1 Denis 'GNUtoo' Carikli
The advantage is that it can also backup huge partitions like the user data partition or Replicant system partition.
45 10 Denis 'GNUtoo' Carikli
46
TODO:
47
* Validate if doing "adb pull /dev/block/platform/*/by-name/EFS ./EFS.img" work, and if so, validate it for all the devices.
48 5 Kurtis Hanna
49 11 Denis 'GNUtoo' Carikli
h2. Backup applications.
50
51
It might be a good idea to have a list of backup applications and/or to ship one with Replicant.
52 5 Kurtis Hanna
53
* This backup app might be a good option for Replicant 9 or 10: https://github.com/stevesoltys/backup
54 12 Denis 'GNUtoo' Carikli
* F-droid might also has applications. As F-droid packages are not all FSDG compliant, we would need to make sure that the backup application we recommend or ship are FSDG compliant.
55
56
It might also be a good idea to understand if the backup solution chosen is sustainable in the long term: If the development stop or upstream decide to make the new version proprietary some users might have a hard time adapting to new backup applications or systems.