Work around MEMERASE ioctl for rk3066 compatibility

Due to a kernel bug and no available sources we have to work around the
MEMERASE ioctl - if used, it hangs and never returns. I straced the original
recovery executable and could see that it is simply calling write() with a
bunch of zeroes instead of using MEMERASE.

Added a hack that does the same and now the resulting TWRP recovery image works.

Change-Id: I1b1c1c9e870e350776346bdca5d442c7ef565aa0
6 files changed
tree: 024a118fbcbc357158b74862e3381b265076a9b5
  1. applypatch/
  2. bmlutils/
  3. crypto/
  4. edify/
  5. etc/
  6. flashutils/
  7. gui/
  8. htcdumlock/
  9. injecttwrp/
  10. libcrecovery/
  11. libjpegtwrp/
  12. minadbd/
  13. minelf/
  14. minui/
  15. minuitwrp/
  16. minzip/
  17. mmcutils/
  18. mtdutils/
  19. pigz/
  20. prebuilt/
  21. res/
  22. testdata/
  23. tools/
  24. twmincrypt/
  25. updater/
  26. adb_install.cpp
  27. adb_install.h
  29. bootloader.cpp
  30. bootloader.h
  32. common.h
  33. data.cpp
  34. data.h
  35. data.hpp
  36. default_device.cpp
  37. device.h
  38. fixPermissions.cpp
  39. fixPermissions.hpp
  40. install.cpp
  41. install.h
  43. makelist.cpp
  44. makelist.hpp
  45. mounts.c
  46. mounts.h
  47. NOTICE
  48. openrecoveryscript.cpp
  49. openrecoveryscript.hpp
  50. partition.cpp
  51. partitionmanager.cpp
  52. partitions.hpp
  54. recovery.cpp
  55. recovery_ui.h
  56. resources.cpp
  57. roots.cpp
  58. roots.h
  59. screen_ui.cpp
  60. screen_ui.h
  61. twbootloader.cpp
  62. twinstall.cpp
  63. twinstall.h
  64. twrp-functions.cpp
  65. twrp-functions.hpp
  66. ui.cpp
  67. ui.h
  68. variables.h
  69. verifier.cpp
  70. verifier.h
  71. verifier_test.cpp

Team Win Recovery Project (TWRP)

The goal of this branch is to rebase TWRP onto AOSP while maintaining as much of the original AOSP code as possible. This goal should allow us to apply updates to the AOSP code going forward with little to no extra work. With this goal in mind, we will carefully consider any changes needed to the AOSP code before allowing them. In most cases, instead of changing the AOSP code, we'll create our own functions instead. The only changes that should be made to AOSP code should be those affecting startup of the recovery and some of the make files.

This branch is currently a work in progress, however, most features have been implemented and it is now ready for testing.

You can find a compiling guide here.

More information about the project.

If you have code changes to submit those should be pushed to our gerrit instance. A guide can be found here.