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

Search This thread

raziel23x

Senior Member
Sep 19, 2010
996
1,019
42
Novi
apkmultitool.com
I have been focusing on the windows version mainly because I have been getting the most activity from windows users and just not had the time to really look at Linux version I just been doing binary updates to the Linux version.

Sent from my Xoom using Tapatalk HD
 

E.l.I.e_A

Member
Sep 19, 2012
16
68
28
Nabay
www.kingcobraroms.com
I have been focusing on the windows version mainly because I have been getting the most activity from windows users and just not had the time to really look at Linux version I just been doing binary updates to the Linux version.

Sent from my Xoom using Tapatalk HD
Thanks For The Tool !!!

---------- Post added at 05:34 PM ---------- Previous post was at 05:20 PM ----------

but a little hard to install
 

crazyscow

Senior Member
Jun 4, 2011
250
26
hey
i wanted to try this amazing program, but im stuck with this error

Code:
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 334: clear: command not found
Do you want to clean out all your current projects (y/N)?

i checked the script.sh to see what is line 323 and i think it has to do with sox.
this is what it says on line 323 and beyond
Code:
	which "$PROGRAM" > /dev/null 
	if [ "x$?" = "x1" ] ; then
		ERROR="1"
		echo "The program $PROGRAM is missing or is not in your PATH,"
		echo "please install it or fix your PATH variable"

would appreciate help.

using linux mint 15 olivia
 

raziel23x

Senior Member
Sep 19, 2010
996
1,019
42
Novi
apkmultitool.com
hey
i wanted to try this amazing program, but im stuck with this error

Code:
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 323: which: command not found
./script.sh: line 334: clear: command not found
Do you want to clean out all your current projects (y/N)?

i checked the script.sh to see what is line 323 and i think it has to do with sox.
this is what it says on line 323 and beyond
Code:
	which "$PROGRAM" > /dev/null 
	if [ "x$?" = "x1" ] ; then
		ERROR="1"
		echo "The program $PROGRAM is missing or is not in your PATH,"
		echo "please install it or fix your PATH variable"

would appreciate help.

using linux mint 15 olivia

use your software installer for the linux to install SOX as per the installation instructions of the readme
 

crazyscow

Senior Member
Jun 4, 2011
250
26
Thanks for the reply, i followed the read me file and i checked on the mint installer and on synaptic package manager and it says sox is already installed. Do i need to path it?

Sent from my Galaxy Nexus
 

crazyscow

Senior Member
Jun 4, 2011
250
26
that actually worked, but i have some new problems with java. i updated it but it just doesnt seem to work. so i guess ill try a different way.

thanks for the help tho.
 

kanoka42

Member
May 20, 2013
16
0
Okay, so I'm stuck at this one problem. I have it pulling the app, and extracting it, however I cannot decompile it when I type 9 I get
Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: brut/apktool/Main : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: brut.apktool.Main. Program will exit.

and it is strange because I have Java installed. Also when I hit 14 I get
Code:
Unable to access jarfile baksmali.jar
which I'm guessing is because of the 9 problem, any help would be appreciated!
 

Perseus

Retired Senior Moderator / Recognized Developer
Feb 10, 2011
10,633
8,471
Atlantis
@raziel23x.

According to OP, Compression Level Selection is available. However when running Script.sh, I don't see such option or the Level. I know this option existed in Windows version of your tool. It does not seem to be here.
 
Last edited:

GreenRaccoon

Senior Member
Apr 20, 2011
63
18
Austin, TX
Thanks for the reply, i followed the read me file and i checked on the mint installer and on synaptic package manager and it says sox is already installed. Do i need to path it?

Sent from my Galaxy Nexus

What do you mean by path it? I'm having the same problem.

-----EDIT-----

Figured it out. I was typing in "export PATH={PATH}:/.../platform-tools/adb" instead of "export PATH={PATH}:/.../platform-tools"
 
Last edited:

raziel23x

