title: Android - Unpack, edit and repack an apk
body: <p>I saw that a few SDK companies (TestFairy for instance) managed to add their SDK automatically to any APK.</p>
  
  <p>So assuming that you have the dex file out of the APK and convert it to jar (via dex2jar). How did they manage to edit the jar (class files), compile it to dex and then to repack it back to jar?</p>
  
  <p>I know that you can just edit a single class file as it won't compile without the other dependencies. What have i missed?</p>