title: Android: Include su binary executable in AOSP build
body: <p>I have been trying to get the su binary included in the /out/.../system/xbin/su after building Android from source. I have the su binary (from Chainfire) as an executable file but I can't seem to get it included in the AOSP build.</p>
  
  <p>All the examples or solutions I've came across discussed about the following in the Android_Source_Root:</p>
  
  <ol>
  <li>Removing the su directory from <code>system/extras/</code> and include the su-binary directory (taken from ChainsDD) in external/.</li>
  <li>Modify the file <code>system/extras/su/Android.mk</code> with "<em>LOCAL_MODULE_TAGS := optional</em>" and the file <code>build/target/product/core.mk</code> to include su in the PRODUCT_PACKAGES.</li>
  </ol>
  
  <p>All of those have the su.c, su.h and other files in the su directory that are used to build the su package.</p>
  
  <p>What I would like to know is how to include su in the AOSP build when I have the "su binary executable file" only without the need to include the su.c or any of those files? Where should I put the su directory and what is the content of the Android.mk file?</p>
  
  <p>Please advice and thank you for your time.</p>