[UPDATE]Universal Multipurpose AutoAPKTool 2.0.4a

Search This thread

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
First of all I didn’t create this tool entirely.
This tool has been created by xavierjohn22 and his thread can be found here:
http://xdaforums.com/showthread.php?t=1053227
He deserves most if not all the credit for this amazing tool.

Credits:

@Beachon
@Xavierjohn22, the amazing author of AutoApktool! Visit his thread, click his thanks button, and support his work with donations, and my personal thanks to author for this tool and his permission to modify it and re-post it..
@Brut_all for Apktool
@XDA Community

I did add few more options to the tool to make it AoutAPKTool a universal Tool.

The Idea was to make this a one stop shop for all app/jar/dex file modifications any dev would like to do.
With new changes to hex/dex that have been introduced in ICS leaks/roms decompiling an app became a few step process. We had to take classes.dex out of app and save it somewhere. Delete it from app and then decompile it. After mods have been done we had to put that dex file back into app.
I have added a menu option to decompile ICS app and a script that would do all that all by itself making that process fully automated.
Also I did add baksmali/smali script and menu options for .dex and .jar files so we don’t have to keep 2 different tools and to be able to do everything we want to do under one roof.

I’m not gonna type up a tutorial for complete tool.
You can read about it in thread linked above. Mr. xavierjohn22 knows much more about this subject and his explanations are better than I can do it. You also can read more about how to use this tool here:
http://xdaforums.com/showthread.php?t=1511755
I’ll just explain how to use new options in menu I’ve added.
Download zip file from link provided and extract somewhere on your hard drive. It will create AutoAPKTool2.0.4 folder on your hard drive with all tools and folders you need inside that folder.

How to:
1. Decompile ICS app. This has been tested on E4GT apps and it’s working. If you try this tool on apps from other phones ICS builds please let me know if it works and I’ll add that info to description for others to know. Now back to subject. You don’t need to do any extra steps to decompile an ICS app. You would choose option 14 from menu and drag’n’drop app from _INPUT_APK folder into CMD window. The script will take classes.dex out of apk, decompile it and once done with decompiling it will move classes.dex back into xyz.apk file leaving it in its original state. Script will also add classes.dex file to decompiled apk folder so when you recompile it after you done with your modifications the classes.dex will be there. To recompile app use option 15 from menu.

2. Baksmali/smali classes.dex file. This options will do exactly what they say they would. You put a dex file into _INPUT_APK folder and run baksmali option. It will create clasout folder and put decompiled classes.dex file into it. Do your modifications and run smali. It will recomplile classes.dex and create a new file new-classes.dex in your _INPUT_APK folder. You can rename it to classes.dex and put into apk you took it out from.

3. Baksmali/smali JAR files. Put a JAR file you want to edit into _Jar_Files folder and run baksmali JAR option from menu. You will be asked to drag’n’drop jar file into CMD window. Do that and hit enter. New folder with filename.dex extension will be created _Jar_Files folder and jar file will be decompiled into that folder. After you done with your modifications choose option Smali JAR file. You will be prompted to drag’n’drop filename.dex folder into CMD window. Do it and hit enter. Jar file will be recompiled and you will find newly created/recompiled jar in filename.dex folder.

If you see any bags in while using this options please let me know. If you have problems with anything else please contact xavierjohn22 since I don’t know anything about all the other stuff in this tool.
I’m not a programmer nor am I a code writer and this is my first attempt to put together a tool. Please go easy on me if you discover any bugs. I’ll try to keep up with you and fix bugs as you discover them.

You can download tool here:
http://jumbofiles.com/tuwvhbc1ksio/AutoAPKTool2.0.4.zip.html

Updated tool to aapt.exe from windows-sdk API level 15 (ICS).
AutoAPKTool2.0.4a

I'm looking forward to get some feedback about options added.
 
Last edited:

ericwgarza1

Senior Member
May 13, 2008
560
366
H-Town, TX
downloading now...will report back after some testing
Thanks!!!

LOL i didn't realize the typo until I downloaded the actual file. *AutoAPKTool
 

VegasEvo4G

Senior Member
Feb 3, 2011
288
91
Las Vegas
This is fantastic! As I've been working on a theme for Mijjah's Goodness rom, I've hit several roadblocks through all of his updates where decompiling worked on one build, but would fail on another. Before updating my theme from build to build, I've had to figure out how to de/recompile. I currently have two versions of apk manager, two versions of apk multi tool, and two versions of apk auto tool on my computer right now! Can't wait to try this!!

Sent from my SPH-D710 using xda premium
 

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
This is fantastic! As I've been working on a theme for Mijjah's Goodness rom, I've hit several roadblocks through all of his updates where decompiling worked on one build, but would fail on another. Before updating my theme from build to build, I've had to figure out how to de/recompile. I currently have two versions of apk manager, two versions of apk multi tool, and two versions of apk auto tool on my computer right now! Can't wait to try this!!

Sent from my SPH-D710 using xda premium

As stated in OP the whole idea was to try to have one tool for all needs.
I've been using Tiffany84's ICS theme for all my roms and had to jump thru hoops every time. So I decided to try to make it simple.
First I've build a tool just for ICS apps, backsmali/smali.
Then I've contacted xavierjohn22 and asked his permission o add the script and parts to his tool.
And here we are.
 

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
OK guys.
I understand that tool won't get as much attention as rom/theme/kernel but after 25 downloads no one has anything to say?
Does it work?
Are there any problems?
Anything?
 

dtm_stretch

Senior Member
Dec 22, 2010
477
163
Albany
OK guys.
I understand that tool won't get as much attention as rom/theme/kernel but after 25 downloads no one has anything to say?
Does it work?
Are there any problems?
Anything?

I tried the original version before but it was giving me problems with systemUI.apk, how is that working on your version? Also have you tried the smali tools? Every multitool/manager I have tried hasn't worked and I have had to use the tools separately. I haven't downloaded yet but I will this weekend. I was having trouble finding any set out tools that works on all apks across all the ICS roms it usually involves swapping out several different apktools.jar and appt. For example I would have to use one apktool.jar for framework-res.apk and another for systemUI. Thanks though for your work.
 

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
I tried the original version before but it was giving me problems with systemUI.apk, how is that working on your version? Also have you tried the smali tools? Every multitool/manager I have tried hasn't worked and I have had to use the tools separately. I haven't downloaded yet but I will this weekend. I was having trouble finding any set out tools that works on all apks across all the ICS roms it usually involves swapping out several different apktools.jar and appt. For example I would have to use one apktool.jar for framework-res.apk and another for systemUI. Thanks though for your work.

If you were trying to decompile a modified/themed SystemUI.apk you will get same errors using this tool.
The problem is that every dev does cut the corners when making a theme or modding apps. And even thou the app works you can't decompile it properly because there are some png's that don't have references, some 9.png's with missing chunks etc.
So if you want to add something to an app that has been modified/themed you would start with stock app. Do your modifications and then drag your modded xml, png and 9.png files into modded app. This way you can add your own modifications to already modified app.
That's the way I'm doing it because from my Eclair days I couldn't find other workaround for this problem.
However I did add all tool so you can do smali/baksmali and decompile/recompile using one tool. So you don't have to switch.
 
Last edited:

rbaucom

Senior Member
Oct 12, 2010
322
53
Well I'll have to see if i can give it a spin. I created a couple of Moment ROM builds but they were pretty much stock plus one or two apps that I used. Never published on SDX as they were my purchased apps.
I may not get a chance to do so till this weekend and I need to do a OS re-install on the laptop.
You might if its allowed if you have not done so put a post in the themes an apps section.
Would this be used to take native apps and make inverted? If so perhaps the topic there should be "create your inverted apps with this:"

48bf9ab8-77c6-88fe.jpg


Sent from my SPH-D710 using Tapatalk
 
Last edited:

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
Well I'll have to see if i can give it a spin. I created a couple of Moment ROM builds but they were pretty much stock plus one or two apps that I used. Never published on SDX as they were my purchased apps.
I may not get a chance to do so till this weekend and I need to do a is install on the laptop.
You might if its allowed if you have not done so put a post in the themes an apps section.


Sent from my SPH-D710 using Tapatalk

I thought it belongs to development since it's not an app or theme but a tool.
If mod's think it belongs into app/theme section please move this thread.
 

rbaucom

Senior Member
Oct 12, 2010
322
53
So would you use this to create inverted apps from stock apps?

Sent from my SPH-D710 using Tapatalk
 

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
So would you use this to create inverted apps from stock apps?

Sent from my SPH-D710 using Tapatalk

