Add spblob decrypt for secdis method (Pixel 1 non-weaver)

Support decrypting Pixel 1 devices using secdis method with the
gatekeeper instead of weaver.

Add a bit of a dirty workaround to a permissions issue that the
keystore presents because the keystore checks the uid of the
calling process and refuses to let the root user add authorization
tokens. We write the auth token to a file and start a separate
service that runs under the system user. The service reads the
token from the file and adds it to the keystore. You must define
this service in your init.recovery.{hardware}.rc file:

service keystore_auth /sbin/keystore_auth
    disabled
    oneshot
    user system
    group root
    seclabel u:r:recovery:s0

TWRP will run this service when needed.

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

Team Win Recovery Project (TWRP)

You can find a compiling guide here.