APK Manager 4.0 for Mac OSX (64-bit)

Search This thread

MAD Industries

Senior Member
Oct 5, 2010
121
233
Los Angeles
EDIT: How and why did this post end up in Atrix Q&A? That is entirely unrelated. If a mod sees this, please return this thread to it's original location at Moto Xoom Development.

After waiting for way too long to have apk manager working on OSX, (so i can do my themeing natively instead of GFX in OSX and compiling in windows/linux) I have decided to port it myself. This has only been tested on an intel-based core 2 duo mac running snow leopard 10.6.8.

Credit for original APK Manger (windows) goes to: Daneshm90
Credit for linux port which this is based off goes to: farmatito

Update: This has been superseded by one of the most excellent rewrites of an application which I have had the pleasure to use. You my find s0niqu3's great work here: http://forum.xda-developers.com/showthread.php?t=1285130

---------
And one more thing: Shout out to Team EOS!
 
Last edited:

MAD Industries

Senior Member
Oct 5, 2010
121
233
Los Angeles
What are the capabilities of this and his can i use it?
Never messed with a apk manager before but would like to

Apk Manager is an "automated" environment for apktool and a couple other utilities. Together, it allows you to extract/zip/sign/decompile/recompile and otherwise change apk files. It is most widely used to change strings (sections of text) and graphics within popular apks such as framework-res.apk and SystemUI.apk (for theme development) or adobe's flash apk (for hulu support).
 

chaostic_2k1

Senior Member
Sep 14, 2009
166
21
Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).

The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.
 

s0niqu3

Senior Member
Feb 23, 2005
718
390
After waiting for way too long to have apk manager working on OSX, (so i can do my themeing natively instead of GFX in OSX and compiling in windows/linux) I have decided to port it myself. This has only been tested on an intel-based core 2 duo mac running snow leopard 10.6.8.

Hey,

First, to the OP, Thanks for this!!!!

I had been casually working on my own port from the windows version, but now there's really no need. I've tested briefly on OSX 10.7.1, mid-2009 c2d macbook pro, 64-bit, and it seems to work great so far.

Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).

The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.

For the adb error, uhm, really? Anyone that's going to be using this should have the knowledge/ability to add adb to their path. And yeah, I know, it sounds like you were just trying to give the OP a pointer to make it idiot proof, but this really seems like the bare minimum knowledge requirement that someone should have if they're going to use a tool like this.

For anyone that doesn't know, here's one easy way (on osx there are about a million ways to add to $PATH) to add adb to your $PATH:

edit your bash profile file (create a new file if it doesn't exist yet) here: ~/.bash_profile

Add the following:
Code:
export PATH=/path/to/your/sdk/tools:$PATH
export PATH=/path/to/your/sdk/platform-tools:$PATH

(Technically only the second one is necessary for adb to function, I recommend adding them both for quick ddms access too.)

The sox issue on the other hand I can understand, since its not included with OSX. But it is simple enough to install SOX with all dependencies using macports or homebrew. If you plan on doing anything at all with android development, hacking, modding, etc., on OSX, using one of these tools is absolutely essential. I personally use homebrew, because its immensely faster than macports on my laptop, and homebrew will use OSX's default x11, python, etc. binaries, whereas macports will compile its own second copy of x11, python, etc..

for macports:
Code:
POSIXLY_CORRECT=1 sudo port install sox

for homebrew:
Code:
brew install sox

Anyway, hopefully someone finds this useful, else I'll just come back and delete the post in a few days.

Cheers :)
 

MAD Industries

Senior Member
Oct 5, 2010
121
233
Los Angeles
Wouldn't run out the box. Had to add my adb to path (might be easier just including adb in the "other" folder, as adb is resource-independent and nothing has to be installed for adb to work on a mac [Just download and run]).

The other is "sox". Seems to be a open-source command line audio converter, right? Not part of the standard OSX install. The apkmanger should either disable any sox related (It already does on reading the script), in which case it should be removed as a hard error, or include it in the other folder.

Though it is very easy to install/add adb to path, I agree that it wouldn't hurt to throw it in the other folder just in case.

As far as sox goes, i don't know many who are using apk manager for ogg files. Those who are I figured would speak up when the time came and I would work with them to come to some sort of solution. Are you getting errors from sox missing? If so, you are absolutely right that the errors should be fixed. I did take steps to disable it from the script. If i missed something, feel free to post a log and I will take care of it.
 

chocoyo00

Senior Member
Feb 21, 2011
156
6
Just went through the whole installation, from installing ADB with it's own path to setting up SOX with homebrew and I gotta say, I'm a noob but I got it all done within a six pack! lol Thanks for the port mang! I can finally put away the PC to modify apk's! :D
 