Senior Member
Sep 19, 2010
996
1,019
42
Novi
apkmultitool.com
UPDATED to apktool-2.0.0-1bd1e9-SNAPSHOT-small (TBA)
-Updated to smali/baksmali to v2.0.3
-Updated to Gradle 1.8
-Fixed (issue #8) - Correctly uses -c to retain original manifest and META-INF. (Thanks M1cha)
-Fixed (issue #63) - Correctly handles apk's that have unknown files outside of the standard aapt allowed resources.
-Fixed (issue #202) - Includes modified aapt to force package id on build. (Thanks M1cha)
-Fixed (issue #403) - Uses new usage output to cleanup organization of features.
-Fixed (issue #359) - Correctly handles malformed 9patch images. (Thanks Felipe Richards)
-Fixed (issue #401) - Uses versionInfo meta to correctly parse versionName and versionCode.
-Fixed (issue #440) - Include aapt binaries within Apktool to have closer control over build.
-Fixed (issue #439) - Correctly handles apk's that have have the general access bit enabled for encryption.
-Fixed (issue #339) - Re-enables debug mode ( -d flag) to fix smali debugging. (Thanks Ryszard)
-Fixed (issue #177) - Adapted output of smali to make breakpoint setting easier in different IDEs. (Thanks Ryszard)
-Fixed (issue #391) - Fixes characters (& and <) from being double escaped in <item>'s of arrays.xml
-Fixed (issue #260) - Fixes "Multiple substitution" errors with positional and exactly 1 non-positional argument.
-Fixed (issue #427) - Correctly handles `--frame-path` on uild
-Fixed (issue #396) - Correctly handle android:debuggable while in debug mode.
-Fixed (issue #340) - Fixed superclass errors on debug mode.
-Fixed (issue #458) - Fixed pkg id not being correctly set in framework files.
-Fixed (issue #469) - Added (-m / --match-original)
-Fixed (issue #326) - Fixed PNG increasing brightness on build (Thanks Christiaan)
-Fixed (issue #448) - Merge smali2 into Apktool
-Fixed (issue #496) - Fixes Windows builds caused by java.nio problems
-Fixed (issue #510) - Any error output is sent stderr instead of stdout
-Fixed (issue #426) - Filename too long (JesusFreke)
-Fixed (issue #524) - INSTALL_FAILED_DEXOPT fix (JesusFreke)
-Fixed (issue #473) - multiple package frameworks are treated correctly.
-Fixed (issue #531) - JAR disassembling borking is fixed
-Fixed (issue #550) - Correctly labels incorrect type handling of <array>
-Fixed (issue #571) - Fixed truncated strings (Thanks jtmuhone)
-Fixed (issue #578) - Fixed apk's with multiple empty types via ignoring them
-Fixed (issue #589) - Fixed apk's with one package named "android" from improper decoding.
-Fixed (issue #601) - Make StringBlock thread safe (Thanks aluedeke)
-Fixed (issue #238) - Fixed truncated UTF-16 strings
-Fixed (issue #584) - Fixed horrible spacing, aligned for 4 spaces.
-Fixed (issue #196) - Fixed style crash due to malformed styles.
-Fixed (issue #603) - Fixed unknown files prefixed with common name from being ignored.
-Fixed (issue #606) - Fixed unknown files being ignored when -r is used.
-Fixed (issue #609) - Fixed handling renamed manifests with ("android", "com.htc" and "miui").
-Fixed (issue #626) - Fixed handling strange characters with unknown files.
-Fixed (issue #630) - Fixed handling renamed manifests with ("com.lge")
-Fixed (issue #409) - Fixed array items incorrectly typed.
-Fixed (issue #512) - Fixed AndroidManifest missing attributes.
-Fixed (issue #677) - Fixed ignoring formatted attribute in <string-array>.
-Fixed (issue #675) - Fixed multiple overlapping catches.
-Fixed (issue #684) - Fixed issue with multiple ResPackages in ARSC file.
-Fixed (issue #682) - Fixed handling renamed manifests with ("yi")
-Fixed (issue #664) - Fixed issue with apks with large StringPools failing to decode.
-Fixed issue with APKs with multiple dex files.
-Fixed issue with using Apktool without smali/baksmali for ApktoolProperties (Thanks teprrr)
-Fixed issue with non-URI standard characters in apk name (Thanks rover12421)
-Added output to list Apktool version to help debugging.
-Updated known bytes for configurations to 38 (from addition of layout direction)
-Fixed NPE when handling odex apks even with --no-src specified. (Thanks Rodrigo Chiossi)
-Fixed locale problems when locale changes meaning of default letters in windows .bat script (Thanks Adem666)
-Fixed problem when -r was used with no /res folder present in apk (Thanks chrisch1974)
 
Last edited:
  • Like
Reactions: 47th_Ronin

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    GgI 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.7
    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

    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
    Instructions (Linux):
    1-Download, create a folder in your sdk called "APK-Multi-Tool" and extract into it.
    2-Goto the the "sdk/APK-Multi-Tool" folder and rename "Script.sh" to "script.sh".
    3-Go into the "other" folder, right click on one file at a time, goto "permissions" in the new window and check the execute box.(do this with all the files)
    4-To add the path to your folder open up a terminal and type in -
    sudo su
    PATH=$PATH:/THE PATH TO YOUR "SCRIPT.SH"
    (for me this looks like the following)
    PATH=$PATH:/sdk/APK-Multi-Tool/other/
    5-export PATH
    6-install "sox"
    7-Type into the terminal "cd PATH TO YOUR SCRIPT.SH"
    7.5 export PATH={PATH}:/PATH TO Your SDK/sdk/platform-tools/adb
    8-Type "./script.sh"
    9-You should have a running APK-Multi-Tool.

    how to install sox:
    Open the software center of the linux service and searched for sox. Installed it and it there you will have SOX working.

    - 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)
    - Open terminal and change-directory to APK-Multi-Tool(Easiest way is to type "cd ")
    - Chmod 755 Script.sh
    - Chmod 755 all files apps inside other folder
    - Run script by typing ./Script.sh
    - Minimize the script
    - Edit files inside the out folder
    - Maximize the script

    Downloads:
    https://github.com/APK-Multi-Tool/APK-Multi-Tool-Linux/archive/master.zip
    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.
    4
    Just updated to the Apktool 2.0.0 Beta 9 update and also updated smali.jar and baksmali.jar to version 2.0.3
    updated the script to the correct syntax to use the new apktool.jar changes
    3
    Binary updates

    UPDATED to apktool-cli-1.5.3-SNAPSHOT
    -Updated to smali/baksmali to v1.4.2
    -Fixed (issue #396) - Correctly handle android:debuggable while in debug
    mode.
    -Fixed (issue #340) - Fixed superclass errors on debug mode.
    -Updated to Gradle 1.4
    -Updated known bytes for configurations to 38 (from addition of layout
    direction)
    -Fixed NPE when handling odex apks even with --no-src specified. (Thanks
    Rodrigo Chiossi)
    -Fixed (issue #427) - Correctly handles `--frame-path` on uild
    3
    added lollipop support
    2
    There will be a update in the next few days to update the binaries to the application and mostly likes leave experimental releases
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone