Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Recompile error of Brut.alll

OP Tan9890

16th March 2012, 07:11 PM   |  #1  
OP Senior Member
Flag Pune
Thanks Meter: 36
 
157 posts
Join Date:Joined: Feb 2012
Im using cyanogen 7.2 on my ray..
I'm tying to decompile the apk make the changes and recompile it again...

However the phone.apk dosent recompile.. It gives all those brut.alll errors..

Here's the log:

c:\apkt>java -jar apktool.jar b -f c:\apkt\phon c:\apkt\Phonez.apk
I: Smaling...
I: Building resources...
c:\apkt\phon\res\values-da\strings.xml:200: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-da\strings.xml:201: error: Unexpected end tag string
c:\apkt\phon\res\values-es\strings.xml:203: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-es\strings.xml:204: error: Unexpected end tag string
c:\apkt\phon\res\values-fi\strings.xml:200: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-fi\strings.xml:201: error: Unexpected end tag string
c:\apkt\phon\res\values-it\strings.xml:203: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-it\strings.xml:204: error: Unexpected end tag string
c:\apkt\phon\res\values-lv\strings.xml:205: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-lv\strings.xml:206: error: Unexpected end tag string
c:\apkt\phon\res\values-nb\strings.xml:200: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-nb\strings.xml:201: error: Unexpected end tag string
c:\apkt\phon\res\values-ru\strings.xml:208: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-ru\strings.xml:209: error: Unexpected end tag string
c:\apkt\phon\res\values-sv\strings.xml:203: error: Multiple substitutions specif
ied in non-positional format; did you mean to add the formatted="false" attribut
e?
c:\apkt\phon\res\values-sv\strings.xml:204: error: Unexpected end tag string
c:\apkt\phon\res\values-zh-rTW\strings.xml:205: error: Multiple substitutions sp
ecified in non-positional format; did you mean to add the formatted="false" attr
ibute?
c:\apkt\phon\res\values-zh-rTW\strings.xml:205: error: Unexpected end tag string

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Tanuj\AppData\Local\Temp\A
PKTOOL4820468380985856256.tmp, -I, C:\Users\Tanuj\apktool\framework\1.apk, -S, c
:\apkt\phon\res, -M, c:\apkt\phon\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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:\U
sers\Tanuj\AppData\Local\Temp\APKTOOL4820468380985 856256.tmp, -I, C:\Users\Tanuj
\apktool\framework\1.apk, -S, c:\apkt\phon\res, -M, c:\apkt\phon\AndroidManifest
.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:191)
... 6 more




I searched all places.. They say, use the latest aapt.exe...
I am using the latest one and apktool 1.4.3..

Still cant recompile...

Pleasssssse help... I'm working on this since two days now...
16th March 2012, 07:16 PM   |  #2  
hansip87's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 1,899
 
2,579 posts
Join Date:Joined: Jan 2011
Donate to Me
More
If there are double % in one sentence inside any xml (e.g. %d to %d) you must add % to that (%d to %%d)

Sent from my ST18i using XDA
16th March 2012, 07:30 PM   |  #3  
OP Senior Member
Flag Pune
Thanks Meter: 36
 
157 posts
Join Date:Joined: Feb 2012
Do you mean only the %d to %d type or any kind of sentences where % is used twice..

Eg:

string name="throttle_status_subtext">"%1$s (%2$d٪) of %3$s period maximum

how should this be changed?
17th March 2012, 03:31 AM   |  #4  
hansip87's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 1,899
 
2,579 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Actually i'm still confused about that, but AFAIK, the original is like (%s (%d) of %s period maximum) so you should try to use
%s (%%d) of %%s

Let me know if it worked.
17th March 2012, 04:56 PM   |  #5  
Recognized Developer
Flag Rawalpindi
Thanks Meter: 4,170
 
2,699 posts
Join Date:Joined: May 2011
More
hansip, you should write a Guide for Decompiling apks from Sony Rom and recompiling.. No need to mention Mods.. coz even I cant compile it either.. Let us know how u did those apk edits...


I am planning tomake Sony defualt dialer look just like ICS dialer but limited by decompling error...
17th March 2012, 06:09 PM   |  #6  
hansip87's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 1,899
 
2,579 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by jjdoctor

hansip, you should write a Guide for Decompiling apks from Sony Rom and recompiling.. No need to mention Mods.. coz even I cant compile it either.. Let us know how u did those apk edits...


I am planning tomake Sony defualt dialer look just like ICS dialer but limited by decompling error...

What's your problem jj? I have no problem so far when i follow this
http://forum.xda-developers.com/show....php?t=1511730

Only when i tried to recompile framework-res that i got error. but the above method fixes that.
Last edited by hansip87; 17th March 2012 at 07:03 PM.
17th March 2012, 06:46 PM   |  #7  
Recognized Developer
Flag Rawalpindi
Thanks Meter: 4,170
 
2,699 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by hansip87

What's your problem jj? I have no problem so far when i follow this
http://forum.xda-developers.com/showthread.php?t=151173

Only when i tried to recompile framework-res that i got error. but the above method fixes that.

Link is wrong....
17th March 2012, 07:04 PM   |  #8  
hansip87's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 1,899
 
2,579 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by jjdoctor

Link is wrong....

oops sorry, minus 0 http://forum.xda-developers.com/show....php?t=1511730
17th March 2012, 11:31 PM   |  #9  
OP Senior Member
Flag Pune
Thanks Meter: 36
 
157 posts
Join Date:Joined: Feb 2012
Auto apk does not work either
Thanks hansip87 and jjdoctor, but this auto apktool isnt working either..

Still the same errors..

I know i'm doing something wrong.. and its just a tiny bit...
Can you post a guide or link to the tools that are to be used...

Is there a problem with windows 7?

Run as administrator? anything?
17th March 2012, 11:39 PM   |  #10  
OP Senior Member
Flag Pune
Thanks Meter: 36
 
157 posts
Join Date:Joined: Feb 2012
Here, I'm posting the phone.apk that i'm trying to recompile again..

Its a cyanogenmod 7.2 apk...

Please try to decompile n recompile it again... Tell me if it works..

It dosent recommpile even if i make no changes at all..

If it works for you please tell me the steps...

Thanks a lot again..
Attached Files
File Type: apk Phone.apk - [Click for QR Code] (1.29 MB, 0 views)

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes