Post Reply

[Windows][UTILITY][TOOL] APK Multi-Tool

OP raziel23x

19th October 2011, 02:08 PM   |  #1  
raziel23x's Avatar
OP Senior Member
Flag Novi
Thanks Meter: 888
 
981 posts
Join Date:Joined: Sep 2010
Donate to Me
More
I am currently working on a major update to the apk manager application as well and changing the name to APK Multi-Tool with some new added features and also to fix some issues with some code errors.

I am also changing a lot of the features as well since a lot of the code has been outdated for a while.
I have updated all the files and modified Apk manager's Scripts to fix many user reported bugs from Daneshm90 apk manager which he had written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Daneshm90 the Original Writer of APK Manager
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali


Features:
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Batch optimize apk (Zipalign,optipng,or both)
- Batch Ogg optimization
- Batch install apk from script (option 19)
- Batch Theme Image Transfer TOOL
- Batch Theme optipng TOOL
- Batch Theme Zipalign APK TOOL
- Compression level selector (monitor status above menu)
- Error detection. Checks if error occurred anytime u perform a task, and reports it
- Extract, Zip apk's.
- Incorporates brut.all's apktool
- Improved syntax of questions/answers
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- Optimize pngs (ignores .9.pngs)
- Pull apk from phone into modding environment.
- Push to specific location on phone
- Quick sign an apk (Batch mode supported)
- Read log (Option 24)
- Sign apks
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Zipalign apks
- Much Much More
Instructions:
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script

Requirements:
Java 1.6
Android SDK


FAQ

Resulting apk file is much smaller than original! Is there something missing?

First: compression of resources.arsc file. Sometimes this file is compressed in original apk, sometimes not and apktool always compress it. Second: lack of META-INF dir. Apktool builds unsigned apks, so they lack signatures stored in this dir. Third: apktool uses newest Android SDK, so it could optimize files better, especially if original app is old. So: unpack both original and resulting apk, remove META-INF from original and then compare sizes. If they're still much different, then you could report on XDA or somewhere.

There is no META-INF dir in resulting apk. Is this ok?

Yes. META-INF contains apk signatures mostly and after modifying apk in no longer signed, so there are no signatures in it. You have to sign resulting apk and then META-INF dir will be created.

What do you call "magic apks"?
Sometimes there are some apks which (for my current knowledge) are invalid, broken, theoretically they shouldn't exist. There may be many reasons of their existence: my lack of understanding of Android resources; some non-public, maybe future SDK tools or custom modifications of these; manual hacking of binaries, etc. Usually I can't do anything about it, but you could at least try to replace broken parts by something valid. Actually it's quite likely that they aren't even used, because if they would, then application would crash.

Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.

TO DO LIST
Add new feature to Randomly Generate a new Key File for signing the apk files after modifying and recompiling of the apk files this will also allow of uploading to the android market as this added feature will allow you to sign apk files that you may of compiled without signing beforehand.

Modify the Signapk script to be compatible with the Randomly Generation feature in the works

[B]and a few other added features are in the works as I am redesigning the application and rewriting a lot of the code to fix issues as well as some of the new features have broken parts as some features have been moved and broken some command line prompts.

Installing APK Multi-Tool Itself

Run the installer and make sure it is pointed to the root of hard drive
Example
C:\APKMultiTools\

Downloads:
STABLE RELEASES at APK-Multi-Tool@Github
EXPERIMENTAL RELEASES at APK-Multi-Tool@Github
WIP-2.0 at APK-Multi-Tool@Github (apktool 2.0 testing highly expermental)
Please check back daily or weekly as this project is under active Development and I am releasing Alpha releases on the website for Testing and bug reports.

Mailing List:
Google Group Email mailing List

If you like this and wish to wish to send cash my way Donations Are Welcome
Attached Thumbnails
Click image for larger version

Name:	screenshot01.jpg
Views:	31622
Size:	95.3 KB
ID:	754267   Click image for larger version

