[DEV][TOOL] EASYapkTOOLcompilerDECOMPILER v1.5 [2.1Beta 2012.09.05]

Was this at all helpful?

  • No, I do it all manually because it's faster...

    Votes: 0 0.0%

  • Total voters
    30
Search This thread

blast0id

Senior Member
UPDATED 2012.09.05!!! Hey guys, if you can do some testing with the new version and give me some feedback, I fixed some errors with the drag and drop code, and included apktool versions (1.2.0, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5.0) you can add as many others as you like to the _bin folder, just create a separate folder with the version number and place it in there (make sure the file is named "apktool.jar" or the code won't work), if you want to set a default apktool version to use, so that you aren't prompted all the time, you can change the name of the "apktool.manual" file to (for example) "apktool.1.4.9" and from then on it will use that version instead of prompting... and you can always change it back, or change it to a newer/older version number as needed...

if this works well for you guys I will update the first post...:cowboy:

Code:
Beta Changelog
2.0 Initial Beta

2.1b 
cleaned up some code issues (defualt file wasn't working properly)
added the newer unofficial apktool builds (1.4.5 -- 1.5.0)

here's the mediafire link: http://www.mediafire.com/?td20i8cv8lfq90l


First of all, I did not create apktool (DUH!) that credit goes to: Brut.alll what a wonderful tool. I have included version 1.3.1 because that is the version that seems to work best right now...

Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.

Alright... the easyFLASHABLEzipBUILDER gave me the idea to do this... Basically it's a way to "automagically" compile/decompile (smali/baksmali via apktool) apk's and jar's for all you dev's or wannabe dev's who want an easier way about this... These are windows batch scripts and should work with anything win2k or newer.

how it works: said:
  1. Extract to a directory, for simplicity we'll say "apktool"
  2. Place whatever file/folder(s) you would like to compile/decompile in the root of "apktool"
  3. The filenames are pretty self explanatory... the drag and drop options file will prompt for the options only, this way you can still have the ease of drag and drop, but only need to input the more specific options
  4. The manual file will only ask for options and filename, if you decompile it will change the last "." before extension to a "_" so framework-res.apk would output to _out\framework-res_apk.
  5. When you (re)build with ANY of the files if the given folder name is framework-res_apk then the output file will be framework-res_REBUILTsigned.apk
  6. The manual and drag and drop files always preserve the extension, so if you modify the folder name before rebuilding leave the "_apk" or "_jar" alone.
  7. I will add some error checking in later versions, but at the moment you'd probably have to be trying, to create an error, and it would only be an error with the batch, you wouldn't actually mess a file up or anything.
  8. now outputs all files/folders to a subfolder "_out"
  9. core files are now in "_bin" folder... batch files must be one level above this folder to work properly.
  10. Drag and drop works from ANY folder, but always outputs to the "_out" folder.
  11. rebuilt files are now signed with a test key, so shouldn't have any "unsigned" or "improperly signed" errors when trying to install after being rebuilt.
Let me know if you have any requests, or questions... happy to help in any way I can...

MEDIAFIRE [LATEST]: http://www.mediafire.com/?cablu617ijq22ac
 

Attachments

  • EASYapkTOOLcompilerDECOMPILER_v1.5.zip
    2.6 MB · Views: 985
Last edited:

blast0id

Senior Member
Linux compatable?

not currently... but if linux supports drag and drop on scripts, I suppose I could look into porting it for linux... or if not I could just make a "manual" version for linux? (as in one that just prompts for for the options and filename and does the rest) I need to start familiarizing myself with linux anyways... so it would be a good learning experience for myself...
 

blast0id

Senior Member
c'mon guys, over a hundred takers already and pretty much zero feedback! If there is anything functionality wise you looking for please let me know, I would like to be able to improve this for you guys, but if no one says anything, then I don't even know if it's working for you or not... 30seconds of your time to write a post isn't asking much =P
 

IamSonoma

Senior Member
Mar 9, 2009
330
30
Great tool

2 of the 4 bat files worked great. The other 2 gave me the syntax usage be fore it said GOODBYE.

Working for me:
DRAGandDROPbuild.bat
DRAGandDROPdecompile.bat

Not working for me:
DRAGandDROPoptions.bat
APKtoolMANUAL.bat

Thank you. This would save sometime.
 
  • Like
Reactions: blast0id

pyrator

Senior Member
Feb 28, 2009
307
9
nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)

for that matter if i dont change anything and decompile then recompile, same issue
 

IamSonoma

Senior Member
Mar 9, 2009
330
30
can you try this out for me, and tell me if it solves your issue? if it does I will add to first post and update the main download...


Firmware: Froyo 2.2.1 KP5
Phone: Samsung Captivate
OS: Windows 7 and Windows XP

Code:
Batch File Tested: APKtoolMANUAL.bat
File Tested: Settings.apk
Decompile Errors: 0
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>

Code:
Batch File Tested: DRAGandDROPoptions.bat
File Tested: Settings.apk
Decompile Errors: 1
Recompile Errors: N/A
Option chosen: d
Folder Output: Settings_apk.out
Result: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTO
OLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_
v1.1\Settings_apk (The filename, directory name, or volume label syntax is incorrect)
        at brut.androlib.ApkDecoder.hasSources(Unknown Source)
        at brut.androlib.ApkDecoder.decode(Unknown Source)
        at brut.apktool.Main.cmdDecode(Unknown Source)
        at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\Downloads\EASYa
pkTOOLcompilerDECOMPILER_patch_v1.1\Settings_apk (The filename, directory name,
or volume label syntax is incorrect)
        at brut.directory.ZipRODirectory.<init>(Unknown Source)
        at brut.directory.ZipRODirectory.<init>(Unknown Source)
        at brut.androlib.res.util.ExtFile.getDirectory(Unknown Source)
        ... 4 more
Caused by: java.io.FileNotFoundException: C:\EASYapkTOOLco
mpilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPI
LER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1
\Settings_apk (The filename, directory name, or volume label syntax is incorrect
)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        ... 7 more


Code:
More Testing		
Batch File Tested: DRAGandDROPdecompile.bat
File Tested: Settings.apk
Decompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>


Batch File Tested: DRAGandDROPbuild.bat
File Tested: Settings.apk
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Output File: Settings_REBUILT.apk
 
Last edited:

blast0id

Senior Member
No biggie. For the most part all is good. Plus I have been using cm7 and been busy. :)

