Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,443 Members 50,006 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Do you find the latest beta functional ?
Yes 1,063 75.18%
No 351 24.82%
Voters: 1414. You may not vote on this poll

Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

Tip us?
 
Daneshm90
Old
(Last edited by wardfan220; 11th March 2012 at 03:48 AM.)
#1  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
Lightbulb Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

So i have 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 Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Goes to farmatito for porting this script to linux

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 occured anytime u perform a task, and reports it
- Read log (Option 20)
- 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.
- 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
- 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
- Stuff i forgot i guess

Instructions (Windows):
- 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

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

Requirements:
Java
Adb

Future Improvements:
- Manage multiple simultaneous apk edits (choose which apk to extract/build)
- Option to optimize the apks
- Option to adb push to user defined location
- Other stuff i dont know yet





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.

MOD EDIT:
New DL link from this post
http://apkmultitool.com
Scripts : Recovery Customizer Link Apk Manager Link Auto Deodexer Link Backup Manager Link Update.zip Modifier/Creator Link
The Following 203 Users Say Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
 
Brut.all
Old
#2  
Recognized Developer
Thanks Meter 332
Posts: 1,467
Join Date: Jul 2009
Nice :)

As you probably know, I want to add signing and installing functionality to apktool. But I don't plan to make any kind of GUI for it, so such wrapper is a very good thing for many users, thanks :)

What is "Option to optimize the apks"?
G+ | apktool | Ingress broot mod | Brut Google Maps (dead)

If you like me you can buy me a droidburger!
The Following 3 Users Say Thank You to Brut.all For This Useful Post: [ Click to Expand ]
 
Daneshm90
Old
(Last edited by Daneshm90; 5th June 2010 at 08:40 PM.)
#3  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
I was thinking of incorporating the script "apkopt" it was basically using optipng to optimize the png's and then used zip align on the apks. Thanks btw, this tool wudnt exist without ur awesome script

I just did this so ppl would stop asking questions like "How do i change this/that in an app"

Here this is wht im talking about Link
The Following 2 Users Say Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
 
deuse
Old
#4  
Senior Member
Thanks Meter 7
Posts: 1,038
Join Date: Apr 2009
Very nice

Thanks dude...
Cube Talk 5H
Cube U30GT 2
 
j_r0dd
Old
#5  
j_r0dd's Avatar
Senior Member
Thanks Meter 282
Posts: 734
Join Date: Jun 2009
Location: Last house on the block
once again you manage to make modding easier with your scripts!
Galaxy S4 (SGH-M919) :: CM11
Follow me on twitter
The Following User Says Thank You to j_r0dd For This Useful Post: [ Click to Expand ]
 
xaueious
Old
#6  
xaueious's Avatar
Senior Member
Thanks Meter 141
Posts: 939
Join Date: Dec 2009
Location: Toronto

 
DONATE TO ME
Does your apkopt avoid .9.png files? Because those have been a pain in the behind.
Past devices: HTC Dream (Rogers), Acer Liquid E, HTC EVO3D GSM, HTC Panache (international myTouch4G), Huawei Ideos U8150, Rogers HTC Magic (myTouch3G variant)

Current devices: Samsung Galaxy Nexus GSM (i9250), ASUS Transformer TF300, Samsung Galaxy S3 i747m (Telus), Huawei Ideos S7
 
Daneshm90
Old
#7  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
Default Re: Apk Manager 1.0 - Makes Modifying Ur Apk A Breeze

my script currently does not optimize apks. it will be in the upcoming updates and yea prolly when ill implement itll avoid .9.pngs lol
Scripts : Recovery Customizer Link Apk Manager Link Auto Deodexer Link Backup Manager Link Update.zip Modifier/Creator Link
The Following User Says Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
 
Daneshm90
Old
#8  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
I have already incorporated "adb push" into the script.
Aside from adding an option to optimize the apks, is there anything else you guys think would make this script easier to use ?
Im really targetting those ppl who overcomplicate the simple process of editing apks. Any tips would be appreciated.
The Following User Says Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
 
Daneshm90
Old
#9  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
I posted a video attached to the main post.
The Following User Says Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
 
Daneshm90
Old
#10  
Daneshm90's Avatar
Recognized Developer - OP
Thanks Meter 634
Posts: 3,309
Join Date: Jun 2009
New version out, features added are

Zipalign apks
Optimize pngs, ignores .9.pngs
allows to adb push to phone through script.

The Following 3 Users Say Thank You to Daneshm90 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes