Fix bldr msg file open mode when offset specified

It was pointed out to me by gmrt that O_APPEND is incorrect, as lseek
before writing would be undone (perhaps we avoided this issue due to
an inability to write beyond the end of a partition) and O_RDWR is not
necessary to lseek. When AOSP switched from fopen to open, they also
removed the full partition wipe (fopen in wb mode) before each write,
so this is no longer an issue. Completely restore the original AOSP
file access mode flags.

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

Team Win Recovery Project (TWRP)

You can find a compiling guide here.