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

Search This thread

Art Vanderlay

Retired Forum Moderator
Jan 2, 2014
3,464
2,650
Melbourne
I'm using this tool and having trouble recompiling. Every app that I try to compile gives me this error. In this case i'm working on a systemui apk on my oneplus one.

Code:
Please make your decision: 10
I: Using Apktool 2.0.0-1bd1e9-SNAPSHOT on SystemUI.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
	at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
	at brut.androlib.Androlib.build(Androlib.java:266)
	at brut.androlib.Androlib.build(Androlib.java:258)
	at brut.apktool.Main.cmdBuild(Main.java:240)
	at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
	at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
	at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
	... 4 more

It seems that some apktool.yml file is not present. How can I resolve this?
 

raziel23x

Senior Member
Sep 19, 2010
996
1,019
42
Novi
apkmultitool.com
On the Windows 2.0 WIP branch I have added the latest patches and support for the Lollypop Android Versions.

On the Master branch of the Linux version I have also added support for Lollypop Android versions

in the download section you will see two different links to download the latest builds one is a ******* link and a Normal Link.

Help support the website by using the ******* links which every click will help support the site with a small advertisement. to get the download just click on the SKIP AD button in the upper right corner which will appear after 5 seconds and to further help please have any ad blocker turned off on the website.

I have not received any donations in over a year and i have noticed that on a average i am getting between 300-1000 downloads of my application daily and it is hard work and cost money to run a website and also I am unemployed because of a disability and have zero income right now as my disability case is still in limbo and working on a lawyer to get it. I have been unemployed for over a year now and my wife is working three jobs and we are getting behind in the bills and rent because i am unable to work so any support is welcome specially with a wife and 2 kids a 2 year old and a year old.
 
  • Like
Reactions: PunchUp

jgcaap

Senior Member
Sep 22, 2009
9,910
19,227
Porto
this tool seems powerfull, but i dont understand this steps:

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.


What do we actualy have to do ? :\
 

raziel23x

Senior Member
Sep 19, 2010
996
1,019
42
Novi
apkmultitool.com
It been a long time since i posted anything like this.I went to see a Cardiologist yesterday and found out some bad new and and when i woke up monday i could not see and the Doctor does not know what is going on and he has set me up with a appointment to see the what is going on....I am loosing my sight and right now there is nothing my doctors can so and also the My Doctor took me off my Zoloft, and then Xanax, Paxil, Abilify and Benztropine. The Doctor also told me that I have server heart murmurs.
 
Last edited:

mjraogr

Inactive Recognized Developer
Feb 1, 2014
974
618
SP
universoeandroid.wordpress.com
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:
http://apkmultitool.com/
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.
@raziel23x
Nice guide Installed, i also used the Linux development to set up SDK in ubuntu 15.10

I already used Multi Tool in Windows OS making all modes for my ROMs work, it's simple and fast combination, right now in linux
 

nithin chandra

Senior Member
Jun 3, 2015
102
163
kurnool(AP)
ERROR

im unable to install SystemUI.apk friend after performing One-step Compile-Sign-Install...i dont't know why it is happening???


Install APK: SystemUI.apk (y/N)?
y
./script.sh: line 151: [: missing `]'
./script.sh: line 151: xy: command not found
 

mamdroid

Senior Member
Feb 25, 2014
931
595
Pensacola
It been a long time since i posted anything like this.I went to see a Cardiologist yesterday and found out some bad new and and when i woke up monday i could not see and the Doctor does not know what is going on and he has set me up with a appointment to see the what is going on....I am loosing my sight and right now there is nothing my doctors can so and also the My Doctor took me off my Zoloft, and then Xanax, Paxil, Abilify and Benztropine. The Doctor also told me that I have server heart murmurs.

Not sure if you are still active in this thread, but wanted to wish you the best!!! Been a little over a year since you posted this and I hope all is well with you. Take care bud:)
 

necrosauron

Senior Member
Aug 9, 2013
121
51
Rancagua
hello, first a 1000 thanks for this tool @raziel23x, several year later and this its an awesome tool, but linux its more specifics and .... reacently install on debian 10 this tool, and i was able to install it correctly, but im on samsung oreo cellphone.
first make a few mods in services.jar, and every thing went ok, awesome!!!
after that try it on systemui.apk and decompile ok, make the modification and when i compile back i have this problem...
JAU2FDgl.png

its a resources problem...
i install framework-res.apk in my terminal with this comand ./apktool if framework-res.apk
any comment or help wil be apreciate
 
Last edited:

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