Project

General

Profile

BackupTheDataPartition » History » Version 1

Denis 'GNUtoo' Carikli, 10/27/2020 03:13 PM
Initial import

1 1 Denis 'GNUtoo' Carikli
h1. How to backup the data partition
2
3
{{toc}}
4
5
h2. /!\ Warning: Draft
6
7
This article is in draft form and is being written:
8
* Everybody is welcome to contribute
9
* Some things might not be accurate yet, so beware before using the information contained in it.
10
11
Also a big part of this article is copied from [[BackupTheEFS]], it would be better to find a way to include content instead.
12
13
h2. Introduction
14
15
Many Android devices have a data partition.
16
17
If is used for several distinct things that are often mounted in different locations at the same time (through fuse).
18
19
| Mount points    | Content |
20
| /data/          | Applications (internal) data |
21
| /sdcard
22
  /storage/<UUID> | User accessible storage to store music, photos, etc |
23
24
TODO:
25
* Explain that the user accessible storage is not always present
26
* Explain that it depends on the devices (GTA04)
27
28
h2. Concerns about the application internal data
29
30
TODO:
31
* Explain the issue about the Replicant version <-> application data
32
33
34
h2. Howto
35
36
TODO: 
37
* Link to the EFS backup first part
38
39
h4. Galaxy S III (GY-I9300)
40
41
First, you need to make sure that the data partition is not mounted. 
42
43
To do that, you can run this command:
44
<pre>
45
adb shell "umount -l /data"
46
</pre>
47
48
If the /data partition was mounted, it will unmount it. This will look like that:
49
<pre>
50
$ adb shell "umount -l /data"
51
$ 
52
</pre>
53
54
If it was not mounted, it will instead show an error that we can ignore:
55
<pre>
56
$ adb shell "umount -l /data"
57
umount: /data: Invalid argument
58
</pre>
59
60
Once this is taken care of, we can backup the partition with the following command:
61
<pre>
62
adb pull /dev/block/platform/dw_mmc/by-name/USERDATA ./
63
</pre>
64
65
h2. See also
66
67
* The [[BackupsResearch]] page has information on why the backup is done this way. It might also be useful to read and contribute to it if you intend to change the way the backups are done.