Sent from my Captivate using XDA App

ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...
 

IamSonoma

Senior Member
Mar 9, 2009
330
30
ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...

Ok. Thank you. Extracted the files again and moved folder to my e:\.

Working with contacts.apk it decompiled and recompiled fine. Contacts.apk did not work when I moved it to the system/app folder. I will test more later. the file was more compressed. I will recompile it later with winrar and the store command.
 

Jonathon Grigg

Senior Member
Dec 11, 2010
1,226
242
nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)

for that matter if i dont change anything and decompile then recompile, same issue

I get the exact same problem no matter how I edit my apks and its confusing the hell out of me. Does anyone have any ideas on this? Happens with your tool here, and several others too.

Sent from my Nexus S
 

dancer_69

Senior Member
Jan 2, 2007
1,961
248
I have the same problem, and I think you are right about the signing.
I tried to resign the rebuilded file with autosign and I had the same resault. I mentioned that the file's size didn't change. I resigned again, using android commander' s sign option and at this time the file' s size incrased by 5K. The output file works without problems.
So, the problem seems to be with the apktoolj.
 

Jonathon Grigg

Senior Member
Dec 11, 2010
1,226
242
Thanks ill try that, it makes sense as I am trying to mod system apps such as camera and launcher2.

Thanks again! This could be what I'm looking for.

Sent from my Nexus S
 

blast0id

Senior Member
strange, I thought apktool was supposed to sign as well? is it just not signing or is it improperly signing?

I am using the 1.3.1 version of apktool with this... I am using this version because 1.3.2 seems to have decompile/compile issues with many apk's...

I'm open to suggestions guys, please let me know if there is a "fix" I can implement and I will do so =)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    UPDATED 2012.09.05!!! Hey guys, if you can do some testing with the new version and give me some feedback, I fixed some errors with the drag and drop code, and included apktool versions (1.2.0, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5.0) you can add as many others as you like to the _bin folder, just create a separate folder with the version number and place it in there (make sure the file is named "apktool.jar" or the code won't work), if you want to set a default apktool version to use, so that you aren't prompted all the time, you can change the name of the "apktool.manual" file to (for example) "apktool.1.4.9" and from then on it will use that version instead of prompting... and you can always change it back, or change it to a newer/older version number as needed...

    if this works well for you guys I will update the first post...:cowboy:

    Code:
    Beta Changelog
    2.0 Initial Beta
    
    2.1b 
    cleaned up some code issues (defualt file wasn't working properly)
    added the newer unofficial apktool builds (1.4.5 -- 1.5.0)

    here's the mediafire link: http://www.mediafire.com/?td20i8cv8lfq90l


    First of all, I did not create apktool (DUH!) that credit goes to: Brut.alll what a wonderful tool. I have included version 1.3.1 because that is the version that seems to work best right now...

    Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.

    Alright... the easyFLASHABLEzipBUILDER gave me the idea to do this... Basically it's a way to "automagically" compile/decompile (smali/baksmali via apktool) apk's and jar's for all you dev's or wannabe dev's who want an easier way about this... These are windows batch scripts and should work with anything win2k or newer.

    how it works: said:
    1. Extract to a directory, for simplicity we'll say "apktool"
    2. Place whatever file/folder(s) you would like to compile/decompile in the root of "apktool"
    3. The filenames are pretty self explanatory... the drag and drop options file will prompt for the options only, this way you can still have the ease of drag and drop, but only need to input the more specific options
    4. The manual file will only ask for options and filename, if you decompile it will change the last "." before extension to a "_" so framework-res.apk would output to _out\framework-res_apk.
    5. When you (re)build with ANY of the files if the given folder name is framework-res_apk then the output file will be framework-res_REBUILTsigned.apk
    6. The manual and drag and drop files always preserve the extension, so if you modify the folder name before rebuilding leave the "_apk" or "_jar" alone.
    7. I will add some error checking in later versions, but at the moment you'd probably have to be trying, to create an error, and it would only be an error with the batch, you wouldn't actually mess a file up or anything.
    8. now outputs all files/folders to a subfolder "_out"
    9. core files are now in "_bin" folder... batch files must be one level above this folder to work properly.
    10. Drag and drop works from ANY folder, but always outputs to the "_out" folder.
    11. rebuilt files are now signed with a test key, so shouldn't have any "unsigned" or "improperly signed" errors when trying to install after being rebuilt.
    Let me know if you have any requests, or questions... happy to help in any way I can...

    MEDIAFIRE [LATEST]: http://www.mediafire.com/?cablu617ijq22ac
    3
    Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.

    I'm always happy to see that someone uses and/or improves my tools :)
    1
    Great tool

    2 of the 4 bat files worked great. The other 2 gave me the syntax usage be fore it said GOODBYE.

    Working for me:
    DRAGandDROPbuild.bat
    DRAGandDROPdecompile.bat

    Not working for me:
    DRAGandDROPoptions.bat
    APKtoolMANUAL.bat

    Thank you. This would save sometime.
    1
    thanks works good for me
    :)