Search code examples
javaandroidreverse-engineeringapktooldex2jar

Android proof for copying my Sourcecode


Me and my team coded an Android Application for a customer of my company. Due to some "political issues" the cooperation ended. The customer now uses the unpaid Application. I used dex2jar and apktool for reverse engineering but within the development we obfuscate our code with ProGuard. The only things i can proof is that the Manifest.xml, strings.xml and some other ressources are similar / equivalent. Is there any way to get a better or more readable view (in best case in plain text) of the .java classes? Are there "better" tools then apktool or dex2jar that i missed?

Thanks in advance for your help!

Solution:

  • delete an activity from the decompiled Manifest (decompiled with apktool)
  • build a new apk file with the decompiled data
  • sign it with the keystore
  • put it on the device and start it. The app should crash when you navigate to the activity that you deleted from the Manifest
  • take the stacktrace (from logcat) and deobfuscate it (like Vaiden provided)

Solution

  • Proguard's mapping file is supposed to be commulative. So if you've kept your old mapping file (and I sure hope you did, at least for debugging sake), you should be able to deobfuscate logged stacktraces: https://coderwall.com/p/htq67g/android-how-to-decode-proguard-s-obfuscated-stack-trace

    It should be possible to simulate a stacktrace using the .java classes you've extracted. Just follow a call (stack) trace from the code itself. If you get a coherent response while retracing it using your mapping file - then chances are it is indeed your code.