Android OS Forum banner
1 - 6 of 6 Posts

·
Android Beginner
Joined
·
41 Posts
Discussion Starter · #1 ·
Mod Type:: Script

Difficulty:: Moderate

Mod Base:: Other

Mod Status:: Alpha

Apply In:: ADB

Optional:: Smali Edits

Requires Root:: No

Optional:: Custom Settings

Source::
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
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):
- 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 apkmanager (Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script

Downloads:
Please Visit the website at APK Multi-Tools

Right now I only have it on Github as I do not have a Linux box to test so until I can get confirmed I am keeping alpha.
Source Code at [email protected]
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.
 

·
Registered
Joined
·
33 Posts
sound really good...it work with bad values(ics/jb recompile errors)? yes i suppose...

i will try and i report my feedback
thanks for your work

Inviato dal mio Galaxy Nexus con Tapatalk 2
 

·
Android Beginner
Joined
·
41 Posts
Discussion Starter · #3 ·
Did some changes to see if I can fix the issue with The keep option to work with none system applications.

Started work on trying to get batch optimize to work.

I will be working on making minor fixes to see if I can get all the bugs out from the original breakage.

I have no ETA to when I will be officially releasing 1.0.7 as I still have a lot of work left to do.

Sent from my DROID RAZR using Tapatalk 2
 

·
Android Beginner
Joined
·
41 Posts
Discussion Starter · #4 ·
There had been a lot of bugs fixed and changes for the full list if changes check putty Github fire the list of changes and for up to the minute changes download APK multi-tool mobile off the Android market as i poorest my Github commits to the official blog.

Sent from my DROID RAZR using Tapatalk 2
 

·
Registered
Joined
·
2 Posts
Greetings,

ok, please forgive my ignorance but I'm new to this ubuntu box I'm running and new to android develvopment, but here goes.

Been trying without much luck to get multi-tool to run. Got it to the point where I'm getting messages about path not correct, but I can't seem to get it to work no matter what I try. Here's the output when I try to run ./Script.sh:

The program aapt is missing or is not in your PATH,
please install it or fix your PATH variable
The program sox is missing or is not in your PATH,
please install it or fix your PATH variable

and here's my path setting:

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

And I've searched everywhere on how to set path environment in ubuntu and every message conflicts with another. Some say to set it in bash, others .pam_environment, and still others event somewhere else.

Please, if anyone can shed some light it would be greatly appreciated.

Thanks...

p.s.

I would have posted this on the other forum xd_, but I'm not allowed to be a new guy trying to learn something, that just can't find a post about my question anywhere on the site, without making 10 (intelligent) posts first...
 
1 - 6 of 6 Posts
Top