1
|
You may have to install replicant again at the end of this procedure.
|
2
|
|
3
|
You should be in a directory containing these files:
|
4
|
|
5
|
* The script fix-permissions.sh
|
6
|
* The files from your EFS partition's backup in in a directory named efs/.
|
7
|
* A list like the one found on this Page named file-list.txt in our commands:
|
8
|
https://redmine.replicant.us/projects/replicant/wiki/GT-I9300EFSContent
|
9
|
|
10
|
Note that lists printed by some ls programs that use a different format for
|
11
|
the date, are not properly parsed by fix-permissions.sh and it will not
|
12
|
change the permissions then.
|
13
|
|
14
|
Do this connected to the Recovery:
|
15
|
|
16
|
adb shell 'mkdir /efs'
|
17
|
adb shell 'mkfs.ext4 /dev/block/platform/*/by-name/EFS'
|
18
|
adb shell 'mount /dev/block/platform/*/by-name/EFS /efs'
|
19
|
tar -cf efs.tar efs
|
20
|
adb push efs.tar /efs
|
21
|
adb push fix-permissions.sh /efs
|
22
|
adb push file-list.txt /efs
|
23
|
adb shell 'cd /efs && tar -xf efs.tar'
|
24
|
adb shell 'chmod a+x /efs/fix-permissions.sh'
|
25
|
adb shell 'cd /efs && ./fix-permissions.sh file-list.txt'
|
26
|
|
27
|
If a file that is not found just has a slightly different name
|
28
|
in your backup, try changing the mode bits, owner and group "by hand":
|
29
|
|
30
|
00002.PRV not found.
|
31
|
The line was:
|
32
|
-rw-rw-rw- 1 root root 3 Jan 28 2014 00002.PRV
|
33
|
|
34
|
$ adb shell "find /efs -name '*PRV'"
|
35
|
/efs/efs/drm/playready/00003.PRV
|
36
|
|
37
|
$adb shell 'chmod u=rw,g=rw,o=rw /efs/efs/drm/playready/00003.PRV'
|
38
|
$adb shell 'chown root /efs/efs/drm/playready/00003.PRV'
|
39
|
$adb shell 'chgrp root /efs/efs/drm/playready/00003.PRV'
|
40
|
|
41
|
Continue:
|
42
|
|
43
|
adb shell 'mv /efs/efs/* /efs'
|
44
|
adb shell 'cd /efs && rm -R efs efs.tar file-list.txt fix-permissions.sh'
|
45
|
adb shell 'umount /efs'
|
46
|
adb shell 'rm -R /efs'
|
47
|
adb shell 'cat /dev/block/platform/*/by-name/EFS > /EFS.img'
|
48
|
mv EFS.img EFS.backup.img
|
49
|
adb pull /EFS.img .
|
50
|
|
51
|
If the phone only boots into the Recovery anymore, install
|
52
|
Replicant again via the Recovery's Update Button, but you need not
|
53
|
wipe stuff, in contrast to the usual installation procedure.
|