# apktool help



## Syndicate0017 (Jan 21, 2012)

I'm sorry if this isn't an appropriate place for it. I've been trying to get apktool set up on my new desktop since my laptop is out of commission at the moment. I can decompile and recompile an unchanged apk just fine. My problem is when editing an XML. Anytime I make an XML edit in any apk, whether mms, systemUI, framework-res, I get this when recompiling:

Checking whether resources has changed...
I: Building resources...
(skipping file 'bools.xml~' due to ANDROID_AAPT_IGNORE pattern '*~')
I: Building apk file...

The apk builds, but obviously won't load up properly since an XML is skipped. I tried searching for this error and I can't find anything on it. I have the latest apktool and I'm pretty sure I have the latest aapt (got it from my sdk). I'm running Lubuntu 12.04 if that matters at all. Any help would be great.


----------



## mbh87 (Jun 14, 2011)

the apktool from here? http://forum.xda-developers.com/showthread.php?t=1755243


----------



## Syndicate0017 (Jan 21, 2012)

Yes 1.4.10 is my version.


----------



## mbh87 (Jun 14, 2011)

did you use the patched aapt as instructed?


----------



## Kevin3328 (Aug 22, 2011)

U need the updated aapt file from what I can gather from such a small error report

Also if u r using apk manager/multi tool did u set up your frameworks dependencies by dropping the frameworkres.apk of the ROM u r working on in the other folder and typing from a command prompt

apktool.jar if framework-res.apk

Sent from my Galaxy Nexus using RootzWiki


----------



## Syndicate0017 (Jan 21, 2012)

mbh87 said:


> U need the updated aapt file from what I can gather from such a small error report
> 
> Also if u r using apk manager/multi tool did u set up your frameworks dependencies by dropping the frameworkres.apk of the ROM u r working on in the other folder and typing from a command prompt
> 
> ...


Yes I have installed the framework-res dependency for my ROM.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## mbh87 (Jun 14, 2011)

I've never had any issues with the provided apktool or aapt. I've decompiled/compiled CM, AOKP and MIUI with no issues.


----------



## Kevin3328 (Aug 22, 2011)

Well obviously there is some issue... r u using apk multi tool

Disregard my posts dude... I just reread your op and noticed u r running Linux.. I cannot troubleshoot nor should I have as I do not use my Linux set up for theming as of yet

Sent from my Galaxy Nexus using RootzWiki


----------



## Syndicate0017 (Jan 21, 2012)

W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
(skipping file 'bools.xml~' due to ANDROID_AAPT_IGNORE pattern '*~')
I: Building apk file...

Same issue with patched aapt. Along with Could not find sources even after performing

apktool if framework-res.apk


----------



## Syndicate0017 (Jan 21, 2012)

Just a little bump

Sent from my Galaxy Nexus using Tapatalk 2


----------



## MR H3LLMAN (Oct 20, 2011)

I'm investigating this right now. I was messing around with it the other day on my laptop running Ubuntu 12.04 and now can't compile any of my source correctly due to aapt errors. As soon as I can wrap my head around what's happening I'll let you know!

Sent from my Galaxy Nexus using RootzWiki


----------



## thatguy188 (Sep 28, 2011)

Im having the EXACT same issue. Everytime I make ANY change to ANY .xml and try to compile it, it skips that file due to that error. I've even went as small of a change as to simply changing


```
<string name="theme_name">ORIGINAL</string>
```
to


```
<string name="theme_name">ORIGINAL2</string>
```
Always get this error though. I've reached out to iBotPeaches on Twitter and here is what he said



> [background=rgb(250, 250, 250)]that's not an error at all. It's preventing an error and actually helping[/background]





> its a temporary file by your OS, assuming Ubuntu


Im just really confused, lol. Running apktool from the thread above on Ubuntu 12.04 64 bit


----------



## thatguy188 (Sep 28, 2011)

Ok I've just done a little test. Im really new to themeing so not really sure yet what to change to change something specific. Anyways, I recompiled after making changes to color.xml .... since idk wtf Im doing quiet yet I just changed every single color in there to red.

Recompiled it, with of course that aapt error on colors.xml .... I simply compiled it again right away.


```
<br />
I: Checking whether sources has changed...<br />
I: Checking whether resources has changed...<br />
I: Building resources...<br />
	(skipping file 'colors.xml~' due to ANDROID_AAPT_IGNORE pattern '*~')<br />
I: Building apk file...<br />
<br />
[email protected]:~/apktool$ apktool b thatguy<br />
I: Checking whether sources has changed...<br />
I: Checking whether resources has changed...<br />
I: Building apk file...<br />
[email protected]:~/apktool$
```
Signed it, sent it to the sdcard, installed, and applied...... my power menu changed color and so did the clock. So Im gonna assume it DOES work if you just compile it twice?


