Project

General

Profile

MigrateContactsDatabase » History » Version 10

Denis 'GNUtoo' Carikli, 05/08/2021 10:14 PM

1 1 Denis 'GNUtoo' Carikli
h1. MigrateContactsDatabase
2 2 Denis 'GNUtoo' Carikli
3
h2. Warning
4
5
* This article is a work in progress
6
* It hasn't been tested yet and might contain mistakes
7
* It needs to be more clear for less technical users
8
9
h2. Migration
10
11 4 Denis 'GNUtoo' Carikli
{{toc}}
12 1 Denis 'GNUtoo' Carikli
13 7 Denis 'GNUtoo' Carikli
h2. Backuping your contacts in a file
14 4 Denis 'GNUtoo' Carikli
15 7 Denis 'GNUtoo' Carikli
Here's a way to do it:
16 1 Denis 'GNUtoo' Carikli
17 7 Denis 'GNUtoo' Carikli
First, you'll need to make sure Replicant is booted on the device and open the stock contact application.
18
19 8 Denis 'GNUtoo' Carikli
Then if it shows a screen with "No contacts." in it, you won't need to backup the contacts, you can skip this section (Backuping your contacts), but you'll still need to follow the rest of the tutorial if you don't want your device to crash when installing a Replicant version with a different contact database format.
20 7 Denis 'GNUtoo' Carikli
21
If it shows some contacts, you will then need to backup them to a file.
22
23
To do that you will first need to go in the contact application settings. 
24
25
To do that, once you are in the contact application, you can press the settings button in the application or press the settings button (On the Galaxy SIII, it's the button on the left of the home button).
26
27
That will display a menu. You will then have to select "Import/export" and then "Export to .vcf file".
28
29
It will then display a new screen with many contacts.
30
31
You will need to again press the settings button and a new menu with only one option ("All [ ]") will appear. 
32
33
You will need to select this option to select all contacts.
34
35
Once this is done, a new Tick button will appear in the screen. You will need to press it.
36
37
Once this is done you can save your contact to a file in the device, and copy that file somewhere safe (like on your laptop). 
38
39
This way if you end up having to erase your data somehow, you will still be able to easily restore your contacts.
40 4 Denis 'GNUtoo' Carikli
41
h2. Setup ADB
42
43
Follow the instructions for [[ADB|setting up ADB on your computer]] so that you can access a root shell on your device.
44
45
*NOTE*: when prompted on your Replicant device, make sure that you check the box that says *Always allow from this computer* when you grant your computer USB debugging permissions. Otherwise, you will be unable to obtain root shell access on your Replicant device when you reboot it into the recovery OS to actually perform the backup.
46
47
*NOTE*: for security reasons, you may want to [[ADB#Revoking-all-computers-USB-debugging-permissions|revoke these non-expiring permissions]] once the backup is complete.
48
49 6 Denis 'GNUtoo' Carikli
h2. Mount the data partition
50
51 9 Denis 'GNUtoo' Carikli
h3. Galaxy S III (GT-I9300)
52
53
<pre>
54
mount /dev/block/platform/*/by-name/USERDATA /data
55
</pre>
56
57
TODO: other devices + background text.
58 6 Denis 'GNUtoo' Carikli
59 4 Denis 'GNUtoo' Carikli
h2. Reboot into the recovery
60
61
To reboot in the recovery, you can follow the instructions in the [[RebootIntoTheRecovery]] wiki page.
62
63
h2. Erase your contact database
64
65
Once in the recovery, you will then be able to erase your contact database:
66
67 2 Denis 'GNUtoo' Carikli
<pre>
68 1 Denis 'GNUtoo' Carikli
rm -rf /data/data/com.android.providers.contacts/databases/
69
</pre>
70 4 Denis 'GNUtoo' Carikli
71 10 Denis 'GNUtoo' Carikli
TODO: Reboot to bootloader (do not reboot into replicant)
72
73 4 Denis 'GNUtoo' Carikli
h2. Install the new Replicant images
74
75
Once the backup is done, you can proceed to install the Replicant images that have the contact database format to migrate to.
76
77
h2. Revoke USB debugging permissions
78
79
If you don't need @USB debugging permissions@ anymore, it might be a good idea to remove them. The [[ADB#Revoking-all-computers-USB-debugging-permissions|Revoking all computer's USB debugging permissions]] section in the ADB wiki page explains how to do that.
80
81
That's it! Your device's EFS partition is now backed up. Your device should be running Replicant normally again.