Add ozip decryption for Oppo/Realme device

This function will automatically decrypt .ozip file in a .zip and it will
save the .zip in the same folder of the .ozip and with the same name.
After the decryption, the flash will start.

To enable this function you have to set a Boardconfig flag with the
decryption key like i did here:

https://github.com/mauronofrio/android_device_realme_RMX1901/commit/a30625f80a31b9b85e4948fc9f9beeb61d5bcb8a

Original projects:
https://github.com/sabpprook/ozip2zip
https://github.com/bkerler/oppo_ozip_decrypt

Change-Id: Ic93243a565008c442bcf2992069b2801532ac7c1
(cherry picked from commit 0ff59845f2f8dddedb4cee9a9faf86a6294cce66)
11 files changed
tree: cbbb1387642feafd197b6fc3520599b95ccf1713
  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. fastboot/
  15. fb2png/
  16. flashutils/
  17. fonts/
  18. fuse/
  19. fuse_sideload/
  20. fuse_sideload28/
  21. gpt/
  22. gui/
  23. htcdumlock/
  24. injecttwrp/
  25. install/
  26. install28/
  27. libblkid/
  28. libcrecovery/
  29. libmincrypt/
  30. libpixelflinger/
  31. libtar/
  32. minadbd/
  33. minadbd21/
  34. minui/
  35. minui21/
  36. minuitwrp/
  37. minzip/
  38. misc_writer/
  39. mmcutils/
  40. mtdutils/
  41. mtp/
  42. openaes/
  43. orscmd/
  44. otafault/
  45. otautil/
  46. ozip_decrypt/
  47. pigz/
  48. prebuilt/
  49. recovery_ui/
  50. res/
  51. res-hdpi/
  52. res-mdpi/
  53. res-xhdpi/
  54. res-xxhdpi/
  55. res-xxxhdpi/
  56. scripts/
  57. sepolicy/
  58. simg2img/
  59. tests/
  60. tools/
  61. twrpDigest/
  62. twrpTarMain/
  63. uncrypt/
  64. update_verifier/
  65. updater/
  66. updater_sample/
  67. verifier24/
  68. verifier28/
  69. .clang-format
  70. .gitignore
  71. Android.bp
  72. Android.mk
  73. BasePartition.cpp
  74. bootloader.h
  75. CleanSpec.mk
  76. common.h
  77. data.cpp
  78. data.hpp
  79. exclude.cpp
  80. exclude.hpp
  81. find_file.cpp
  82. find_file.hpp
  83. fixContexts.cpp
  84. fixContexts.hpp
  85. fsck_unshare_blocks.cpp
  86. fsck_unshare_blocks.h
  87. fuse.h
  88. fuse_sideload22.cpp
  89. fuse_sideload22.h
  90. infomanager.cpp
  91. infomanager.hpp
  92. interlace-frames.py
  93. legacy_properties.h
  94. mounts.c
  95. NOTICE
  96. openrecoveryscript.cpp
  97. openrecoveryscript.hpp
  98. OWNERS
  99. partition.cpp
  100. partitionmanager.cpp
  101. partitions.hpp
  102. PREUPLOAD.cfg
  103. progresstracking.cpp
  104. progresstracking.hpp
  105. README.md
  106. recovery-persist.cpp
  107. recovery-persist.rc
  108. recovery-refresh.cpp
  109. recovery-refresh.rc
  110. recovery.cpp
  111. recovery.h
  112. recovery_main.cpp
  113. recovery_ui.h
  114. tarWrite.c
  115. tarWrite.h
  116. twcommon.h
  117. twinstall.cpp
  118. twinstall.h
  119. twinstallorig.cpp
  120. twinstallorig.h
  121. twrp-functions.cpp
  122. twrp-functions.hpp
  123. twrp.cpp
  124. twrpAdbBuFifo.cpp
  125. twrpAdbBuFifo.hpp
  126. twrpApex.cpp
  127. twrpApex.hpp
  128. twrpDigestDriver.cpp
  129. twrpDigestDriver.hpp
  130. twrpTar.cpp
  131. twrpTar.h
  132. twrpTar.hpp
  133. variables.h