floyd
floyd

Reputation: 702

Modify classes.dex and repack .apk file

I want to modify classes.dex file in .apk file of my Android application and make a new .apk file. I already know how to decompile .apk file using tools such as apktool and then recompile it. My issue is to modify classes.dex file exactly, not a .smali code.

I tried to make a .zip archive with modified classes.dex file and to change it's extension to .apk, but I failed to install this .apk on my Android gadget.

Upvotes: 6

Views: 8239

Answers (1)

Connor Tumbleson
Connor Tumbleson

Reputation: 3330

Sounds like you want to decode an application without disassembling the classes.dex file to smali. In Apktool you can utilize the -s / --skip-sources parameter to avoid this. Apktool will simply pass on the classes.dex instead of disassembling it.

Then you can modify it directly however you are. Then recompile with (apktool b) and it will copy the classes.dex into final built apk.

Upvotes: 3

Related Questions