FORUMS
Remove All Ads from XDA

APK Manager 4.0 for Mac OSX (64-bit)

119 posts
Thanks Meter: 233
 
By MAD Industries, Senior Member on 17th August 2011, 09:10 PM
Post Reply Email Thread
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/show....php?t=1285130

---------
And one more thing: Shout out to Team EOS!
The Following 5 Users Say Thank You to MAD Industries For This Useful Post: [ View ] Gift MAD Industries Ad-Free
 
 
17th August 2011, 09:10 PM |#2  
dean_fx's Avatar
Senior Member
Flag /
Thanks Meter: 348
 
Donate to Me
More
Awesome!!!!!!!!!!!!!!!!!!!!!!!! +9999999999
18th August 2011, 01:36 AM |#3  
Senior Member
Thanks Meter: 45
 
More
What are the capabilities of this and his can i use it?
Never messed with a apk manager before but would like to
18th August 2011, 01:45 AM |#4  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 233
 
Donate to Me
More
Quote:
Originally Posted by crackmulah

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).
1st September 2011, 08:40 AM |#5  
Senior Member
Thanks Meter: 21
 
More
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.
5th September 2011, 09:01 AM |#6  
s0niqu3's Avatar
Senior Member
Thanks Meter: 390
 
More
Quote:
Originally Posted by MAD Industries

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.

Quote:
Originally Posted by chaostic_2k1

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
12th September 2011, 07:55 AM |#7  
MAD Industries's Avatar
OP Senior Member
Flag Los Angeles
Thanks Meter: 233
 
Donate to Me
More
Quote:
Originally Posted by chaostic_2k1

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.
14th September 2011, 07:11 AM |#8  
chocoyo00's Avatar
Senior Member
Thanks Meter: 6
 
More
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!
15th September 2011, 11:40 AM |#9  
Senior Member
Thanks Meter: 21
 
More
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" #"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.
15th September 2011, 08:40 PM |#10  
s0niqu3's Avatar
Senior Member
Thanks Meter: 390
 
More
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.


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/show....php?t=1257025

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

Cheers,
17th September 2011, 04:37 AM |#11  
s0niqu3's Avatar
Senior Member
Thanks Meter: 390
 
More
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,
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes