Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,463 Members 39,311 Now Online
XDA Developers Android and Mobile Development Forum

Recompile error of Brut.alll

Tip us?
 
Tan9890
Old
#1  
Senior Member - OP
Thanks Meter 36
Posts: 153
Join Date: Feb 2012
Location: Pune
Default Recompile error of Brut.alll

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...
 
hansip87
Old
#2  
hansip87's Avatar
Senior Member
Thanks Meter 1,742
Posts: 2,485
Join Date: Jan 2011
Location: Jakarta

 
DONATE TO ME
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
Love to Mod, Love to Experiment,
Sony Fanatic



My App Project:
Fast App Switcher Small App
System Monitor Small App


Phone History:
Nokia 6233 - Sony Ericsson K700i - SE Xperia X10 Mini Pro - SE Xperia Ray - Motorola RAZR Maxx - Xperia Z Ultra



 
Tan9890
Old
#3  
Senior Member - OP
Thanks Meter 36
Posts: 153
Join Date: Feb 2012
Location: Pune
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?
 
hansip87
Old
#4  
hansip87's Avatar
Senior Member
Thanks Meter 1,742
Posts: 2,485
Join Date: Jan 2011
Location: Jakarta

 
DONATE TO ME
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.
Love to Mod, Love to Experiment,
Sony Fanatic



My App Project:
Fast App Switcher Small App
System Monitor Small App


Phone History:
Nokia 6233 - Sony Ericsson K700i - SE Xperia X10 Mini Pro - SE Xperia Ray - Motorola RAZR Maxx - Xperia Z Ultra



 
jjdoctor
Old
#5  
Recognized Developer
Thanks Meter 4,153
Posts: 2,693
Join Date: May 2011
Location: Rawalpindi

 
DONATE TO ME
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...



PLEASE DO NOT MESSAGE (PM) ME 4 QUESTIONS OR REQUESTS. POST IN RELEVANT THREAD & I WILLB GLAD 2 REPLY THERE
 
hansip87
Old
(Last edited by hansip87; 17th March 2012 at 06:03 PM.)
#6  
hansip87's Avatar
Senior Member
Thanks Meter 1,742
Posts: 2,485
Join Date: Jan 2011
Location: Jakarta

 
DONATE TO ME
Quote:
Originally Posted by jjdoctor View Post
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.
Love to Mod, Love to Experiment,
Sony Fanatic



My App Project:
Fast App Switcher Small App
System Monitor Small App


Phone History:
Nokia 6233 - Sony Ericsson K700i - SE Xperia X10 Mini Pro - SE Xperia Ray - Motorola RAZR Maxx - Xperia Z Ultra



 
jjdoctor
Old
#7  
Recognized Developer
Thanks Meter 4,153
Posts: 2,693
Join Date: May 2011
Location: Rawalpindi

 
DONATE TO ME
Quote:
Originally Posted by hansip87 View Post
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....



PLEASE DO NOT MESSAGE (PM) ME 4 QUESTIONS OR REQUESTS. POST IN RELEVANT THREAD & I WILLB GLAD 2 REPLY THERE
 
hansip87
Old
#8  
hansip87's Avatar
Senior Member
Thanks Meter 1,742
Posts: 2,485
Join Date: Jan 2011
Location: Jakarta

 
DONATE TO ME
Quote:
Originally Posted by jjdoctor View Post
Link is wrong....
oops sorry, minus 0 http://forum.xda-developers.com/show....php?t=1511730
Love to Mod, Love to Experiment,
Sony Fanatic



My App Project:
Fast App Switcher Small App
System Monitor Small App


Phone History:
Nokia 6233 - Sony Ericsson K700i - SE Xperia X10 Mini Pro - SE Xperia Ray - Motorola RAZR Maxx - Xperia Z Ultra



 
Tan9890
Old
#9  
Senior Member - OP
Thanks Meter 36
Posts: 153
Join Date: Feb 2012
Location: Pune
Default 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?
 
Tan9890
Old
#10  
Senior Member - OP
Thanks Meter 36
Posts: 153
Join Date: Feb 2012
Location: Pune
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)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes