title: How to add external java library to custom Android framework?
body: <p>Can someone enlighten me on how to include an external java framework to android framework and compile it as a part of the custom android framework?</p>
  
  <p>The idea is to make this external framework a part of my custom android framework and expose it as android service for other processes to use.</p>
  
  <p>In essence what I did is - </p>
  
  <ol>
  <li>checked for android port of the java framework</li>
  <li>Copied the src dir (including all the external jar files) from the ported framework to <code>framework/base/core/java/android/</code></li>
  <li>Edited ActivityManager in the framework to call the copied library</li>
  <li>run make </li>
  </ol>
  
  <p>Is this the right approach to edit Android framework? Since, I am including the java files and associated external jars of the external project inside the Android framework I suspect make fails while converting the jars to dex.</p>
  
  <p>Can somebody point me towards any available resources dealing with Android Framework internals and on how to edit Android framework?</p>
  
  <p>I checked the <code>Tutorial: Android Internals - Building a Custom ROM, Pt. 2 of 2</code> on youtube from this year's Marko Gargenta presentation in Beijing, China. But he didn't make it (i.e. adding external framework or jars) clear either.</p>