yashsingh1/xdaforums huggingface dataset:
[Android] xCHPx:
I'm having troubles recompiling a systemUI.apk, does anybody have any suggestions?

I'm on a Mac on Lion 10.7.3

This is the output I get:

Building SystemUI

I: Smaling...
W: Unknown file type, ignoring: SystemUI/smali/.DS_Store
W: Unknown file type, ignoring: SystemUI/smali/com/.DS_Store
W: Unknown file type, ignoring: SystemUI/smali/com/android/.DS_Store
W: Unknown file type, ignoring: SystemUI/smali/com/android/systemui/.DS_Store
W: Unknown file type, ignoring: SystemUI/smali/com/android/systemui/statusbar/.DS_Store
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.java:345)
at org.antlr.runtime.Parser.getSourceName(Parser.java:88)
at org.jf.smali.smaliParser.getErrorHeader(smaliParser.java:358)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
at org.jf.smali.smaliParser.parameter_directive(smaliParser.java:7937)
at org.jf.smali.smaliParser.statements_and_directives(smaliParser.java:1902)
at org.jf.smali.smaliParser.method(smaliParser.java:1609)
at org.jf.smali.smaliParser.smali_file(smaliParser.java:595)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:71)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)

Please check build_log for apk with errors
[Android] grayn0de:
What changes did you make to SystemUI.apk?
[Android] scott.hart.bti:
Sorry to bring this back to life, but i need some advice.. I have installed Ubuntu and then installed java 6u31 and then ran the android utility install succesfully. I reboot and get the following when trying to run the utility..

scott@ubuntu:~/android-utility$ ./andutil

./andutil: line 340: syntax error near unexpected token `)'

./andutil: line 340: `	2) apk_dec -m;;'

ideas?
[Android] MasterZen88:
Found the problem. Creater forgot to close out the syntax...

1) echo "woot" ;[COLOR="Red"];[/COLOR] #a_if;;
2) apk_dec -m;;
3) apk_build -m;;
a) ttadb;;

Just add the following in red to your script and it should work.
[Android] scott.hart.bti:
Thanks for the reply... Forgive my ignorance I'm new to Linux... When u say add to the script you mean the actual andutil file?
[Android] tommytomatoe:
I will update tonight. I commented out a line last night and it was late, and in doing.so I added a random ' lol. Fix later.
[Android] grayn0de:
Does this mean that the OS X version will be in-line with the Linux version? Because that would be awesome. :D

Keep up the good work, Tommy!
[Android] scott.hart.bti:
This worked. Thank you very much!
[Android] tommytomatoe:
Typo has been fixed. It was late last night lol. :-)
[Android] MasterZen88:
Great!...By the way great job on the tool, this is a must have tool for devs!!!
[Android] cowsquad:
I hope I can decompile and compile ICS APKS
[Android] Fraction:
I am alittle new to modding. I am getting some errors on my mac when trying to execute commands.

My PATH look like this:

I'm a missing something?

Thanks.

Fraction
[Android] tommytomatoe:
Did you install the mac version? Your errors lead me to.think you used Linux version..
[Android] Fraction:
I followed the "mac install" link, got a zip called: "tommytomatoe-Android-Utility-0e87a90"..

EDIT:

I installed the old Mac 1.0.1 on another mac. And that worked... Strange...

How do I completely uninstall 1.0.2?
[Android] tommytomatoe:
When you installed 1.0.1 you effectively overwrote 1.0.2. No uninstallation necessary.

Let me.know.if.you need anything
[Android] Fraction:
On the MacPro, where I had the problems installing 1.0.1 didn't work. How do I remove all traces of this tool? So that I can be sure to start over from a clean environment?

And where is the "Please check the

build_log

for apk with errors"? Can't seem to find it?

And last: What is the Framework-res.apk used for? I had to install it, But the one I got from a rom failed horrible I think. So i used a 800KB framework-htc-res.apk, and all seemed ok..

(Are you on any Irc channels? I really wanna learn :) )
[Android] cowsquad:
Hey tomatoe. Can I use your utility to decompile ICS apks? Ive tried but it is giving me errors. is there any special step that I neede to follow?
[Android] clodfelterac:
it has been stated multiple times all over this thread that au does not do ics...

