Set listener properties for UMS mount/unmount

Some kernels require the usb functions be defined before UMS mounting
of storage partitions will work. This sets the sys.storage.ums_enabled
property upon mount/unmount which can be listened for in init.rc.

Example routines to include in init.rc:

on property:sys.storage.ums_enabled=1
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/functions adb,mass_storage
    write /sys/class/android_usb/android0/enable 1

on property:sys.storage.ums_enabled=0
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/functions adb
    write /sys/class/android_usb/android0/enable ${service.adb.root}

Change-Id: I8a8ad4b392abbaa173d402714bcb4049ba84ccca
1 file changed
tree: 482c3cff4f862b286550c3886cf2d472cd63b021
  1. .gitignore
  2. Android.mk
  3. CleanSpec.mk
  4. NOTICE
  5. README.md
  6. adb_install.cpp
  7. adb_install.h
  8. applypatch/
  9. bmlutils/
  10. bootloader.cpp
  11. bootloader.h
  12. common.h
  13. crypto/
  14. data.cpp
  15. data.h
  16. data.hpp
  17. default_device.cpp
  18. device.h
  19. digest/
  20. dosfstools/
  21. edify/
  22. etc/
  23. exfat/
  24. fb2png/
  25. fixPermissions.cpp
  26. fixPermissions.hpp
  27. flashutils/
  28. fonts/
  29. fuse/
  30. gui/
  31. htcdumlock/
  32. injecttwrp/
  33. install.cpp
  34. install.h
  35. libblkid/
  36. libcrecovery/
  37. libmincrypt/
  38. libtar/
  39. make-overlay.py
  40. minadbd/
  41. minelf/
  42. minui/
  43. minuitwrp/
  44. minzip/
  45. minzipold/
  46. mmcutils/
  47. mounts.c
  48. mounts.h
  49. mtdutils/
  50. openaes/
  51. openrecoveryscript.cpp
  52. openrecoveryscript.hpp
  53. partition.cpp
  54. partitionmanager.cpp
  55. partitions.hpp
  56. pigz/
  57. prebuilt/
  58. recovery.cpp
  59. recovery_ui.h
  60. res/
  61. roots.cpp
  62. roots.h
  63. screen_ui.cpp
  64. screen_ui.h
  65. tarWrite.c
  66. tarWrite.h
  67. testdata/
  68. toolbox/
  69. tools/
  70. twbootloader.cpp
  71. twcommon.h
  72. twinstall.cpp
  73. twinstall.h
  74. twrp-functions.cpp
  75. twrp-functions.hpp
  76. twrp.cpp
  77. twrpDU.cpp
  78. twrpDU.hpp
  79. twrpDigest.cpp
  80. twrpDigest.hpp
  81. twrpTar.cpp
  82. twrpTar.h
  83. twrpTar.hpp
  84. ui.cpp
  85. ui.h
  86. updater/
  87. variables.h
  88. verifier.cpp
  89. verifier.h
  90. verifier_test.cpp
  91. 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.