Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,924 Members 45,395 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Modifying APK files. Why won't "apktool" recompile?

Tip us?
 
Mellowmarrow
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Feb 2014
Question [Q] Modifying APK files. Why won't "apktool" recompile?

Modifying Mms.apk. I installed Java, and used the following command to decompile the .apk:
apktool.jar d Mms.apk

I then made my changes, and am trying to recompile with the command:
apktool.jar b Mms Mms.apk

The guides I'm following say this will create a "dist" folder within the Mms folder, containing the new (but unsigned) .apk file. This doesn't happen.
No output is given in Command Prompt.

A "build" folder is created, however. Inside is an "apk" folder. Inside of that is a "classes.dex" file.

Why won't apktool create the dist folder?
How can I get the recompiled apk file?
 
Mellowmarrow
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Feb 2014
Quote:
Originally Posted by Mellowmarrow View Post
Modifying Mms.apk. I installed Java, and used the following command to decompile the .apk:
apktool.jar d Mms.apk

I then made my changes, and am trying to recompile with the command:
apktool.jar b Mms Mms.apk

The guides I'm following say this will create a "dist" folder within the Mms folder, containing the new (but unsigned) .apk file. This doesn't happen.
No output is given in Command Prompt.

A "build" folder is created, however. Inside is an "apk" folder. Inside of that is a "classes.dex" file.

Why won't apktool create the dist folder?
How can I get the recompiled apk file?
Alternatively, if we can't figure out why it's not working, can someone compile it? I've attached the files.
Attached Files
File Type: rar Mms.rar - [Click for QR Code] (1.74 MB, 1 views)
 
durancharles27
Old
(Last edited by durancharles27; 3rd March 2014 at 12:16 AM.)
#3  
durancharles27's Avatar
Member
Thanks Meter 31
Posts: 35
Join Date: Sep 2013
Quote:
Originally Posted by Mellowmarrow View Post
Alternatively, if we can't figure out why it's not working, can someone compile it? I've attached the files.
uhmm when building the apk you don't include the ".apk"

For example if I want to decompile app.apk, I type this:

apktool d app.apk

If I want to recompile, I type this:

apktool b app

YOU DON'T TYPE THE ".apk" AT THE END.

As for your Mms.apk:

1. "apktool d Mms.apk" > Correct

2. "apktool b Mms Mms.apk" > Incorrect

3. apktool b Mms > Correct

This is how it works:

1. If I have an app.apk in the APKTOOL directory, I decompile it by using the command apktool d app.apk
2. This will create a folder named app
3. If I recompile by using the command apktool b app, a new apk will be created inside the dist folder....inside the "app" folder
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes