yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] dtm_stretch:
Alright so I can decompile(with 14 and drag the apk) correctly with no issues. I am working with systemUI.apk.

I make the changes to the xmls and and one image, compile via 15. These are the errors I get from the log:

[*] C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI
recompiling C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI...
I: Copying classes.dex file...
I: Building resources...
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/layout-sw800dp
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/values-sw600dp
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/values-sw720dp
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/values-sw720dp-port
invalid resource directory name: C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res/values-sw800dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Derek\AppData\Local\Temp\APKTOOL7155813864576034832.tmp, -I, C:\Users\Derek\apktool\framework\1.apk, -S, C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res, -M, C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Derek\AppData\Local\Temp\APKTOOL7155813864576034832.tmp, -I, C:\Users\Derek\apktool\framework\1.apk, -S, C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\res, -M, C:\Users\Derek\Downloads\Root\Theming\AutoAPKTool2.0.4\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

Apk shows up in the _OUT_APK folder but this doesn't contain any of the changes I have made. Do I need to switch out aapt or making any changes to the Autotool?
[Samsung Epic 4G Touch] agat63:
Is it stock app or previously modded?

Did you try to recompile app without any changes?
[Samsung Epic 4G Touch] dtm_stretch:
Stock deodexed FD02. BUT the problem wasn't the tool it was user error, I modified an xml and didn't point it to the new image causing the compile to error out and the tool just rebuilds the apk with the original files. My buffalo. Nothing to see here. As you were. Move along.

Thanks agat!
[Samsung Epic 4G Touch] agat63:
So it did compile correctly?
[Samsung Epic 4G Touch] dtm_stretch:
Yes, sir. 10char
[Samsung Epic 4G Touch] agat63:
Good to know.

I just finished posting my FD02 rom and was about to look thru code and see what's wrong.

Can do something else than.:D
[Samsung Epic 4G Touch] strongsteve:
Fantastic set of tools! ICS stuff has been a real headache. My biggest need is copying bootclasspath signitures onto newly odexed ICS framework jars.
[Samsung Epic 4G Touch] 12MaNy:
Can't wait to try this out. You da man agat63. :)
[Samsung Epic 4G Touch] agat63:
Now when we have over 100 downloads can I get some feedback guys.

Would like to know how it works and if anything needs to be done to it.
[Samsung Epic 4G Touch] datajosh:
Can't get it downloaded from Jumbofiles, any chance of a mirror elsewhere like Mediafire or Megashare?
[Samsung Epic 4G Touch] agat63:
Here you go:

http://www.mediafire.com/download.php?qod57h65kwwv3cb
[Samsung Epic 4G Touch] 12MaNy:
I haven't had a chance to use it yet. Holidays are a busy time for me. Will post feedback when I do though. :)
[Samsung Epic 4G Touch] agat63:
Did you install framework-res.apk with option 1 first?

Is it a stock app or it has been moded (themed) before?
[Samsung Epic 4G Touch] lms24:
I did install the framework-res.apk with option1 (just wondering: should I have done anything else for installing than just pressing 1 e.g. putting framework-res.apk in a certain folder.?)

Since I'm porting from a port (not from the original RUU) I guess the framework-res.apk has been modded.
[Samsung Epic 4G Touch] agat63:
Modded apps/framework files are always a problem.

To make sure it's not the tool by file itself try to decompile and recompile the stock file without making any changes to it. If it works than the problem is in the app/framework you trying to mod.

If it doesn't than we should look what went wrong with the tool and/or framework installation.
[Samsung Epic 4G Touch] sleshepic:
First thing to do i think would be to update the aapt file with the newest one from your android sdk directory. If your not sure if it is, update everything in sdk manager then transfer the new aapt file from android(think its in platform tools? Maybe not) into your apktool folder(replacing existing aapt). That should do it, running programs "as administrator" can also help issues with not accessing folders.
[Samsung Epic 4G Touch] 12MaNy:
Shortcut: Try using 7-Zip to swap the .9's that you don't have to mod from port .apk to stock .apk....then just decompile to mod .XML, .dex, .jars.....etc.

EDIT: Nevermind....you have to be able to decompile port .apks in order to see which files are modded. Derr...sorry, a little hung over.
[Samsung Epic 4G Touch] Tiffany84:
Sorry I didn't get back to you sooner but I was finally able to test your tool a couple days ago and this is the first tool that I was successfully able to de-compile and re-compile an ICS apk on the first try. That's a WIN in my book.
[Samsung Epic 4G Touch] agat63:
Thanks for feed back.

Means a lot to me.

Sorry to hear about your laptop.

Did send a little some in your direction. Hope you will be back soon.

I love your work and looking forward to see more from you.

It's not much but hope every little bit helps.
[Samsung Epic 4G Touch] Tiffany84:
It's way more than u needed to do. I really appreciate the support. Thanks for all u are doing for the community.
[Samsung Epic 4G Touch] agat63:
The life is not only about what we need to do buy sometimes what we want to do or what our heart tells us to do.

Isn't it?

And I need you active and working so we can take a look at that Contact and Phone transparency. :)
[Samsung Epic 4G Touch] 12MaNy:
Yep.....decompiled/recompiled without a hitch for me too. Thanks agat63
[Samsung Epic 4G Touch] draxterix:
all localization file is dead....

Please share version 2.0.4 ... i cant find ...
[Samsung Epic 4G Touch] sleshepic:
Looks like it didnt decompile correctly, see the backwards slash right before animator on the first line?

Invalid resource directory name: c:\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res/animator

Either try another decompile or fix the xml that had the incorrect path name i suppose...maybe? Thats what i would start with at least
[Samsung Epic 4G Touch] AvatarOfFrost:
if you are getting plurals.xml errors you have to go to line 79 in each xml that generated the error and add % to the second % on that line:

for example, change

<item quantity="other">%d of %d</item>

to

<item quantity="other">%d of %%d</item>

notice the double %% at the end of the line
[Samsung Epic 4G Touch] sleshepic:
Thanks, somehow got that one figured out. Thx for the heads up. This tool is great, thx again agat63
[Samsung Epic 4G Touch] agat63:
Actually I'm changing that line from:

%d of %d to

%1$d of %2$d.

If you check one plural that doesn't listed in that error message it's exactly how the line looks like.
[Samsung Epic 4G Touch] _dan:
Dl has been telling me "This file is temporarily unavailable while we are performing maintenance on this server.

Please try to download this file again in 24 hours" :( Would you happen to have a mirror?
[Samsung Epic 4G Touch] agat63:
Try this link:

http://www.mediafire.com/download.php?qod57h65kwwv3cb

This should work.
[Samsung Epic 4G Touch] sleshepic:
Yup, thats what i switched it to, found somethin on the net about it. Thx. So psyched now that theyre able to be worked with :)
[Samsung Epic 4G Touch] _dan:
Thanks :D!
[Samsung Epic 4G Touch] agat63:
Did you run option 1 first?

if framework. You should install framework first even thou you trying to decompile framework-res.apk.

What version of sdk have you downloaded and intalled?

Since you saying that java is up to date these are only 2 things I can think of at the moment.
[Samsung Epic 4G Touch] rachelm920:
Yes Option 1 is the first thing I did.

I have the most recent version of everything.
[Samsung Epic 4G Touch] agat63:
Unfortunatelly I'm at work right now and can't test/check it myself till evening.

If this can wait I'll defenetly try to decompile and recompile the app once I'm home.

Can't help you with anything else at this moment.
[Samsung Epic 4G Touch] sleshepic:
looks like the decompile messed up the directory names(some of the slashes are backwards) you might have to install the system framework too? for samsung its twframework, for htc isnt it like Rosie.apk or something? easy place to start if you could install both frameworks first before decompiling
[Samsung Epic 4G Touch] agat63:
Only one thing.

I've noticed your _INPUT_APK folder is in root of c:\ drive.

I never had it set like that and script might not finde all parts.

What is you folder structure?

It should have main folder like apktool or whatever you want to name it and inside that folder you should have all parts of the tool and all subfolders like _INPUT_APK and all others.

I did zip the whole folder so you can extract it where ever you what and it would maintain the folder structure since it's important for the tool.

If you have set it up a different way please try to set it the way I discribed above.
[Samsung Epic 4G Touch] rachelm920:
Actually I have it in 2 places. It was in C:\AutoAPKTool2.0.4 and when I ran the program it kept creating the folders (_INPUT_APK etc.) in the root directory for some reason although they already existed in the AutoAPKTool2.0.4 directory. Then when I chose option #1 it kept saying Framework wasn't in the folder but it was... so then I copied it to the one on the root drive and it found it... IDK what it's problem is :( I always used APK Manager before but since the upgrade to ICS I have had nothing but problems.

I have an HTC Amaze and I did try putting com.htc.resources.apk in under the additional framework files, and that didn't work either. I am getting so frustrated with it... dreaming of .9.pngs in my sleep lol
[Samsung Epic 4G Touch] agat63:
That's very strange.

It should created _INPUT_APK folder only inside of apktool folder not in root of drive c:\.

I'll check it when I get home but I'm positive it should create that folder in one place only.
[Samsung Epic 4G Touch] OmenHTX:
I: Loaded.

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a4

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a4

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a4

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a4

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a4

I: Decoding file-resources...

W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108048d

I: Decoding values*/* XMLs...

I: Done.

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a4

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)

at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)

at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:46)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)

at brut.apktool.Main.cmdDecode(Main.java:128)

at brut.apktool.Main.main(Main.java:65)

its clean systemui.apk from stock rom 2.3.4

many errors also in other stock system apps

Im using apktool 4.9 with apktool 1.3.2
[Samsung Epic 4G Touch] antiochasylum:
I have tried numerous versions of Java, which one do you need to use this?

Every single one says "Java not found"
[Samsung Epic 4G Touch] agat63:
I have jre6, jre7 and jdk 1.7.0.2 installed on my PC.

Had no problems with any of the E4GT ICS apps.

Didn't try any other phone tho.
[Samsung Epic 4G Touch] agat63:
What rom?

What phone?
[Samsung Epic 4G Touch] agat63:
Have you installed framework-res.apk first?

It looks like program missing it.
[Samsung Epic 4G Touch] kage00:
Yes, installed framework-res.apk first, I did everything like I normally do.

Finally what I did was decompile with your 2.0.4 version, and everything worked.

I also decompiled with v2.0.0 in a separate folder. edit - (after removing the classes.dex file from the apk)

Then I copied everything across from the v2.0.4 folder to the v2.0.0 folder overwriting everything except for the apktool.yml (I suspect the problem is in the apktool.yml from the v2.0.4 folder)

Then I moved all the smali files across to my other folder with my 2.0.0 installation with the classes.dex extracted and in it's own 'smali' folder, I used v2.0.0 to recompile it all together and it worked fine.

I think something is wrong with your version of the program in that it writes the file structure of the apk wrong eg. "/res\drawable..."
[Samsung Epic 4G Touch] agat63:
Hard to beleive something to be wrong in my version not because I think I'm that good but because I'm using it all the time and don't have problems.

Beside that tool has been downloaded over 600 times. I think I would of have more complaints about tool not working by now.

But I'll defenetly check out uploaded version and go over all batch file to make sure I didn't miss anything.
[Samsung Epic 4G Touch] kage00:
You could be right, maybe I did overlook something, or maybe the program has problems with the file systems of certain roms? It's strange that some people are having the same problems and others aren't...

In any case, thank you very much for your hard work on this program, it definitely saved me a bunch of time. :)
[Samsung Epic 4G Touch] agat63:
Apparently it created a lot of headache first.:D

But I'm glad it worked out for you.

You see I've tried it with E4GT ICS builds only. May be if used for OS of different phones more should be taken into consideration. As stated in OP I'm not a programmer and was tapping in the dark when trying to make this work.

Hopefully someone more knowledgeble then me can take it from here and make it really universal so it would work with any OS and any phone.

It's far beyond me and over my head.
[Samsung Epic 4G Touch] jrod091:
So I tried decompling and recompiling my Mms.apk and got some errors, so I tried just recompiling my Mms.apk without making and changes and still got the same errors:

[*] C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms
recompiling C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms...
I: Smaling...
I: Building resources...
invalid resource directory name: C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\res/mipmap-hdpi
invalid resource directory name: C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\res/mipmap-mdpi
invalid resource directory name: C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\res/mipmap-xhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Owner\AppData\Local\Temp\APKTOOL2980594474901647136.tmp, -I, C:\Users\Owner\apktool\framework\1.apk, -S, C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\res, -M, C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Owner\AppData\Local\Temp\APKTOOL2980594474901647136.tmp, -I, C:\Users\Owner\apktool\framework\1.apk, -S, C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\res, -M, C:\Users\Owner\Downloads\AutoAPKTool2.0.4\_INPUT_APK\Mms\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

any ideas as to what could be going wrong?
[Samsung Epic 4G Touch] agat63:
I'm at work and don't have my laptop with me.

I can try to look into it when I get home tonight unless someone bits me to it.

I guess I would have to download tool and try to set it up from scratch just to make sure that uploaded version matches what I have on my laptop.
[Samsung Epic 4G Touch] jrod091:
So I updated Java just in case and I replace the aapt file, and it works like a charm now :)
[Samsung Epic 4G Touch] agat63:
Good to know.

May be I should update OP and list java versions I have on my PC since I don't have any problems with the tool.

That should help others in case they run into same problem.
[Samsung Epic 4G Touch] powwow88:
Hi, I've tried that program with LG Optimus 2X. I want to change some things in framework-res.apk of a cm9 based rom. I used option Decompile ics app, then Recompile ics app gave me plurals.xml error I changed those as it was mentioned in other thread. I pushed it with adb, rebooted but it was stuck at bootanimation then I signed the apk, and booted up but after pin code the launcher crashes and I cant do anything, only battery pull out helped. If I dont change anything only plurals.xml files to be able to recompile it, then I still have this problem. I'm really confused. Any suggestion? :confused:
[Samsung Epic 4G Touch] PacerguyDon:
This looks to be a great program, but The Java is really being a big headache.

I'm on a Windows 7 64 bit machine, and have Java Jre6, Jre7, Jre1.6.0_22 installed in C:Program Files (x86)/Program Files/Java.

I also have Java Jre7 and Jdk1.7.0_04 installed in C:Program Files/Java

I don't know if I have to many different varieties of Java going on or not enough, but I can't get the program to do anything but open to the CMD window with all the options. (running as Admin)

I have the program installed as C:AutoAPKTool2.0.4

Trying to decompile a framework-res.apk I place the framework-res.apk into the INPUT APK folder, then choose option 1, and I get the message that there is no Framework-res.apk in the INPUT APK folder, yet it is in there.

This is as far as I have made it with the program.

I have tried to choose the option of just decompiling the framework-res.apk, but all that does is just sit on the decompiling window and does nothing.

The framework-res.apk has more than likely been modded previously as it is from an AOSP Ics rom that has been modded.

Don't know where I've gone wrong, but I'd really like to be able to use this program.

Any and all suggestions would be greatly welcomed.
[Samsung Epic 4G Touch] 12MaNy:
Did you set java path system variables? I'm on Windows 7 64bit as well and thats what I had to do
[Samsung Epic 4G Touch] agat63:
If you can't make framework-res.apk to install using option 1 in menu try option 81 "install additional framework" menu. You would drug'n'drop framework into cmd window as if you want to decompile it.

But if the problem is in java path tool won't work correctly since it won't be able to find java/bin folders.
[Samsung Epic 4G Touch] PacerguyDon:
Thanks for the replies.

I'm pretty sure it's something being weird with Java. I haven't done anything since last fall as far as decompling and compiling goes, and was just using apk manager. It worked ok then, but it doesn't work now either.

I'll do a little digging around the java files and see if I can find anything. I may not have the variables set since I have updated the java files.
[Samsung Epic 4G Touch] agat63:
The easiest test/check would be to open cmd window and type java in command prompt.

If line returns "java is not recognized as internal or external command" you would know your environmental variables are not set correctly and java/bin folders are not in the PATH.

All you would have to do is add them to the PATH.
[Samsung Epic 4G Touch] PacerguyDon:
That was it... Java can sure be a pain in the butt :o

Thank you for the help. Much appreciated, and thank you for the app.
[Samsung Epic 4G Touch] agat63:
One time only. Once properly installed you won't have any problems with java ever again.;)
[Samsung Epic 4G Touch] 12MaNy:
*Ahem*

Pretty sure I deserve a thanks on that one. Lol..:rolleyes:
[Samsung Epic 4G Touch] jrod091:
So I've been using this tool for a few ICS apks now. Successfully modded my mms, gmail, phone, and SystemUI apks. I tried it on my framework-res.apk and I got a problem with my plurals.xml, so I made necessary changes. Now however, my phone keeps FC everything, I can see my changes in the framework, but I keep getting FCs. Any ideas what is going on?

I'm running AOKP on a Samsung Galaxy SII.
[Samsung Epic 4G Touch] agat63:
What kind of edits did you make to framework?

Recompiled not always mean working.

If there are problems with framework many things might FC.
[Samsung Epic 4G Touch] jrod091:
changed colors.xml and drawables.xml in values, basically made my fonts blue and my backgrounds black

I read in another thread you talking about using a stock apk, so I will be trying that next, I'll report back