2

Restoring the Data partition from TWRP fails due to a missing e4crypt policy:

  ==> extracting: //data/user/10/ (mode 40771, directory)
Cannot find key for 10
error looking up proper e4crypt policy for '//data/user/10/' - 1CE10
tar_extract_file(): failed to extract //data/user/10/ !!!

See also my comment on TWRP issue 964. According to the e4crypt man page, a policy is an encryption key identifier consisting of 16 hexadecimal characters.

Where is that policy stored? In EFS?

feklee
  • 510
  • 2
  • 6
  • 14
  • keep it on the twrp development and claim it to the maintainer specific for your device, it is off-topic here. keys are stored /data/misc/keystore according other issues that account may be related to parallel apps. you have already asked in xda support thread, there it is placed well – alecxs Aug 14 '20 at 10:33
  • you can ask for alternative methods to restore a twrp backup, that would make your question on topic – alecxs Aug 14 '20 at 10:43
  • *sudo bash bckp2win.sh -f data.ext4.win* -e /data/user/10* may give you a good base to work with (although it requires manual restoring with GNU tar) – alecxs Aug 14 '20 at 10:52
  • This is a general question about Android. It's not specific to my device, and very likely not specific to TWRP either. So I don't understand why the question should be off topic here. – feklee Aug 15 '20 at 02:10
  • because development is off-topic (usage is not) – alecxs Aug 15 '20 at 02:15
  • 1
    page 2 of the 255 error thread (xda support thread has linked under Tips in OP) says that user 10 is work profile. that is similar to the parallel apps issue (user 999) TWRP doesn't support multi-user, you must remove user 10/999 before creating/restoring backups – alecxs Aug 15 '20 at 15:03
  • 1
    https://android.googlesource.com/platform/system/extras/+/refs/heads/master/libfscrypt/fscrypt.cpp some stuff to read https://www.mjmwired.net/kernel/Documentation/filesystems/fscrypt.rst – alecxs Aug 15 '20 at 16:38
  • 1
    according to your recovery.log lines 79-124 it is located /data/misc/vold and TWRP can decrypt only for user 0. restoring might work once the user 10 exist (not sure) https://android.stackexchange.com/q/216155 – alecxs Aug 16 '20 at 12:25
  • @alecxs Well, first of all, to me this is usage. I'm not an Android developer. Anyhow, thanks a lot for digging so deep into the issue which made me post this question! (written to be potentially of general interest, and not just specific to my issue) The weird thing is, I was only using one user. I don't even know what a work profile is. It must've been enabled by accident. I will probably try another recovery attempt in a few days. At the moment, I need my phone too much. – feklee Aug 17 '20 at 02:13

0 Answers0