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

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;

Joel G Mathew

Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an Android and Linux enthusiast.

His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.

When away from the tech world, Joel is a practising ENT Surgeon.

2 Replies to “Installing multiple versions of a decompiled app (Refactoring an apk)”

  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?

    1. 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

Comments are closed.