----------



## Syndicate0017 (Jan 21, 2012)

Interesting...I had only tried compiling it once and the apk wouldn't work...I'll give it a shot compiling twice. Thanks for the heads up.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## Syndicate0017 (Jan 21, 2012)

thatguy188 said:


> Signed it, sent it to the sdcard, installed, and applied...... my power menu changed color and so did the clock. So Im gonna assume it DOES work if you just compile it twice?


Tried it on my SystemUI.apk and I never got a SystemUI not responding message, but my softkeys or status bar never returned. Had to adb shell my SystemUI back to a usable state.







All I did was change a few hex codes in colors.xml. I was able to decompile and recompile with no issues on my laptop before. Don't understand the problem.


----------



## MR H3LLMAN (Oct 20, 2011)

Syndicate0017 said:


> Tried it on my SystemUI.apk and I never got a SystemUI not responding message, but my softkeys or status bar never returned. Had to adb shell my SystemUI back to a usable state.
> 
> 
> 
> ...


Things have changed with Jellybean. AFAIK, apktool is still built for ICS. I have, however, seen a modified aapt file that should help this but when I tried to replace the one in my file system in Ubuntu it broke everything. To be honest, I didn't really feel like even dealing with it so I just ditched Ubuntu and installed mint. If you are using Windows and apktool it may be worth looking at getting Linux set up and building from source. Really not as hard as it seems.

Sent from my Galaxy Nexus using RootzWiki


----------



## Syndicate0017 (Jan 21, 2012)

MR H3LLMAN said:


> Things have changed with Jellybean. AFAIK, apktool is still built for ICS. I have, however, seen a modified aapt file that should help this but when I tried to replace the one in my file system in Ubuntu it broke everything. To be honest, I didn't really feel like even dealing with it so I just ditched Ubuntu and installed mint. If you are using Windows and apktool it may be worth looking at getting Linux set up and building from source. Really not as hard as it seems.
> 
> Sent from my Galaxy Nexus using RootzWiki


I'm on Linux (Lubuntu 12.04). Much better than Windows and the crappy driver installs for everything. Is this fixed in Mint? I might give it a try if it is?

Sent from my Galaxy Nexus using Tapatalk 2


----------



## MR H3LLMAN (Oct 20, 2011)

Syndicate0017 said:


> I'm on Linux. Much better than Windows and the crappy driver installs for everything. Is this fixed in Mint? I might give it a try if it is?
> 
> Sent from my Galaxy Nexus using Tapatalk 2


its not so much a distro thing as it is apktool being "outdated" or requiring workarounds. I just compile from source instead of reverse engineering.

Sent from my Galaxy Nexus using RootzWiki


----------



## Syndicate0017 (Jan 21, 2012)

MR H3LLMAN said:


> its not so much a distro thing as it is apktool being "outdated" or requiring workarounds. I just compile from source instead of reverse engineering.
> 
> Sent from my Galaxy Nexus using RootzWiki


Oh I see. I didn't figure a new distro would fix it, but I'm willing to try anything to get this going...







I'll probably submit a bug report to Google and see if they actually get back to me.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## Syndicate0017 (Jan 21, 2012)

And got the laptop going again and with the *exact *same setup no aapt ignore pattern. I can decompile, edit an XML, and recompile and it works. Well...at least it's working on one of my computers.


----------



## brkshr (Jun 16, 2011)

Try the package in this link. Comes with everything you need & worked perfectly for Windows/Jelly Bean out the gate.

http://forum.xda-developers.com/showthread.php?t=1844878


----------



## Syndicate0017 (Jan 21, 2012)

brkshr said:


> Try the package in this link. Comes with everything you need & worked perfectly for Windows/Jelly Bean out the gate.
> 
> http://forum.xda-developers.com/showthread.php?t=1844878


Thanks but that looks like a windows package. I'm on Linux. I wonder if its the java I have installed on my desktop...that's the only possible difference between it and my laptop's setup.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## brkshr (Jun 16, 2011)

Syndicate0017 said:


> Thanks but that looks like a windows package. I'm on Linux. I wonder if its the java I have installed on my desktop...that's the only possible difference between it and my laptop's setup.
> 
> Sent from my Galaxy Nexus using Tapatalk 2


Sorry, I'm not too familiar with Linux. Thought it might work.


----------

