Allow devices to override USB init

This enables devices to provide their own USB configuration. The
contents of init.recovery.usb.rc can most simply be modified and
included in a device's init.recovery.${ro.hardware}.rc.

Use option:
TW_EXCLUDE_DEFAULT_USB_INIT := true

Rationale: Some devices handle USB pid switching in the kernel. In this
case, USB init provides switching functions which differ from the
standard on property:sys.usb.config=xyz. Other devices should not see
USB attempt mtp,adb mode when TW_EXCLUDE_MTP is set.

Cherry-picked from android-5.0

Change-Id: Ief0fcaf46a1782102166fc1b733a34b1a1ba0802
4 files changed
tree: e746a6fa024d559a5dfebc95deac5a0b9b5c7516
  1. .gitignore
  2. Android.mk
  3. CleanSpec.mk
  4. NOTICE
  5. README.md
  6. adb_install.cpp
  7. adb_install.h
  8. applypatch/
  9. asn1_decoder.cpp
  10. asn1_decoder.h
  11. bmlutils/
  12. bootloader.cpp
  13. bootloader.h
  14. common.h
  15. crypto/
  16. data.cpp
  17. data.hpp
  18. default_device.cpp
  19. device.h
  20. digest/
  21. dosfstools/
  22. edify/
  23. etc/
  24. exfat/
  25. fb2png/
  26. find_file.cpp
  27. find_file.hpp
  28. fixPermissions.cpp
  29. fixPermissions.hpp
  30. flashutils/
  31. fonts/
  32. fuse.h
  33. fuse/
  34. fuse_sdcard_provider.c
  35. fuse_sdcard_provider.h
  36. fuse_sideload.c
  37. fuse_sideload.h
  38. gui/
  39. htcdumlock/
  40. infomanager.cpp
  41. infomanager.hpp
  42. injecttwrp/
  43. install.cpp
  44. install.h
  45. interlace-frames.py
  46. legacy_properties.h
  47. legacy_property_service.c
  48. legacy_property_service.h
  49. libblkid/
  50. libcrecovery/
  51. libmincrypt/
  52. libtar/
  53. minadbd/
  54. minui/
  55. minuitwrp/
  56. minzip/
  57. mmcutils/
  58. mounts.c
  59. mounts.h
  60. mtdutils/
  61. mtp/
  62. openaes/
  63. openrecoveryscript.cpp
  64. openrecoveryscript.hpp
  65. orscmd/
  66. partition.cpp
  67. partitionmanager.cpp
  68. partitions.hpp
  69. pigz/
  70. prebuilt/
  71. recovery.cpp
  72. recovery_ui.h
  73. res-hdpi/
  74. res-mdpi/
  75. res-xhdpi/
  76. res-xxhdpi/
  77. res-xxxhdpi/
  78. res/
  79. roots.cpp
  80. roots.h
  81. screen_ui.cpp
  82. screen_ui.h
  83. set_metadata.c
  84. set_metadata.h
  85. tarWrite.c
  86. tarWrite.h
  87. testdata/
  88. tests/
  89. toolbox/
  90. tools/
  91. tw_atomic.cpp
  92. tw_atomic.hpp
  93. twcommon.h
  94. twinstall.cpp
  95. twinstall.h
  96. twrp-functions.cpp
  97. twrp-functions.hpp
  98. twrp.cpp
  99. twrpDU.cpp
  100. twrpDU.hpp
  101. twrpDigest.cpp
  102. twrpDigest.hpp
  103. twrpTar.cpp
  104. twrpTar.h
  105. twrpTar.hpp
  106. twrpTarMain/
  107. ui.cpp
  108. ui.h
  109. uncrypt/
  110. updater/
  111. variables.h
  112. verifier.cpp
  113. verifier.h
  114. verifier_test.cpp
  115. verifier_test.sh
README.md

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.

If there are changes that need to be merged from AOSP, we will pull the change directly from AOSP instead of creating a new patch in order to prevent merge conflicts with AOSP.

This branch is under final testing and will be used shortly for public builds, but has not officially been released.

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.