Name:	screenshot02.jpg
Views:	70185
Size:	90.5 KB
ID:	754268  
Last edited by raziel23x; 27th July 2013 at 11:52 PM.
The Following 321 Users Say Thank You to raziel23x For This Useful Post: [ View ]
19th October 2011, 11:28 PM   |  #2  
CUBENSIS's Avatar
Senior Member
Thanks Meter: 107
 
361 posts
Join Date:Joined: Aug 2008
Optipng'ing is not working for me. After extraction, Optipng will be run and will do nothing because it says it cannot find the folder.
20th October 2011, 05:43 AM   |  #3  
raziel23x's Avatar
OP Senior Member
Flag Novi
Thanks Meter: 888
 
981 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by CUBENSIS

Optipng'ing is not working for me. After extraction, Optipng will be run and will do nothing because it says it cannot find the folder.

Which optiping are you using the batch theme opt or the original method

Sent from my DROID using xda premium
The Following 7 Users Say Thank You to raziel23x For This Useful Post: [ View ]
20th October 2011, 06:37 AM   |  #4  
CUBENSIS's Avatar
Senior Member
Thanks Meter: 107
 
361 posts
Join Date:Joined: Aug 2008
Option 18, batch optimize.

Sent from my Droid Incredible HD using XDA App
20th October 2011, 07:20 AM   |  #5  
raziel23x's Avatar
OP Senior Member
Flag Novi
Thanks Meter: 888
 
981 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Have you tried using it on the apk itself instead of extracting

Sent from my DROID using xda premium
The Following 4 Users Say Thank You to raziel23x For This Useful Post: [ View ]
20th October 2011, 07:37 AM   |  #6  
CUBENSIS's Avatar
Senior Member
Thanks Meter: 107
 
361 posts
Join Date:Joined: Aug 2008
That's what I did. What i meant to say is I choose option 18, the apk gets extracted, optipng says it can't find the files/directory that was fed to it, and the apk is re-zipped w/o any .png changes. See attached screen grab.
Attached Thumbnails
Click image for larger version

Name:	Image2.jpg
Views:	12143
Size:	76.6 KB
ID:	755190  
20th October 2011, 08:27 AM   |  #7  
raziel23x's Avatar
OP Senior Member
Flag Novi
Thanks Meter: 888
 
981 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Try placing the file in the transfered folder and running opt 16

Sent from my DROID using xda premium
The Following 5 Users Say Thank You to raziel23x For This Useful Post: [ View ]
20th October 2011, 10:37 AM   |  #8  
a1exander's Avatar
Senior Member
Thanks Meter: 895
 
1,060 posts
Join Date:Joined: Aug 2010
Donate to Me
Seems to be a very helpfull tool.

But GO**AMN, on the website, change the color of the titles from red to something else. Hurts my eyes reading haha.
20th October 2011, 06:28 PM   |  #9  
CUBENSIS's Avatar
Senior Member
Thanks Meter: 107
 
361 posts
Join Date:Joined: Aug 2008
Quote:
Originally Posted by raziel23x

Try placing the file in the transfered folder and running opt 16

i had to edit the script because it was calling for roptipng.exe. after chaging it oo optipng.exe, here's the result
Quote:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
A subdirectory or file C:\Apk_Multi-Tool\optimized already exists.
A subdirectory or file C:\Apk_Multi-Tool\untouched already exists.
Could Not Find C:\Apk_Multi-Tool\0

Last edited by CUBENSIS; 20th October 2011 at 06:31 PM.
20th October 2011, 07:45 PM   |  #10  
CUBENSIS's Avatar
Senior Member
Thanks Meter: 107
 
361 posts
Join Date:Joined: Aug 2008
Regarding option 18, after learning a bit about batch programming and looking through the file...it seems the problem is quite simple. Optipng does not support ** for recursion, and as far as I can tell ** means nothing @ Windows command line. Therefore it will fail since the command in the batch file is
Code:
optipng -o99 "apkopt_temp_%~n1\**\*.png"

Post Reply Subscribe to Thread

Tags
apk multi-tool, utility, windows 7, windows vista, windows xp
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Software Development by ThreadRank