Sunteți pe pagina 1din 43

Welcome

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
After some thought and after adding new features and decided that since it is no longer just a
APK management tool that is is now a multi functional tool now so I felt to change the name to
APK Multi-Tool.
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.
There is an option of compiling/signing/installing all in one step

Special Thanks
Special Thanks to The Developers:
Goes to Daneshm90 the Original Writer of APK Manager which this tool was based off
Goes to Brut.all for his awesome tool.
Goes to iBotPeaches for taken over development of apktool.
Goes to JF for of course, smali/baksmali
Goes to farmatito for porting this script to Linux

Special Thanks to The Testers:


Windows:
Purian
sga999

Linux:
crush2push

Features
- Extract, Zip APK's.
- Optimize pngs (ignores .9.pngs)
- Zipalign APKS
- Sign APKS
- Push to specific location on phone
- Incorporates brut.all's apktool
- Pull APK from phone into modding environment.
- Batch optimize APK (Zipalign,optipng,or both)
- Quick sign an APK (Batch mode supported)
- Batch Ogg optimization
- Compression level selector (monitor status above menu)
- Batch install APK from script (option 16)
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the
script organized using time/date headers
- User can change the max Java heap size (only use if certain large APKS get stuck when
decompiling/compiling APKS) (Option 19)
- Improved syntax of questions/answers
- Error detection. Checks if error occurred anytime u perform a task, and reports it
- Read log (Option 20)
- U can now set this script as your default application for APKS. When u do, if u double click any
APK it will install it for u.
- 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 of course drag a single APK as well
- Added framework dependent decompiling (For non proprietary ROM APKS). (Option 10).
Checks whether the depended 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
- Stuff i forgot i guess

Installation
INSTALLATION
---------------Treat your computer to a tune up - follow this procedure before installation:
In Accessories\System Tools, you may find utilities that can increase the
performance of your system.
- Scandisk your hard drive with "ScanDisk"
- Defragment your hard drive with "Disk Defragmenter"
- Virus Check your Hard Drive with the latest virus definitions
- Reclaim hard drive space by deleting unnecessary files with "Disk Cleanup"
- Verify that you have at least 150MB of free hard drive space for your swap file.
To install the tool in the ROOT of you HARD DRIVE is RECOMINDED but not
REQUIRED
FOR EXAMPLE
C:\APK-Multi-Tools\
You cannot have any spaces in the path IE your installation directory should not
be
FOR EXAMPLE
C:\APK Multi-Tool\
You will Need to have the JAVA JDK INSTALLED and you need to set your
Java_Home Environment Variable which needs to point to.
FOR EXAMPLE
C:\Program Files\Java\JDK1.7.0_25

Getting Started
- Place APK in appropriate folder (Any file name 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

Contacting Us
You can Most of your support for this application located over on the XDA DEVELOPERS
WEBSITE.
You can email me for support for APK files that you do not want to publicly be known because of
some reason or another and you want to keep it private until you have issues worked out.
You can also Visit the OFFICIAL WEBSITE or the OFFICIAL BLOG which you can download off
the ANDROID Google Play Store

OFFICIAL WEBSITE:
http://apkmultitool.com
OFFICIAL BLOG:
http://
OFFICIAL FORUM:
http://
EMAIL:
raziel23x@gmail.com

ADB Pull
UNDER CONSTRUCTION

ADB Push
UNDER CONSTRUCTION
(Only for system APK)

Extract APK
UNDER CONSTRUCTION

Install APK
UNDER CONSTRUCTION
(Don't do this if system APK, do ADB push)

Optimize images inside


UNDER CONSTRUCTION

Sign APK
This is Option 4 which you use to Sign a APK file with Test keys
(Don't do this if its a system APK)

Zip / Sign / Install APK


UNDER CONSTRUCTION
(Don't do this if system APK, do ADB push)
(All in one step)
(Non-System Apps Only)

Zip APK
UNDER CONSTRUCTION

Zipalign APK
UNDER CONSTRUCTION
(Do once APK is created/signed)

Compile Non-System APK Files


You have six options to compile Non-System APK files:

Create an unsigned APK using the keep


folder option
This option creates completely new APK FILE using the Decompiled files without a Signature file
which is the META-INF folder will be missing from the APK and this option will also create a keep
folder inside the root of the script file IE you will find the folder inside the main folder where the
script.bat using the contents of the original APK file, Within it, delete everything you have modified
and leave files that you haven't. IF you have modified any xml, then delete resources.arsc from
that folder as well as if you have edited any of the smali files you will also want to delete the
classes.dex and will require you to sign with either of the signing APK option within the APK
Multi-Tool

Create an unsigned APK using the original


AndroidManifest.xml
This option creates completely new APK FILE using the Decompiled files without a Signature file
which is the META-INF folder will be missing from the APK but will use the AndroidManifest.xml
from the original APK File and will require you to sign with either of the signing APK option within
the APK Multi-Tool

Create an unsigned APK


This option creates completely new APK FILE using the Decompiled files without a Signature file
which is the META-INF folder will be missing from the APK and will require you to sign with either
of the signing APK option within the APK Multi-Tool

Create an APK using the original Signature


using the keep folder option
Options 4 is experimental use with care
This option creates completely new APK FILE using the Decompiled files with the original
Signature file which is the META-INF folder will be copied from the original APK file and this
option will also create a keep folder inside the root of the script file IE you will find the folder
inside the main folder where the script.bat using the contents of the original APK file Within it,
delete everything you have modified and leave files that you haven't. IF you have modified any
xml, then delete resources.arsc from that folder as well as if you have edited any of the smali
files you will also want to delete the classes.dex and will require you to sign with either of the
signing APK option within the APK Multi-Tool

Create an APK using the original Signature


Options 5 is experimental use with care
This option creates completely new APK FILE using the Decompiled files with the original
Signature file which is the META-INF folder will be copied from the original APK file

Create an APK using the original Signature

and original AndroidManifest.xml


Options 6 is experimental use with care
This option creates completely new APK FILE using the Decompiled files with the original
Signature file which is the META-INF folder will be copied from the original APK file also will use
the AndroidManifest.xml from the original APK File.

Compile System APK files


UNDER CONSTRUCTION

Compile APK / Sign APK / Install APK


UNDER CONSTRUCTION
(Don't do this if system APK, do ADB push)
(All in one step)
(Non-System Apps Only)

Decompile APK
UNDER CONSTRUCTION

Decompile APK with dependencies


UNDER CONSTRUCTION
(For proprietary ROM APKS)

Install APK
UNDER CONSTRUCTION

Sign APK
This is option 13 to use as a alternative to a signing method outside of the sign with test keys
using option 4 this alternative version uses the Java_Home Environment Variable which needs to
point to the path of the Java JDK for example you could set to C:\Program
Files\Java\JDK1.6.0_41.
Allows you to sign a APK with Android Market supported Key
(Requires the JAVA JDK to be installed)
Read the installation instructions for more info on how to set this

Batch Theme Image Transfer


UNDER CONSTRUCTION

Batch Decompile APK Files


UNDER CONSTRUCTION

Batch Compile APK Files


UNDER CONSTRUCTION

About / Tips / Debug Section


This section is the about the application section and general Tips section with some Debugging
Tips and tricks

Batch Optimize APK


UNDER CONSTRUCTION
(Place the APK files inside the place-APK-here-to-batch-optimize folder only)

Batch Optimize Ogg Files


UNDER CONSTRUCTION
Place them inside place-ogg-here folder only

Clean Files/Folders
UNDER CONSTRUCTION

Quit
Exits the application

Read Log
UNDER CONSTRUCTION

Select compression level for APK's


This allows you to set the compression levels to the APK files
The options are between 0-9
0 is no compression at all and 9 is the maximum level of compression

Select compression level for Resources.arsc


This allows you to set the compression levels to the Resources.arsc file
The options are between 0-9
0 is no compression at all and 9 is the maximum level of compression
Most APK FILES will complain if the compression level is set above 0 in most cases but there is
a very few APK FILES the compression level does not matter

Set Max Memory Size


Only use if getting stuck at decompiling/compiling. This Option allows you to select how much
memory the application will use to process the APK files. Set the values to anything you want for
example the Default is set to 1024 which is 1024MB of Memory to be allocated to the processing
of the project files

Set current project


This allows you to set the project to which you want to work on
This is automatically set if there is only one project files inside the place-APK-here-for-modding or
place-ogg-here folders

Sign an APK
(Don't do this if its a system APK)
Batch support for signing Multiple APK Files at the same time
Place the APK files inside the place-APK-here-for-signing folder only

Switch Decompile Mode:


This mode allows you to pick to fully decompile the APK's or JAR's files or to just decompile
Sources or just the Resources or do a raw dump allowing you to just edit the normal images)

Sources and Resources Files:


Normal Decompiler mode This takes the longest to decompile as this option Decodes everything
within the APK File you are currently working on. This mode allows you to completely customize
the APK files to your liking, Warning this mode can be quite dangerous as it has the highest
chance of something to go wrong when recompiling the APK files.

Source Files only:


Will only Decompile (Bak)Smali source files IE the classes.dex leaving everything else
untouched. This mode is good for if you are just wanting to change something in the source code
but not touching any of the images or xml files. This mode makes it safe to copy over the original
META-INF Folder allowing you to not have to worry about resigning the APK File after editing it.
Warning this mode can be quite dangerous as it has the highest chance of something to
go wrong when recompiling the APK files.

Resource Files only:


This Mode allows you to decompile the APK files and leave the actual source code untouched IE
this only Decompiles the XML Files, Images and the resources.arsc. This mode is Mostly for the
Themers out there who wants to edit the APK files and are only interested in changing the color
and images of a APK file. Unlike the first two modes this is the safest mode to use as it does not
mess with the actual source code but just the xml files and images. But on the bad side there is a
high chance that copying over the META-INF Folder will fail and cause you to have to resign
the APK files edited specially if you edited the AndroidManifest.xml file which in many test cases
have found breaks the signature file completely. there are work around's to this that have yet to
be tested but in theory should work.

Raw Format Only:


As the Description states this is the APK in its raw state minus the META-INF Folder as apktool
automatically removes this file when it attempts to manipulate the APK Files which can easily be
added back in manually to the project folder. Basically all that happens with the APK file is it is
extracted into the project folder like you did with the other option in the image Editing Section
called Extract APK but uses apktool instead allowing you to use apktool to repackage the files in
case you had to change just a image not edit any of the xml files as this mode will not change
anything code wise or xml wise.

Read Log
This option launches a page which allows you to send a donation for the project
allowing you to pick how ever munch money you wish to give towards
development or even just as a thank you

Java is not installed


If you get the message Java is not installed try these instructions
How do I set or change the PATH system variable?
This article applies to:
Platform(s): Solaris SPARC, Solaris x86, Red Hat Linux, SUSE Linux, Windows 7, Vista,
Windows XP
Browser(s): All Browsers
Java version(s): All JRE Versions
MORE TECHNICAL INFORMATION
The PATH is the system variable that your operating system uses to locate needed executable
from the command line or Terminal window.
The PATH system variable can be set using System Utility in control panel on Windows, or in your
shell's start-up file on Linux and Solaris.
SOLUTION
Setting Path on Windows
For Windows XP:
Start -> Control Panel -> System -> Advanced
Click on Environment Variables, under System Variables, find PATH, and click on it.
In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you
do not have the item PATH, you may select to add a new variable and add PATH as the name
and the location of the class as the value.
Close the window.
Reopen Command prompt window, and run your Java code.
For Windows Vista:
Right click My Computer icon
Choose Properties from context menu
Click Advanced tab (Advanced system settings link in Vista)
In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you
do not have the item PATH, you may select to add a new variable and add PATH as the name
and the location of the class as the value.
Reopen Command prompt window, and run your Java code.
Setting Path on Solaris and Linux
To find out if the Java executable is in your PATH, execute:
% Java -version
This will print the version of the Java executable, if it can find it. If you get error Java: Command
not found. Then path is not properly set.
To find out which Java executable the first one found in your PATH, execute:
% which Java
Below are the steps to set the PATH permanently,

Note: We are here giving instructions for two most popular Shells on Linux and Solaris.
Please visit link below if you are using any other shells.
Path Setting Tutorial
For bash Shell:
Edit the start-up file (~/ .bashrc)
Modify PATH variable:
PATH=/usr/local/JDK1.6.0/bin
export PATH
Save and close the file
Open new Terminal window
Verify the PATH is set properly
% Java -version
For C Shell (csh):
Edit startup file (~/ .cshrc)
Set Path
set path=(/usr/local/JDK1.6.0/bin )
Save and Close the file
Open new Terminal window
Verify the PATH is set properly
% Java -version

Setting up Environment Variable


To Create the Environment Variable you need to go into System Properties
click on the
ADVANCED TAB
select
ENVIRONMENT VARIABLE
You will see a two boxes you want create the Java_Home in the System
Variables by clicking NEW in the Variable Name box name it JAVA_HOME in
the Variable Value box place the location of the installation of the JAVA JDK
FOR EXAMPLE
"C:\Program Files\Java\JDK1.7.0_25"
When setting the ENVIRONMENT VARIABLE there can be spaces in the path
but you will have to place the path between " " like I did in the example above

S-ar putea să vă placă și