@tommy--- excellent work my man!... ive been searching for something like this for some time now... THANKS to you and your testers for bringing the tool this far!... and then incorporating dsixdas kitchen... icing on the cake...

best wishes for you and yours... i look forward to any further improvements you decide to make to this awesome all-in-one!!!... :-)
[Android] meccaandroid:
version 1.06 doesn't see that i have installed dsixda kitchen on user/home folder. when he asked to install the kitchen or not, i press no, and it says: "silly,you need the kitchen!"
[Android] tommytomatoe:
The kitchen installs into android-utility folder.
[Android] Robobob1221:
In the optimization menu there is an apk and resources decompression option.

Can I run both on the same apk or do I choose only one?

Just wondered as I noticed that running the apk option reduced the size then running the resources one restores it to its original size.

Also if you auto zipalign using au, should you not do that option when building the rom in the kitchen?
[Android] tommytomatoe:
Hey man. Just choose one of the compression methods.

And it does not hurt to zipalign multiple tines
[Android] Amin`:
Hi all

I want to know can miui be odexed?i mean miui gb....
[Android] Amin`:
do you guys think my java is good for au? :

java -version:
[Android] tommytomatoe:
Miui can be odexed.

I recommend using sun java binaries, but openjre will work fine. You might want to look into getting openjdk or better get sun java jdk.
[Android] stupidjerkheadface:
Tommy,

Did you get my PM regarding RUU's? I'm interested to know what you may have seen. My brother opened that zip and only found the android installer script... no help to him anyway since he doesn't run Ubuntu...

-Paul
[Android] yes123:
any tool to obfuscate smali code?

Is there any tool to obfuscate smali code?

Proguard only for jar, how about smali?

I wish to decompile and make some changes to some apk, but i don't want other ppl to decompile and check what i have modified.

So i need some tool to obfuscate the smali code before recompile,

Any suggestion?
[Android] jrod091:
did you find out how to remove the traces for a clean environment?
[Android] Robobob1221:
Hey there again!

Sorry to be asking a noob question but is there a 'better' option between the two compression methods? If running a deodex or odex system?
[Android] manoranjan2050:
Great Tool Waiting For Windows Release...........Downloading For My Little Linux... Finally i Found Great Tools....:good::good::good::good::good:
[Android] Homeboy76:
[UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012]

I have read all 555 post on the page ([UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012]).

I learned a lot about how to use Android Utility and how to fix some common errors. I can't wait to try it.

Thanks for making a tool that 'newbies' can use to to enter the world of ROM.
[Android] Linuxx84:
Hi, when I try to decompile an apk, terminal commands seem to work but the destination folder of apk decompiled is empty. Why?
[Android] duckitoo:
Thanks for the Program, now i can do commands easilly on my Ubuntu.
[Android] stepie22:
Hi, I'm having trouble adding java. I'm running Ubuntu 12.10 LTS.

I ran all of the previous commands as well, but I'm getting an error here:

stephanvd@Stephan-Home:~$ sudo apt-get install sun-java6-bin sun-java6-jre

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package sun-java6-jre is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

Package sun-java6-bin is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'sun-java6-bin' has no installation candidate

E: Package 'sun-java6-jre' has no installation candidate​
[Android] uzii0121do1:
I hope you make a windows ver as i am desperate need of a tool like this and dont have the money to buy a mac and not familiar with linux os
[Android] nick1313:
Windows version will most likely not happen. Linux isn't that difficult to learn. You can do it.

Not to speak for TT, but he has kind of "retired" from android developing.
[Android] linsalata28:
Re: [UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012

Does anyone know how to make this work with ICS and JB ?

I tried updating apktool and aapt with newer versions but I still get errors when trying to decompile apks for my sense 4.1 ICS ROM.

It would be awesome if this could at least get updated or even a user that knows how could help out with this.
[Android] nick1313:
Re: [UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012

Is your java up to date? Or android sdk up to date. I assume you are on linux?
[Android] uzii0121do1:
Okayy thanks for the heads up and i will look into linux and go from there :good:
[Android] linsalata28:
Re: [UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012

Yes both. I'm using Ubuntu 12.04 but I have been having some other issues with my system, not related I don't think. I'm probably going to do a fresh install of my system. Should it work by using apktool 1.5.2 or 1.5.3? I tried both but I still get errors trying to install the framework. It seems to work for framework-res.apk but I get a whole lot of errors with com.htc.resources.apk. It works great for gb ROMs and nonsystem apps but nothing after ICS.

Btw thanks for your reply. I remember you from over on the mikmik. Your always pretty helpful.
[Android] nick1313:
Re: [UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012

No problem. I like to help whenever I can.

What exactly are you trying to do and what errors are you getting?
[Android] linsalata28:
Re: [UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012

I mostly just make themes. Its late I'll run it tomorrow and post the errors I'm getting.

Thanks again.
[Android] nick1313:
Ok, let me know.
[Android] lozohcum:
doesn't work for MokeeOS apps like settings.apk

error during re-compiling
[Android] joe654:
Thanks for the work

Thanks for your work
[Android] Deadly:
Could you please not quote whole OP posts to say thanks? and there is a thanks button to avoid "thanks" posts.. please use that button.. its in the left bottom corner of each post..

Edit your post and remove the quote if you dont mind.
[Android] jrc2:
Is anybody else having problems installing android 4.3 framework-res.apk?
[Android] arnabbiswasalsodeep:
Please dont install android kitchen

as the title please dont keep it for default installation

i had kitchen at /home/kitchen but still it said i still need to install it. and 1 more thin.. while installing it my connection went off (power plug of router was disturbed) and it stopped and i had to install the utility all over again

please see to fix this issue

and by the way, like others said, your utility rocks
[Android] MrTechie890:
Hey, I was wondering if anyone can help me out with this issue I'm having with the utility. I installed the utility on my mac but whenever I select any of the options I usually get a message thats along these lines "line 429: change_log: command not found". If anyone can tell me whats going wrong it would be appreciated.
[Android] EVObastard:
I am just getting started with theming and pretty new at Linux as well and want to use this to theme some apps. I have searched the thread (maybe not well enough) and can not figure out how to get my themed app files back into the app.

Here is what I am doing so far.

1) move .apk file to "mod-here-solo" folder

2) extract apk

3) change .png files to color scheme or whatever

Here is where I am stuck, maybe my hole process is wrong I really don't have a clue, I'm just trying to stick to the process I use with my Windows XP apk themer. Any help would be great.
[Android] linsalata28:
You want to make sure to install your framework first and then decompile the apk. Also if your editing drawpatch 9 pngs you'll need to keep the guide lines that are around them after they are decompiled. If your not sure about how to make 9pngs you can search XDA . There are a few nice guides.

I haven't themed anything in a while with this tool so I'm not to familiar with it anymore.
[Android] EVObastard:
When I "pull" something it means that I am "copying" the file from my device correct?
[Android] linsalata28:
Yes...

If you need any help you can pm me and I'll help the best I can. Or you could even add me to google+ and start a hangout. My name on there is Anthony Linsalata and my email is Linsalata28@gmail.com

Here is a link to my Google+
[Android] EVObastard:
Great that's very kind of you.

Kirk out.
[Android] linsalata28:
I try to help others if I can. Thats how I learned. The dev of this tool was the guy who got me into making themes and taught me a lot of what I know back when I had my OG Evo 4g.
[Android] TMartin:
I'll give it a go later on tonight and let you know. Thanks
[Android] tommytomatoe:
Thanks T! I changed all 7z to unzip. I also added some error checking. If $? ≠ 0, then you will get a log message. Stuff like that. I tested it last night and this morning. I hope it works :-) Tell me how it goes.
[Android] tommytomatoe:
I am thinking about making a video...but if someone who is better would like to take a stab I would appreciate it :-)
[Android] TMartin:
A video by me would be HORRIFIC!!! but all seems well now with the latest linux update!!
[Android] tommytomatoe:
Sweet!!! I should have just stuck with unzip. I always used 7z and wasn't familiar with unzip commands. Turns out not much different.

Next in line is smali and baksmali. Version 1.0.2

Did you use the update script method or did you redownload tthe source?

And I'm sure your video would be as good I could make it :-)
[Android] TMartin:
I used the update script method. Worked flawlessly!
[Android] tommytomatoe:
Good to know. I pulled a page from Android :-)
[Android] NinjaWolf:
Just Found this Utility, great work tommy.

Works great.
[Android] tommytomatoe:
Thank you sir. Let me know if you find some bugs or if you have some good ideas :-)
[Android] Jwtiyar:
great work , any tutorial?

thanks.
[Android] tommytomatoe:
I plan on making a video some time. Otherwise all the necessary instructions are in third post.
[Android] DaRk_dOg:
Thank you very much mate.

Such a nice collection in one tool was really missing.

Regards, D_d
[Android] tommytomatoe:
Thank you. :-)
[Android] nishan432:
When i type ./andutil in terminal it say permission denied. Also double click on andutil call text editor not terminal.Please help me i m new in linux.

Note:running linux mint11
[Android] tommytomatoe:
Odd....

I haven't tested on mint but should work.

Do this.

Type these one at a time in terminal.

cd $HOME/android-utility

chmod 755 andutil

chmod 755 installau

Now double click on andutil. Then choose the first time install. After the installation you no longer have to type ./andutil but instead just andutil.

And as of version 1.0.1...I think you just type "au". Easier. :-)
[Android] tommytomatoe:
Any update nishan?
[Android] CleveRuse:
alright, so after unpacking the tar.gz package and installing the resulting folder to my /home directory, then renaming to 'android-utility' and finally opening and following the intructions inside to complete the installation; the program/tool opened and functioned flawlessly,but after closing the window and attemting to reopen the tool by one of the two ways described in the instructions, i found that i cannot. Neither by double tapping the icon or by typing 'andutil' into the terminal from any directory will launch the application. Im running Ubuntu 11.04 (Natty) w/ Gnome Desktop.

Here's what I tried next:

(basically just removed then re-added bak the folder to start completely over)

1) I moved the 'android-utility' folder to platform-tools, then cd'd to it and started up by './andutil'

2) chose 'x' to 'first time install'

3) moved bak to home folder per request

4) 'au.sh' found to exist

5) 'working folder' exists. Chose (defualt) to start over = (Y) yes

6) folder replaced.

" mkdir: cannot create directory '/home/....../log': file exists

7) new 'bin' created

8) Current path shown Here:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin/java/jdk1.6.0.22/bin:/home/ab/sdk/tools/:/home/ab/sdk/tools/apk_manager/:/home/ab/sdk/tools-2/

............added permissions To resources

........................added resources to.................(Done)

9) chose option to continue but then just closed the window.

10) opened new window and typed 'andutil' ; "command not found"

It's not a big deal. It's wut is have to do for APK Mgr (but I'd have considerably less options) Still, I figure I'm doing sumthing wrong and u can prolly advise me in fixing it to work as designed. Either way, I'm extremely indebted to u. I'll hit the 'thanks' button every time I see one of ur posts
[Android] tommytomatoe:
Cleve, thank you for posting this. I believe Ubuntu 11.04 and 9.10 handles the /etc/profile.d/ differently. I've pm'd you the fix so please check there. If it works I will post this in the FAQ. Thank you.
[Android] CleveRuse:
yep, that fixed it! thnk U!

.....lol, now;) HOw bout the .9.png's? i know how to draw the patches, Im just not sure how to get it all started. So i have a .9.png i want to edit. ive already softened the omage in GIMP. its an already compiled .9png so i placed it in the 'compiled' folder then chose option 2. I hit enter expecting it to go to the 'Decompiled' folder but there's is nothing in there; even tho it says that is where its decompiled to.

So after i place in the 'compiled' folder and press 'enter', what next?

Here is the output from the terminal as Im trying to edit this image so far:

Select an Option: 2

Please place your raw ninepatch images in:

/working-folder/ninepatch/compiled

Please press [enter] to continue

Decompiling common_music_progress_fill (copy).9.png. Please wait.

......

/home/ab/android-utility/utility/9patch: line 98: $a: ambiguous redirect

Images Decompiled to:

......

/home/ab/android-utility/working-folder/ninepatch/decompiled

Please press [enter] to continue
[Android] tommytomatoe:
Hey Cleve. Been working and chilling with my fiancée all day.

Here is the procedure with 9.png. I will make a tutorial soon with much more details.

But before you modify the 9.png you must decompile it! In your post you said you used gimp to soften up the image. Don't do that first! Take the 100% untouched compiled png, place in the compiled folder, and run the decompile tool. Then edit. Then place in the draw9patch utility. There are great 9.png tutorials out there so look around. There is a 9patfh link in my signature. In that link are some more links to helpful info on 9.png
[Android] EVObastard:
Ha I had an EVO (hence the name) still do, great phone.

Kirk out.
[Android] mike the inkman:
Wow. this is a really complete tool. Is this still updated? If not, I am starting on a tool that I plan to give this type of functionality eventually, but right now it is a lot more basic than this. I was just searching similar things and found this, and the last post is a little old, so i figured I would link to my tool in case this hasn't been updated for lollipop. Great work.

http://xdaforums.com/android/development/toolkit-apk-munky-rench-t3026757/post58747626#post58747626
[Android] ilnanny:
Thanks for share your utility.

I like your great work.
[Android] CleveRuse:
thnks, no worries. i dont mind waiting. that should be enough to get me started. Ive done all this b4 ....well, on Windows. i just have a horrible memory for things i havent done in a while. it really sucks. Ive been playing guitar for about 16 yrs. i used to give lessons, to friends as well. my friends will are allways having to teach me things ive tought them. even songs ive written, they teach me. they dont play them nearly as well as i do, lol .....but they remember them. oh, well, thnks again.
[Android] CleveRuse:
ok, that helped w/ decompiling. so i put the unedited compiled image in 'compiled' foleder and decompiled. it whnt well so i edited in GIMP then saved. next i placed in 'SOURCE' and tried to compile but i get this error every time:

"ERROR: Failure processing PNG image res/drawable/panel_navbar_button_rest.9.png

rm: cannot remove `out.apk': No such file or directory

Images Compiled to:

......

/home/ab/android-utility/working-folder/ninepatch/compiled

Please press [enter] to continue"

and there is no compiled image in 'compiled', just the original. so i tried deleting the original thinking maybe it couldnt process w/ another image in there? but it didnt help. I know u said ud put out a tut but i think Im doing everything correctly now .....ok, i dont know, but it seems like i am. lol, help!

ps: congrats on the fiance thing. idk when that happened but i think its pretty awesome!
[Android] CleveRuse:
And how do I recompile an apk? I decompiled, by placing in the "solo" folder for nodding, but after a few edits I try to recompile and am told it "dante find a valid project. Where do i put it? I could nvr get apk mgr to recompile either. God am I frustrated? ......I'm sure I'm just stupid
[Android] tommytomatoe:
Thanks man! We've been engaged since December 09. Two year engagement and wedding is this coming December.

As for your issue...I'm not sure what went wrong. Please post yyou png here please. I will test. You can also pm me.

The procedure is to place the 9.png in the SOURCE folder, which you did. Perhaps try again.
[Android] tommytomatoe:
Do this. Use the mod multi option. Place your single apk in that folder. Decompile with option 3. Recompile with 5.

Btw you need to install proper frameworks first...ie...com.htc.resources.apk and framework-res apk ( option 1).
[Android] CleveRuse:
Ok, hold on......
[Android] CleveRuse:
Ok, I'm confused, sorry. What do those 2 framework files have to do with editing a single apk .....like SystemUI.apk?
[Android] tommytomatoe:
Basically...apks have resources in Android that are embedded in framework files. Framework-res.apk is the main one, but if you are dealing with htc apks you will also need com.htc.resources.apk. Be sure theyre from same rom as the apk yyou're modifying.

So...

Place those two framework apks in the "framework_here" folder then run option #1 in Apk re-engineering.
[Android] CleveRuse:
Ok, thnks ...........blah blah, just post it already -lol, sorry. I'm on tapatalk
[Android] tommytomatoe:
You'll get it man!

And another cool thing with android-utility. It installs apktool automatically so if you are having issues with android-utility ...you can also just use apktool.

In terminal, type "apktool". Should work. You should see all the options available. If you'd like help with just the apktool commands I can post those too...but for the most part android-utility will cover all the bases.
[Android] tommytomatoe:
Just a quick update. I am working on update version 1.0.2.

Just compiled apktool from source (v1.4.2.269870b)

Should also have baksmali and smali scripts for ya!