Installing multiple versions of a decompiled app (Refactoring an apk)

You have to change the following:

  • AndroidManifest.xml, change the package name: package=”com.a.b”
  • apktool.yml, change apkFileName. It should be same as package name
  • The main class, which will be the smali directory with a name similiar to the package name..
  • Find a line:smali/../…/…/…/mainclassname.smali:1:.class public com/a/b;

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Comments

  1. As a noob, I’ve followed your instruction and get stuck 🙁
    I’ve changed the package name in AndroidManifest.xml and apktool.yml (quite easy) but get no luck with the main class. You said “… which will be the smali directory with a name similiar to the package name…” but I only found lots of smali files in \smali but no directory with the package name neither content of them. Basically, I can’t proceed to step 4. Where did I miss?

    NB: I found a lot of “com.oldPackageName” in hundreds of xml files, and I changed them all with “com.newPackageName”. Is it necessary?

    • droidzone says:

      I’ll need to see a “tree” of your directory structure to be able to comment. You can use the tree package in Linux or this program on Windows. Basically if the package name is com.hello.app, there should be /smali/com/hello/app