This is tool that helps you to decompile and recompile apps.
What you do with it it's up to you.
ICS apps are PITA to decompile. And this tool does it with one click.
Also no apktool had baksmali/smali in it for dex and/or jar edits.
All I did is adding those option to a tool created by xavierjohn22.
Bring all tools under one roof.
That's it.
 

monstaX

Senior Member
Dec 24, 2011
450
143
Texas
jar

Cant manage to decompile framework.jar from an ICS aokp ROM. I just get a framework.dex folder with the same framework.jar in it.
 

lostcausenjtown

Senior Member
Jul 21, 2008
145
37
Motorola Edge
OnePlus 9
Having trouble deodexing stock FC24 rom. Any tips on what I can do to help.

Have a WIN7 Machine(64 bit), used both dsixda's kitchen and this tool and both were a no go. Haven't tried since updating java. Thanks for the help.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    First of all I didn’t create this tool entirely.
    This tool has been created by xavierjohn22 and his thread can be found here:
    http://xdaforums.com/showthread.php?t=1053227
    He deserves most if not all the credit for this amazing tool.

    Credits:

    @Beachon
    @Xavierjohn22, the amazing author of AutoApktool! Visit his thread, click his thanks button, and support his work with donations, and my personal thanks to author for this tool and his permission to modify it and re-post it..
    @Brut_all for Apktool
    @XDA Community

    I did add few more options to the tool to make it AoutAPKTool a universal Tool.

    The Idea was to make this a one stop shop for all app/jar/dex file modifications any dev would like to do.
    With new changes to hex/dex that have been introduced in ICS leaks/roms decompiling an app became a few step process. We had to take classes.dex out of app and save it somewhere. Delete it from app and then decompile it. After mods have been done we had to put that dex file back into app.
    I have added a menu option to decompile ICS app and a script that would do all that all by itself making that process fully automated.
    Also I did add baksmali/smali script and menu options for .dex and .jar files so we don’t have to keep 2 different tools and to be able to do everything we want to do under one roof.

    I’m not gonna type up a tutorial for complete tool.
    You can read about it in thread linked above. Mr. xavierjohn22 knows much more about this subject and his explanations are better than I can do it. You also can read more about how to use this tool here:
    http://xdaforums.com/showthread.php?t=1511755
    I’ll just explain how to use new options in menu I’ve added.
    Download zip file from link provided and extract somewhere on your hard drive. It will create AutoAPKTool2.0.4 folder on your hard drive with all tools and folders you need inside that folder.

    How to:
    1. Decompile ICS app. This has been tested on E4GT apps and it’s working. If you try this tool on apps from other phones ICS builds please let me know if it works and I’ll add that info to description for others to know. Now back to subject. You don’t need to do any extra steps to decompile an ICS app. You would choose option 14 from menu and drag’n’drop app from _INPUT_APK folder into CMD window. The script will take classes.dex out of apk, decompile it and once done with decompiling it will move classes.dex back into xyz.apk file leaving it in its original state. Script will also add classes.dex file to decompiled apk folder so when you recompile it after you done with your modifications the classes.dex will be there. To recompile app use option 15 from menu.

    2. Baksmali/smali classes.dex file. This options will do exactly what they say they would. You put a dex file into _INPUT_APK folder and run baksmali option. It will create clasout folder and put decompiled classes.dex file into it. Do your modifications and run smali. It will recomplile classes.dex and create a new file new-classes.dex in your _INPUT_APK folder. You can rename it to classes.dex and put into apk you took it out from.

    3. Baksmali/smali JAR files. Put a JAR file you want to edit into _Jar_Files folder and run baksmali JAR option from menu. You will be asked to drag’n’drop jar file into CMD window. Do that and hit enter. New folder with filename.dex extension will be created _Jar_Files folder and jar file will be decompiled into that folder. After you done with your modifications choose option Smali JAR file. You will be prompted to drag’n’drop filename.dex folder into CMD window. Do it and hit enter. Jar file will be recompiled and you will find newly created/recompiled jar in filename.dex folder.

    If you see any bags in while using this options please let me know. If you have problems with anything else please contact xavierjohn22 since I don’t know anything about all the other stuff in this tool.
    I’m not a programmer nor am I a code writer and this is my first attempt to put together a tool. Please go easy on me if you discover any bugs. I’ll try to keep up with you and fix bugs as you discover them.

    You can download tool here:
    http://jumbofiles.com/tuwvhbc1ksio/AutoAPKTool2.0.4.zip.html

    Updated tool to aapt.exe from windows-sdk API level 15 (ICS).
    AutoAPKTool2.0.4a

    I'm looking forward to get some feedback about options added.
    5
    Reserved just in case
    4
    reserved as well.
    3
    Im also having recompile issues while trying to recompile SystemUI.apk.
    All I wanted to do was change the clock color in my statusbar on a Samsung Galaxy S2 4.0.4 ROM. I have been searching all around the internet and keep getting all types of "solutions" yet none of them actually work. I keep getting the EXACT SAME errors during recompilation.
    Then I came across this AutoAPKTool during yet another Google search. I love how easy it is to use, yet... ERRRRRRROOOORRRRRRRRS while recompiling. It shouldnt really matter that my phone is not the Epic 4G Touch.

    Im attaching my logs from AutoAPKT. These were generated by decompiling and recompiling a SystemUI.apk that was pre-modded with a 15Toggle mod. I simply decompiled the apk, and immediately recompiled it and the logs will show my results, which seem to be pretty similar to what many others are reporting.

    Please help?

    As mentioned before it's very hard to deal with previously modded apk's.
    When you just swap the png's in any app without proper process (decompile, replace, recompile) app is working but there may be images that left without publck variables attached to them or variables without images.
    App still works but when you try to decompile and recompile you will have a bunch of errors.
    You should try to work with stock (unmodified) app if you wanna avoid errors that are not caused by you and/or your mods.
    In your decompile log it shows one wrong .9.png and believe me one wrong image can trow a lot of errors.
    That png is missing 9. patches and has been rename to png. Now you have more images (at least one) that you have described in your public.xml.
    First you should try to fix that one image and run recompile again to see if it will fix anything.
    Or you can grab the stock SystemUI.apk and decompile it. Use images from that modded app to replace stock images and recompile the stock one again.
    That should work. Just make sure that you using images from decompiled moded app and make sure all 9.png's are correct and have patches.
    Or decompile stock app. Change what ever you want to change and recompile it.
    After that you can swap images using 7z or similar by opening both apps for view.
    Hope this make sense.
    3
    if you are getting plurals.xml errors you have to go to line 79 in each xml that generated the error and add % to the second % on that line:

    for example, change

    <item quantity="other">%d of %d</item>

    to

    <item quantity="other">%d of %%d</item>

    notice the double %% at the end of the line

    Used this for the first time last night, amazing, all in all almost too easy. Thanks Agat63.

    One question though, I'm having issues with framework_helper(to add public.xml entries) and was wondering whether this version of apktool mods the public.xml like apk manager? Or whether I have to manually do it. Trying to add images for pulldown animation, and charging animation. Thanks!

    Edit: Getting this on recompile of fd16 framework-res, also having trouble with fd16 systemui. not sure whats up, doing everything I can think of. Think I have to check syntax in plurals and strings maybe


    [*] C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res
    recompiling C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res...
    W: Could not find sources
    I: Building resources...
    aapt: warning: string 'mobileap_notification' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: es_US
    aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: en_US
    aapt: warning: string 'policylab_allow_htmlemail' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: en_US
    aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: es
    aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: es
    aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no default translation in C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: es
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values-en-rUS\plurals.xml:79: error: Found tag </item> where </plurals> is expected
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values-es\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
    C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals> is expected
    Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Slesh\AppData\Local\Temp\APKTOOL4995788418808299772.tmp, -x, -S, C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res, -M, C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\AndroidManifest.xml]
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
    at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
    at brut.androlib.Androlib.buildResources(Androlib.java:248)
    at brut.androlib.Androlib.build(Androlib.java:171)
    at brut.androlib.Androlib.build(Androlib.java:154)
    at brut.apktool.Main.cmdBuild(Main.java:182)
    at brut.apktool.Main.main(Main.java:67)
    Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Slesh\AppData\Local\Temp\APKTOOL4995788418808299772.tmp, -x, -S, C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res, -M, C:\Users\Slesh\Desktop\AutoAPKTool2.0.4\_INPUT_APK\framework-res\AndroidManifest.xml]
    at brut.util.OS.exec(OS.java:83)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
    ... 6 more
    The system cannot find the drive specified.

    Sent from my SPH-D710 using xda premium