Project

General

Profile

RestoreApplicationInternalData » History » Version 24

Denis 'GNUtoo' Carikli, 10/30/2020 03:39 PM
fix /pre typo

1 1 Denis 'GNUtoo' Carikli
h1. RestoreApplicationInternalData
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 2 Denis 'GNUtoo' Carikli
11 15 Denis 'GNUtoo' Carikli
h2. Rationale
12 2 Denis 'GNUtoo' Carikli
13
In some case, it is useful to be able to restore internal applications data:
14 9 Denis 'GNUtoo' Carikli
15
For instance you might need to move the data of an application from a device to another if you want to switch device.
16
17
Another use case is if /data/system/packages.xml or /data/system/appops.xml get corrupted, applications can loose access to their data. This can make the launcher and other applications crash. 
18
19
So while it is possible to recover from that by wiping the data partition in the recovery, sometimes it's very impractical to do that because you might have important data like silence encryption keys and established sessions that you don't want to loose.
20 3 Denis 'GNUtoo' Carikli
21 16 Denis 'GNUtoo' Carikli
h2. Goals
22 1 Denis 'GNUtoo' Carikli
23 13 Denis 'GNUtoo' Carikli
This howto will explain how to move silence data from a device to another.
24 1 Denis 'GNUtoo' Carikli
25
For instance you could want to move from a Galaxy SIII (GT-I9300) to a Galaxy SII (GT-I9100) or vice versa, and you might not want to recreate keys, sessions, etc when moving device.
26
27 16 Denis 'GNUtoo' Carikli
This could also be adapted to restore application data from a block device level backup of the internal eMMC or the internal data partition.
28
29 14 Denis 'GNUtoo' Carikli
h2. Silence
30 1 Denis 'GNUtoo' Carikli
31 14 Denis 'GNUtoo' Carikli
Silence has been chosen as an example for this tutorial because:
32
* It's an application commonly used
33
* Loosing its data (key, sessions) can be painful
34
35 1 Denis 'GNUtoo' Carikli
Silence stores its data in the internal application storage. As far as I know it's not supposed to store any data on the microSD or user storage beside potential backups.
36
37
It might be interesting to make additional tutorial for other cases. For instance for:
38
* Applications that also require data to be on the microSD or user storage.
39
* System applications that have their data in a database.
40 10 Denis 'GNUtoo' Carikli
41 14 Denis 'GNUtoo' Carikli
h2. Requirements 
42
43
This howto assumes that the data partition is unencrypted. If you know how to open encrypted data partition in the recovery, or in a GNU/Linux distribution, it would be great to either modify this tutorial to add information on how to do it, or contact us on the mailing list or through the bugreporting system about it.
44
45
h2. TODO
46
47 1 Denis 'GNUtoo' Carikli
* Point to how to get root
48
* Explain how to handle a corrupted /data/system/packages.xml and /data/system/appops.xml
49
* Explain how to mount a full backup, and why not to restore full backup completely
50
* Explain how and why create a tarball of the application data
51 14 Denis 'GNUtoo' Carikli
52 1 Denis 'GNUtoo' Carikli
h2. Backuping Silence's data from the old device
53
54 19 Denis 'GNUtoo' Carikli
To correctly backup the application data, you need to make sure that the application isn't writing to its data while you are doing the backup and that the data is consistent.
55
56
To make sure of that the easiest way to do that is to go in the recovery: this way the application will not be started automatically and the data is consistent. You will also need a root shell there, so make sure to setup that beforehand.
57
58
If everything is setup correctly, running @adb shell@ from your computer should result in a shell that now looks like this:
59 16 Denis 'GNUtoo' Carikli
<pre>
60 19 Denis 'GNUtoo' Carikli
root@m0:/ #
61 1 Denis 'GNUtoo' Carikli
</pre>
62
63 19 Denis 'GNUtoo' Carikli
Once that you have a shell in the recovery, you need to mount the data partition in /data from within that shell.
64
65
For the Galaxy SIII (GT-I9300), this can be done from your computer with this command:
66 16 Denis 'GNUtoo' Carikli
<pre>
67 19 Denis 'GNUtoo' Carikli
mount /dev/block/platform/*/by-name/USERDATA /data
68 1 Denis 'GNUtoo' Carikli
</pre>
69
70 19 Denis 'GNUtoo' Carikli
We will then create an archive of the silence data. 
71
72
This makes things much easier because with an archive:
73
* We can easily store and move that data.
74
* The archive preserves all its permissions, and it's best to keep them as applications might not work correctly otherwise. For instance in GNU/Linux, the 'sshd' program will refuse to work if some of its configuration files have the wrong permissions.
75
76
The silence data is in @/data/data/org.smssecure.smssecure/@. To make sure that the archive is created correctly and that once decompressed it will create the @org.smssecure.smssecure@ directory (with all the silence data in it) in the current directory, we need to go to @/data/data@ first.
77
78
To do that, we can go in /data/data with the following command:
79 1 Denis 'GNUtoo' Carikli
<pre>
80 19 Denis 'GNUtoo' Carikli
cd /data/data
81 17 Denis 'GNUtoo' Carikli
</pre>
82 16 Denis 'GNUtoo' Carikli
83 19 Denis 'GNUtoo' Carikli
We can then create the archive in the recovery with that command:
84 1 Denis 'GNUtoo' Carikli
<pre>
85
root@m0:/data/data # tar cvpf /org.smssecure.smssecure.tar org.smssecure.smssecure/
86
</pre>
87
88 19 Denis 'GNUtoo' Carikli
This will create the @/org.smssecure.smssecure.tar@ file which is our archive.
89
90
We will then exit the recovery shell as we will then need to type commands on your computer.
91
92
You can exit the recovery shell with the following command:
93 1 Denis 'GNUtoo' Carikli
<pre>
94
root@m0:/ # exit
95
</pre>
96
97 19 Denis 'GNUtoo' Carikli
We're now back on your computer.
98
99
As for now, we've created the archive but it's still in the recovery, so we need to copy it to your computer. 
100
101
This can be done with the following command:
102 1 Denis 'GNUtoo' Carikli
<pre>
103
$ adb pull /org.smssecure.smssecure.tar ./
104
</pre>
105
106 19 Denis 'GNUtoo' Carikli
It will create the @org.smssecure.smssecure.tar@ file in the current directory.
107
108
We will then need to verify that the archive was created correctly. 
109
More precisely we need to check that it will be extracted in the @org.smssecure.smssecure/@ directory, in the current directory, otherwise it could mess up the data partition when it's being uncompressed.
110
111
To do that we can list its content with the following command:
112 1 Denis 'GNUtoo' Carikli
<pre>
113 23 Denis 'GNUtoo' Carikli
tar tvf org.smssecure.smssecure.tar
114 16 Denis 'GNUtoo' Carikli
</pre>
115 1 Denis 'GNUtoo' Carikli
116 19 Denis 'GNUtoo' Carikli
It should output something that will look more or less like that:
117 17 Denis 'GNUtoo' Carikli
<pre>
118 1 Denis 'GNUtoo' Carikli
drwxr-x--x u0_a61/u0_a61     0 2020-10-28 18:58 org.smssecure.smssecure/
119
lrwxrwxrwx root/root         0 2020-10-28 18:58 org.smssecure.smssecure/lib -> /data/app/org.smssecure.smssecure-1/lib/arm
120
[...]
121 17 Denis 'GNUtoo' Carikli
</pre>
122 19 Denis 'GNUtoo' Carikli
What is important to check is that the files and directories starts with @org/smssecure.smssecure/@ or @./org.smssecure.smssecure/@. If not something went wrong during the creation of the backup (for instance you might have forgetten to go in the @/data/data/@ recovery, or this tutorial could contain mistakes or be out of date).
123 1 Denis 'GNUtoo' Carikli
124 23 Denis 'GNUtoo' Carikli
we all is done, we can finally umount the data partition and reboot the device.
125
126
To do that, we need to go back in the device recovery with the following command:
127
<pre>
128
adb shell
129 24 Denis 'GNUtoo' Carikli
</pre>
130 23 Denis 'GNUtoo' Carikli
131
It should output something that looks more or less like that:
132
<pre>
133
root@m0:/ #
134
</pre>
135
136
To do that first we need to go outside of data, else the mount will fail. This can be done with this command:
137
<pre>
138
cd /
139
</pre>
140
141
Then we can simply unmount /data/ with this command:
142
<pre>
143
umount  /data/
144
</pre>
145
146
Then it's a good practice to make sure that everything is written to the data partition before rebooting.
147
We can do that with this command:
148
<pre>
149
sync
150
</pre>
151
152
And we can finally reboot. It can be done with this command:
153
<pre>
154
reboot
155
</pre>
156 16 Denis 'GNUtoo' Carikli
157 14 Denis 'GNUtoo' Carikli
h2. Restoring Silence's data to the new device
158
159 21 Denis 'GNUtoo' Carikli
In the previous section, we did a backup of silence data that is now contained in the org.smssecure.smssecure.tar archive that you have on your computer.
160 1 Denis 'GNUtoo' Carikli
161 21 Denis 'GNUtoo' Carikli
In this section, we will restore that archive to a new device.
162 1 Denis 'GNUtoo' Carikli
163 21 Denis 'GNUtoo' Carikli
First you need to install silence, and if possible, give it the same permissions it had before. If not, we can still fix that later as silence is not required to boot the device, so we can still access the Android settings and fix that afterward. 
164
165
Silence is installed before restoring its data for several reasons:
166
* We need to give it the necessary permissions. If you don't do that it might crash at startup once the data is restored. However it's still possible to fix it when it happens.
167
* We need a new @/data/data/org.smssecure.smssecure@ directory to be created to be able to easily find the new username in which silence is running, as right after restoring the backup will need to fix the permissions of the new data to use this new username.
168
169
Once Silence is installed, you will also need to enable root shells in the recovery like you did when doing a backup of Silence data.
170
171
Here too, it's done this way to make sure that the application isn't writing to its data while you are restoring the data from the older device.
172
173
To make sure of that, here too, the easiest way to do that is to go in the recovery: this way the application will not be started automatically and the data will be restored while the application isn't started.
174
175
You will also need a root shell in the recovery of this new device, so make sure to setup that beforehand.
176
177
If everything is setup correctly, running @adb shell@ from your computer should result in a shell that now looks like this:
178 1 Denis 'GNUtoo' Carikli
<pre>
179 21 Denis 'GNUtoo' Carikli
root@m0:/ #
180 1 Denis 'GNUtoo' Carikli
</pre>
181
182 21 Denis 'GNUtoo' Carikli
Once that you have a shell in the recovery, you need to mount the data partition in /data from within that shell.
183
184
For the Galaxy SIII (GT-I9300), this can be done from your computer with this command:
185 5 Denis 'GNUtoo' Carikli
<pre>
186 21 Denis 'GNUtoo' Carikli
mount /dev/block/platform/*/by-name/USERDATA /data
187 5 Denis 'GNUtoo' Carikli
</pre>
188 7 Denis 'GNUtoo' Carikli
189 21 Denis 'GNUtoo' Carikli
If we extract the archive we made eariler, it will create the @org.smssecure.smssecure@ directory and extract everything in it. 
190 7 Denis 'GNUtoo' Carikli
191 21 Denis 'GNUtoo' Carikli
Since the data of Silence is in @/data/data/org.smssecure.smssecure/@ we then need to go in @/data/data@ before extracting the archive. This way when extracting it, everything will be at the place it's supposed to be.
192 5 Denis 'GNUtoo' Carikli
193 21 Denis 'GNUtoo' Carikli
To do that, we can go in /data/data with the following command:
194
<pre>
195
cd /data/data
196
</pre>
197 5 Denis 'GNUtoo' Carikli
198 21 Denis 'GNUtoo' Carikli
However we can't restore Silence data yet as:
199
* It could mix both data sets.
200
* We need some information (silence username) contained in the new silence data.
201 1 Denis 'GNUtoo' Carikli
202 21 Denis 'GNUtoo' Carikli
As applications are sandboxed, and that as part of that sandboxing, they have their own usernames, we need to retrieve this username, as we'll reuse it to fix the restored silence data permissions.
203 1 Denis 'GNUtoo' Carikli
204 21 Denis 'GNUtoo' Carikli
To get that username we can just use @ls -ld@ on the directory holding the internal data of the newly installed silence (which is in @/data/data/org.smssecure.ssmsecure@).
205 1 Denis 'GNUtoo' Carikli
206
So with @ls -ld@ we can find the application username in this way:
207
<pre>
208
root@m0:/data/data # ls -ld org.smssecure.smssecure
209
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
210 5 Denis 'GNUtoo' Carikli
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
211
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
212 1 Denis 'GNUtoo' Carikli
drwxr-x--x 2 u0_a61 u0_a61 4096 2012-01-01 00:01 org.smssecure.smssecure
213 3 Denis 'GNUtoo' Carikli
</pre>
214
215 1 Denis 'GNUtoo' Carikli
Here the users and groups are @u0_a61@.
216 5 Denis 'GNUtoo' Carikli
217 21 Denis 'GNUtoo' Carikli
We will then need use this information later on to restore the silence data from the other device: If we restore Silence's data as-is it will most likely have wrong permissions: when the the Silence application was installed on the older device, it was assigned an username. As this username depends on the number of applications that were installed before it, we cannot expect it to always be the same between the two devices.
218 1 Denis 'GNUtoo' Carikli
219 21 Denis 'GNUtoo' Carikli
We will also move the data of the silence we just installed. Moving it can be done with this command:
220 1 Denis 'GNUtoo' Carikli
<pre>
221 21 Denis 'GNUtoo' Carikli
mv org.smssecure.smssecure org.smssecure.smssecure.delme
222 5 Denis 'GNUtoo' Carikli
</pre>
223 1 Denis 'GNUtoo' Carikli
224 21 Denis 'GNUtoo' Carikli
Moving it has several advantages over just deleting it:
225 1 Denis 'GNUtoo' Carikli
* We can still verify the username later on to see if it matches with the backup we restored.
226
* We can interrupt this tutorial more easily if something goes wrong.
227
228 21 Denis 'GNUtoo' Carikli
To be sure that the data is restored in the right directory, we will need to verify that the archive will extract its files in the @org.smssecure.smssecure@ directory and not directly in the current directory (which should be @/data/data@ as we moved into it before):
229
230
The archive can be verified with the following command:
231 1 Denis 'GNUtoo' Carikli
<pre>
232 21 Denis 'GNUtoo' Carikli
tar tf /org.smssecure.smssecure.tar
233
</pre>
234
235
It will output something that looks a bit like that:
236
<pre>
237 1 Denis 'GNUtoo' Carikli
./org.smssecure.smssecure/
238 5 Denis 'GNUtoo' Carikli
./org.smssecure.smssecure/lib -> /data/app/org.smssecure.smssecure-1/lib/arm
239 1 Denis 'GNUtoo' Carikli
[...]
240
</pre>
241 21 Denis 'GNUtoo' Carikli
We will need to verify that everything starts with @./org.smssecure.smssecure/@ or @org.smssecure.smssecure/@. Here it is the case, so the archive is good.
242 1 Denis 'GNUtoo' Carikli
243 5 Denis 'GNUtoo' Carikli
If we had something like that instead:
244 1 Denis 'GNUtoo' Carikli
<pre>
245
root@m0:/data/data # tar tf /org.smssecure.smssecure.tar
246
./lib -> /data/app/org.smssecure.smssecure-1/lib/arm
247
[...]
248
</pre>
249
250 21 Denis 'GNUtoo' Carikli
Then it's best to recreate the archive. In that case, if you want to abort to restart later on, you could also move back org.smssecure.smsecure.delme to org.smssecure.smssecure if needed.
251 5 Denis 'GNUtoo' Carikli
252 21 Denis 'GNUtoo' Carikli
If the archive was good, we can then proceed to extract the application data.
253 5 Denis 'GNUtoo' Carikli
254 21 Denis 'GNUtoo' Carikli
This can be done with the following command:
255 5 Denis 'GNUtoo' Carikli
<pre>
256 21 Denis 'GNUtoo' Carikli
tar xpf /org.smssecure.smssecure.tar --numeric-owner
257 3 Denis 'GNUtoo' Carikli
</pre>
258 5 Denis 'GNUtoo' Carikli
259 21 Denis 'GNUtoo' Carikli
Here we can see that the username differs from the one we need with the following command:
260 3 Denis 'GNUtoo' Carikli
<pre>
261 21 Denis 'GNUtoo' Carikli
ls -ld org.smssecure.smssecure 
262
</pre>
263
264
It should then print something like that ( the lines starting with @__bionic_open_tzdata:@ can be ignored):
265
<pre>
266 3 Denis 'GNUtoo' Carikli
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
267 1 Denis 'GNUtoo' Carikli
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
268 5 Denis 'GNUtoo' Carikli
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
269 3 Denis 'GNUtoo' Carikli
drwxr-x--x 9 u0_a63 u0_a63 4096 2012-01-01 00:21 org.smssecure.smssecure
270
</pre>
271 21 Denis 'GNUtoo' Carikli
Here we have @u0_a63@, while the new silence data used @u0_a61@, so we need to fix it.
272 5 Denis 'GNUtoo' Carikli
273 21 Denis 'GNUtoo' Carikli
This can be done with the @chown@ command, like that:
274 3 Denis 'GNUtoo' Carikli
<pre>
275
root@m0:/data/data # chown u0_a61:u0_a61 -R org.smssecure.smssecure            
276
root@m0:/data/data # 
277
</pre>
278 21 Denis 'GNUtoo' Carikli
You need to replace @u0_a61@ by the username you found earlier.
279 1 Denis 'GNUtoo' Carikli
280 21 Denis 'GNUtoo' Carikli
When this is done, we don't need the @org.smssecure.smssecure.delme@ directory anymore, and it's best to remove it not to create any issues later on.
281
282 1 Denis 'GNUtoo' Carikli
This can be done with the following command:
283 3 Denis 'GNUtoo' Carikli
<pre>
284 21 Denis 'GNUtoo' Carikli
rm -rf org.smssecure.smssecure.delme
285 1 Denis 'GNUtoo' Carikli
</pre>
286
287 21 Denis 'GNUtoo' Carikli
If everything went fine, it shouldn't output anything.
288 1 Denis 'GNUtoo' Carikli
289 21 Denis 'GNUtoo' Carikli
We are not done yet at restoring the permissions as in addition to the standard unix permissions which we just fixed, Android also uses selinux, which also has its own permissions.
290
291
The restorecon command can be used to fixup selinux permissions.
292
293
Here's its help (it can be shown just by typing @restorecon@):
294 1 Denis 'GNUtoo' Carikli
<pre>
295
usage: restorecon [-D] [-F] [-R] [-n] [-v] FILE...
296 5 Denis 'GNUtoo' Carikli
297 1 Denis 'GNUtoo' Carikli
Restores the default security contexts for the given files.
298
299
-D	apply to /data/data too
300
-F	force reset
301
-R	recurse into directories
302 6 Denis 'GNUtoo' Carikli
-n	don't make any changes; useful with -v to see what would change
303
-v	verbose: show any changes
304
305 5 Denis 'GNUtoo' Carikli
restorecon: Needs 1 argument
306
</pre>
307 3 Denis 'GNUtoo' Carikli
308
So to use it to fixup the selinux permissions, we can use the following command:
309
<pre>
310 21 Denis 'GNUtoo' Carikli
restorecon -D -F -R -v /data/
311 1 Denis 'GNUtoo' Carikli
</pre>
312
313
The order of the arguments (-D, -F, etc) seem to be important here as the wrong order might result in nothing being done.
314
Without the @-v@ argument and with the wrong order of argument, it might make you think that it did its job while it did nothing.
315
316
It will then print something that looks like that:
317
<pre>
318
SELinux: Loaded file_contexts contexts from /file_contexts.
319
[...]
320
SELinux:  Relabeling /data/data/org.smssecure.smssecure from u:object_r:system_data_file:s0 to u:object_r:app_data_file:s0:c512,c768.
321
SELinux:  Relabeling /data/data/org.smssecure.smssecure/lib from u:object_r:system_data_file:s0 to u:object_r:app_data_file:s0:c512,c768.
322
[...]
323
</pre>
324
325 21 Denis 'GNUtoo' Carikli
Now the permissions fixing is finally done.
326 1 Denis 'GNUtoo' Carikli
327 21 Denis 'GNUtoo' Carikli
we can then umount the data partition and reboot.
328 1 Denis 'GNUtoo' Carikli
329 21 Denis 'GNUtoo' Carikli
To do that first we need to go outside of data, else the mount will fail. This can be done with this command:
330 1 Denis 'GNUtoo' Carikli
<pre>
331 21 Denis 'GNUtoo' Carikli
cd /
332 1 Denis 'GNUtoo' Carikli
</pre>
333 3 Denis 'GNUtoo' Carikli
334 21 Denis 'GNUtoo' Carikli
Then we can simply unmount /data/ with this command:
335 1 Denis 'GNUtoo' Carikli
<pre>
336 21 Denis 'GNUtoo' Carikli
umount  /data/
337 5 Denis 'GNUtoo' Carikli
</pre>
338
339
Then it's a good practice to make sure that everything is written to the data partition before rebooting.
340 21 Denis 'GNUtoo' Carikli
We can do that with this command:
341 1 Denis 'GNUtoo' Carikli
<pre>
342 21 Denis 'GNUtoo' Carikli
sync
343 1 Denis 'GNUtoo' Carikli
</pre>
344 16 Denis 'GNUtoo' Carikli
345 21 Denis 'GNUtoo' Carikli
And we can finally reboot. It can be done with this command:
346 5 Denis 'GNUtoo' Carikli
<pre>
347 21 Denis 'GNUtoo' Carikli
reboot
348 5 Denis 'GNUtoo' Carikli
</pre>
349
350 21 Denis 'GNUtoo' Carikli
h2. How to fix Silence if it still refuses to start with the restored data.
351 1 Denis 'GNUtoo' Carikli
352 21 Denis 'GNUtoo' Carikli
After rebooting, silence may still refuse to start if it doesn't have the right permissions.
353
354
To identify if it doesn't start due to missing permissions, you can use the following command from your computer:
355 1 Denis 'GNUtoo' Carikli
<pre>
356 21 Denis 'GNUtoo' Carikli
adb logcat -b main
357 5 Denis 'GNUtoo' Carikli
</pre>
358
359 21 Denis 'GNUtoo' Carikli
Then you need to wait until no more new logs were printed, otherwise it'd be harder to find the crash we're looking for in this huge amount of logs.
360 5 Denis 'GNUtoo' Carikli
361 21 Denis 'GNUtoo' Carikli
To better identify where the part where Silence crash starts and stops, you could for instance create a separation in the logs being printed by adding
362
many new lines once no more logs are printed, right before launching silence. This can be done by pressing enter multiple times or by pressing many time a character like @=@ to create a visible line.
363 1 Denis 'GNUtoo' Carikli
364 21 Denis 'GNUtoo' Carikli
You can then launch silence, and as soon as the crash is done, do the same to mark the end, not to have too much logs to read.
365
366
When Silence crashed, the following appeard in the logs:
367
<pre>
368 5 Denis 'GNUtoo' Carikli
01-01 01:27:48.260  4126  4126 D AndroidRuntime: Shutting down VM
369
01-01 01:27:48.265  4126  4126 E AndroidRuntime: FATAL EXCEPTION: main
370
01-01 01:27:48.265  4126  4126 E AndroidRuntime: Process: org.smssecure.smssecure, PID: 4126
371
01-01 01:27:48.265  4126  4126 E AndroidRuntime: Theme: themes:{}
372
01-01 01:27:48.265  4126  4126 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.smssecure.smssecure.ApplicationContext: java.lang.SecurityException: getActiveSubscriptionInfoList: Neither user 10061 nor current process has android.permission.READ_PHONE_STATE.
373
01-01 01:27:48.265  4126  4126 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4754)
374 1 Denis 'GNUtoo' Carikli
[...]
375 5 Denis 'GNUtoo' Carikli
</pre>
376
377 21 Denis 'GNUtoo' Carikli
Here we can clearly see that it's a permission issue as it says that @Neither user 10061 nor current process has android.permission.READ_PHONE_STATE@.
378
And we know it's from silence as it has @Process: org.smssecure.smssecure@.
379 4 Denis 'GNUtoo' Carikli
380 21 Denis 'GNUtoo' Carikli
To fix that issue, I went in @Settings->Apps->Silence->Permissions@ and gave it all the permissions it needed.
381
382
I had this issue because I didn't even launch silence after installing it, so it couldn't ask me for the permissions it needed.
383
384
And the silence of the former device probably wrote in its data that it already asked the permissions not to re-ask for it each time.
385
386
h2. How to find which directory holds the internal data of an application.
387
388
The directories holding the data are in @/data/data/@ and have the internal name of the application.
389
390
Here are some well known name correspondances:
391
392
| Internal name           | Application                                 |
393
| org.smssecure.smssecure | Silence                                     |
394
| com.android.dialer      | Dialer (Android's stock dialer application) |
395
| fil.libre.repwifiapp    | RepWiFi                                     |
396
397
So silence RepWiFi will be @/data/data/fil.libre.repwifiapp@
398
399
For pakcages comming from f-droid, the f-droid website can find the correspondance.
400
401
For instance the "Silence page":https://f-droid.org/en/packages/org.smssecure.smssecure/ has @org.smssecure.smssecure@ in its URL and inside the page.