chaostic_2k1

Senior Member
Sep 14, 2009
166
21
All I did to "fix" it was change

Code:
# Test for needed programs and warn if missing
ERROR="0"
for PROGRAM in "optipng" "7za" "java" "sudo" "aapt" "sox" "adb"

to

Code:
# Test for needed programs and warn if missing
ERROR="0"
for PROGRAM in "optipng" "7za" "java" "sudo" "aapt" [COLOR="Red"]#[/COLOR]"sox" "adb"

Since sox isn't supported in the mac port yet (the options are not in the menu), no need to throw a fatal error, or require someone to install sox. You might just want to comment out "sox" in that line and leave adb uncommented though, since the adb commands are enabled.

As for adding adb to the package, well, it's a convenience thing. APKmanager should be a one stop shop for working with apks like that, and having adb added would help with that. I personally don't like mucking about too much with installing packages on my laptop, so I keep adb in my Applications folder, and just cd to it. And I manually run many things. I wouldn't be using APKmanager to install or pull apks anyway.
 

s0niqu3

Senior Member
Feb 23, 2005
718
390
Hi again,

For anyone else that's doing their smali hacking on mac, I was seriously annoyed by the lack of syntax highlighting in my two favorite editors, Coda and SubEthaEdit, so I made my own syntax mode for them.

20110909-m9u36pdwt5ypg75963mt49uphs.jpg

The screenshot is from subethaedit (notice it supports code-folding at the ".method" level, ;) ) and is somewhat outdated, I fixed the mode already to properly hightlight all variables after parameters.

My thread for the mode on XDA is here: http://forum.xda-developers.com/showthread.php?t=1257025

or you can head straight to my blog to download them here: http://wp.me/p1JZM0-O

Cheers, :)
 

s0niqu3

Senior Member
Feb 23, 2005
718
390
Hi again,

So I started hacking your APK manager for mac today to hopefully bring it closer in-line with the windows branch.

And first thing was simply verifying that optimize png and ogg work if you install optipng and sox, and yes, they both do. So in addition to my tip above to install sox, also install optipng:

Macports:
Code:
POSIXLY_CORRECT=1 sudo port install optipng
Homebrew:
Code:
brew install optipng

Then go into the script.sh and uncomment the relevant lines that call those functions (menu lines 2, 14, 16 and answers for opt, bopt and ogg) and comment out the removal/error lines instead.

So far I've done the easy steps, added user selectable compression level, max java heap size, batch signing support, and added the z/p/zp options for batch optimizing.

I'll try to get this all finished this weekend so somebody else can test it too, and I'll try to include at least the 64-bit optipng binary I compiled, and possibly 64-bit sox and all its dependencies too.

Cheers, :)
 
Last edited:

s0niqu3

Senior Member
Feb 23, 2005
718
390
hi, i've tried this (decompile and compile Browser.apk):

http://forum.xda-developers.com/showpost.php?p=17682521&postcount=19

any ideas?

thx

Hi,

I've spent the past few days greatly improving the Mac version of APK manager. Well, really its almost a complete re-write. I've added 32-bit/64-bit all-in-one support, re-enabled old disabled features, added project support, system apk "keep" folder options, error checking, debug info, etc., etc., etc.

Really, after writing ~600+ lines of code, I can't even remember every change I've made at this point.

Anyway, I'm still testing and tweaking it multiple times a day, so I'm not really ready to release it here to the masses at XDA, but if you visit my blog, you'll find a current download link.

Until further notice though, I ask is that you please, PLEASE, don't link directly to the download, and please don't re-distribute here. If you want someone else to download my version, please just link them to this post.

I'm not trying to drive clicks or anything like that, I just don't want a billion questions about how to use my mod right now when its not finished, and is likely to change every few hours anyway.

Cheers, :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    EDIT: How and why did this post end up in Atrix Q&A? That is entirely unrelated. If a mod sees this, please return this thread to it's original location at Moto Xoom Development.

    After waiting for way too long to have apk manager working on OSX, (so i can do my themeing natively instead of GFX in OSX and compiling in windows/linux) I have decided to port it myself. This has only been tested on an intel-based core 2 duo mac running snow leopard 10.6.8.

    Credit for original APK Manger (windows) goes to: Daneshm90
    Credit for linux port which this is based off goes to: farmatito

    Update: This has been superseded by one of the most excellent rewrites of an application which I have had the pleasure to use. You my find s0niqu3's great work here: http://forum.xda-developers.com/showthread.php?t=1285130

    ---------
    And one more thing: Shout out to Team EOS!
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