Update lock pattern types for android 11

The stored id for the different types of the lock pattern was chnaged
with Android 11. You can find the updated list in the LockPatternUtils:

    https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-11.0.0_r25/core/java/com/android/internal/widget/LockPatternUtils.java#113

It was changed in 5e891bcc04556a3595ab349381acc2a2e36a69d1:

    https://android.googlesource.com/platform/frameworks/base/+/5e891bcc04556a3595ab349381acc2a2e36a69d1

The old CREDENTIAL_TYPE_PASSWORD_OR_PIN was essentialy split in
CREDENTIAL_TYPE_PASSWORD and CREDENTIAL_TYPE_PASSWORD_OR_PIN.

This code updates the matching in twrp, so that the correct unlocking
method for file base decryption can be found. Without these changes twrp
always try to use the default password and obviously fails. With these
changes the usual password dialog is shown and the decryption is
successfully.

Change-Id: Ia8d47223b30a5301d4b9d2230241039612055ebb
Signed-off-by: Alexander Sulfrian <asulfrian@zedat.fu-berlin.de>
Co-authored-by: althafvly <althafvly@gmail.com>
1 file changed
tree: ffb5d3535110374e8e2f9c5ef6a0ffed73c8221a
  1. .github/
  2. adbbu/
  3. applypatch/
  4. attr/
  5. bmlutils/
  6. boot_control/
  7. bootloader_message/
  8. bootloader_message_twrp/
  9. crypto/
  10. dosfstools/
  11. edify/
  12. etc/
  13. exfat/
  14. fb2png/
  15. flashutils/
  16. fonts/
  17. fuse/
  18. gpt/
  19. gui/
  20. htcdumlock/
  21. injecttwrp/
  22. libblkid/
  23. libcrecovery/
  24. libmincrypt/
  25. libpixelflinger/
  26. libtar/
  27. minadbd/
  28. minadbd21/
  29. minui/
  30. minui21/
  31. minuitwrp/
  32. minzip/
  33. mmcutils/
  34. mtdutils/
  35. mtp/
  36. openaes/
  37. orscmd/
  38. otafault/
  39. otautil/
  40. ozip_decrypt/
  41. pigz/
  42. prebuilt/
  43. private/
  44. res/
  45. res-hdpi/
  46. res-mdpi/
  47. res-xhdpi/
  48. res-xxhdpi/
  49. res-xxxhdpi/
  50. scripts/
  51. sepolicy/
  52. simg2img/
  53. tests/
  54. toolbox/
  55. tools/
  56. toybox/
  57. twrpDigest/
  58. twrpTarMain/
  59. uncrypt/
  60. update_verifier/
  61. updater/
  62. verifier24/
  63. .clang-format
  64. .gitignore
  65. adb_install.cpp
  66. adb_install.h
  67. Android.bp
  68. Android.mk
  69. asn1_decoder.cpp
  70. asn1_decoder.h
  71. BasePartition.cpp
  72. bootloader.h
  73. CleanSpec.mk
  74. common.h
  75. data.cpp
  76. data.hpp
  77. default_device.cpp
  78. device.cpp
  79. device.h
  80. exclude.cpp
  81. exclude.hpp
  82. find_file.cpp
  83. find_file.hpp
  84. fixContexts.cpp
  85. fixContexts.hpp
  86. fuse.h
  87. fuse_sdcard_provider.cpp
  88. fuse_sdcard_provider.h
  89. fuse_sideload.cpp
  90. fuse_sideload.h
  91. fuse_sideload22.cpp
  92. fuse_sideload22.h
  93. infomanager.cpp
  94. infomanager.hpp
  95. install.cpp
  96. install.h
  97. installcommand.cpp
  98. installcommand.h
  99. interlace-frames.py
  100. legacy_properties.h
  101. legacy_property_service.cpp
  102. legacy_property_service.h
  103. mounts.c
  104. mounts.cpp
  105. mounts.h
  106. NOTICE
  107. openrecoveryscript.cpp
  108. openrecoveryscript.hpp
  109. OWNERS
  110. partition.cpp
  111. partitionmanager.cpp
  112. partitions.hpp
  113. PREUPLOAD.cfg
  114. progresstracking.cpp
  115. progresstracking.hpp
  116. README.md
  117. recovery-persist.cpp
  118. recovery-persist.rc
  119. recovery-refresh.cpp
  120. recovery-refresh.rc
  121. recovery.cpp
  122. recovery_ui.h
  123. roots.cpp
  124. roots.h
  125. rotate_logs.cpp
  126. rotate_logs.h
  127. screen_ui.cpp
  128. screen_ui.h
  129. set_metadata.cpp
  130. set_metadata.h
  131. stub_ui.h
  132. tarWrite.c
  133. tarWrite.h
  134. tw_atomic.cpp
  135. tw_atomic.hpp
  136. twcommon.h
  137. twinstall.cpp
  138. twinstall.h
  139. twinstallorig.cpp
  140. twinstallorig.h
  141. twrp-functions.cpp
  142. twrp-functions.hpp
  143. twrp.cpp
  144. twrpAdbBuFifo.cpp
  145. twrpAdbBuFifo.hpp
  146. twrpDigestDriver.cpp
  147. twrpDigestDriver.hpp
  148. twrpTar.cpp
  149. twrpTar.h
  150. twrpTar.hpp
  151. ui.cpp
  152. ui.h
  153. variables.h
  154. verifier.cpp
  155. verifier.h
  156. vr_device.cpp
  157. vr_ui.cpp
  158. vr_ui.h
  159. wear_device.cpp
  160. wear_ui.cpp
  161. wear_ui.h
  162. zipwrap.cpp
  163. zipwrap.hpp
README.md

Team Win Recovery Project (TWRP)

You can find a compiling guide here.