[Q] Problem in decompiling Systemui.apk - Sony Ericsson Xperia Neo, Pro

U can post any of ur systemui decompiling problems here....

Do you use apktool??
Best Regards
..:: [email protected]€m!c ::..

Pandemic said:
Do you use apktool??
Best Regards
..:: [email protected]€m!c ::..
Click to expand...
Click to collapse
yup i use apktool....the apktool is working fine for all my apks except the systemui and framework-res....
i have also posted the error
the errors are there even if i decompile and compile the apk without any changes..

salsreloded said:
yup i use apktool....the apktool is working fine for all my apks except the systemui and framework-res....
i have also posted the error
the errors are there even if i decompile and compile the apk without any changes..
Click to expand...
Click to collapse
Use ics apktool I see your log I had same prob few month back
Use yours to decompjle and ICS to compil bro
Sent from my Xperia Neo using xda premium

kormatoes said:
Use ics apktool I see your log I had same prob few month back
Use yours to decompjle and ICS to compil bro
Sent from my Xperia Neo using xda premium
Click to expand...
Click to collapse
Sorry for the late reply korm but had 2 exams today so was kinda busy....
but yes i tried ics apktool also apktool 1.5 also but it is still returning the same errors...
i decompiled using original one and uses various apktool to build it but no success

Hmm, I have tried to decompile systemUI from purenes build 13.
I am using apk manager and have placed framework-res and system ui in the correct folder.
I get this error log when decompiling framework res..
Code:
|28/09/2012 -- 19:16:50.15|
--------------------------------------------------------------------------
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
Could Not Find D:\PortableApps\PortableApps\Phone\APK Manager\apk_manager_4.9\pl
ace-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find D:\PortableApps\PortableApps\Phone\APK Manager\apk_manager_4.9\pl
ace-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01040342 string/web_user_agent_target_content, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Sou
rce)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Press any key to continue . . .
I have set java in my path, so thats not it, and i can extract apks no problem. But I have never managed to decompile a single apk ever....any help!!!
PS, sorry for adding to this thread more problems and no solutions, but the errors look similar to me...

gregbradley said:
Hmm, I have tried to decompile systemUI from purenes build 13.
I am using apk manager and have placed framework-res and system ui in the correct folder.
I get this error log when decompiling framework res..
Code:
|28/09/2012 -- 19:16:50.15|
--------------------------------------------------------------------------
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
Could Not Find D:\PortableApps\PortableApps\Phone\APK Manager\apk_manager_4.9\pl
ace-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find D:\PortableApps\PortableApps\Phone\APK Manager\apk_manager_4.9\pl
ace-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01040342 string/web_user_agent_target_content, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.data.ResConfig.addResource(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readType(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.readTable(Unknown Source)
at brut.androlib.res.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(Unknown Sou
rce)
at brut.androlib.res.AndrolibResources.loadMainPkg(Unknown Source)
at brut.androlib.res.AndrolibResources.getResTable(Unknown Source)
at brut.androlib.Androlib.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.getResTable(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Press any key to continue . . .
I have set java in my path, so thats not it, and i can extract apks no problem. But I have never managed to decompile a single apk ever....any help!!!
PS, sorry for adding to this thread more problems and no solutions, but the errors look similar to me...
Click to expand...
Click to collapse
no problem man...we shoud always not prefer to create separate threads for similar problems...

salsreloded said:
no problem man...we shoud always not prefer to create separate threads for similar problems...
Click to expand...
Click to collapse
Thanks, But i cannot even decompile....i have been researching this for months on and off but never found a solution...., It may be because my laptop is a works machine, but I cant take it to them because I am hacking admin rights to get things installed on here in the first place....
This is my error if i use apktool followin these instructions
Code:
C:\apktool>java -jar apktool.jar if framework-res.apk
Error: Unable to access jarfile apktool.jar
C:\apktool>if framework-res.apk
The syntax of the command is incorrect.
C:\apktool>apktool if framework-res.apk
Error: Unable to access jarfile C:\apktool\\apktool.jar
C:\apktool>

gregbradley said:
Thanks, But i cannot even decompile....i have been researching this for months on and off but never found a solution...., It may be because my laptop is a works machine, but I cant take it to them because I am hacking admin rights to get things installed on here in the first place....
This is my error if i use apktool followin these instructions
Code:
C:\apktool>java -jar apktool.jar if framework-res.apk
Error: Unable to access jarfile apktool.jar
C:\apktool>if framework-res.apk
The syntax of the command is incorrect.
C:\apktool>apktool if framework-res.apk
Error: Unable to access jarfile C:\apktool\\apktool.jar
C:\apktool>
Click to expand...
Click to collapse
can u tell me all the names of the file u have in the c:\apktool folder...

salsreloded said:
can u tell me all the names of the file u have in the c:\apktool folder...
Click to expand...
Click to collapse
aapt.exe
apktool.bat
apktool.jar.1.4.2
apktool.jar.1.4.3
framework-res.apk
systemUI.apk

rename ur file apktool.jar.1.4.3 to apktool.jar and remove the other apktool.jar file and then try....

geting closer
Code:
C:\apktool>java -jar apktool.jar if framework-res.apk
I: Framework installed to: \\hpserver2\home\staff\g.bradley\apktool\framework\1.
apk
C:\apktool>java -jar apktool.jar d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>java -jar apktool.jat if sysyemUI.apk
Error: Unable to access jarfile apktool.jat
C:\apktool>
My aim is to decompile the systemUI.apk in order to add the time back into the status bar,
I have read that you cannot decmpile sysyenui without first decompiling framework-res....why is it failaing now?
However, kudos, this is the first time decompile has ever worked for me, thanks +1 to you

First of all dont add the systemui.apk using the if statement...
i see u have added the framework-res.apk to the framework folder...
next just write this statement to decompile Systemui.apk
java -jar apktool.jar d SystemUI.apk

Further it was failing coz u wrote .jat instead of .jar

salsreloded said:
First of all dont add the systemui.apk using the if statement...
i see u have added the framework-res.apk to the framework folder...
next just write this statement to decompile Systemui.apk
java -jar apktool.jar d SystemUI.apk
Click to expand...
Click to collapse
Code:
:\apktool>java -jar apktool.jar d SystemUI.apk
: Baksmaling...
estI: Loading resource table...
: Loaded.
: Loading resource table from file: \\hpserver2\home\staff\g.bradley\apktool\fr
mework\1.apk
: Loaded.
: Decoding file-resources...
: Cant find 9patch chunk in file: "drawable-hdpi/status_bar_close_on.9.png". Re
aming it to *.png.
: Cant find 9patch chunk in file: "drawable-hdpi/status_bar_hr.9.png". Renaming
it to *.png.
: Decoding values*/* XMLs...
: Done.
: Copying assets and libs...
:\apktool>
many thanks.
I will now spend some time messing with these files....if i have any more trouble i will post it here.
THANKS!!
---------- Post added at 08:51 PM ---------- Previous post was at 08:51 PM ----------
salsreloded said:
Further it was failing coz u wrote .jat instead of .jar
Click to expand...
Click to collapse
Thats because i have had too much wine

i am glad i helped u...
yup if u face any more trouble u can post it here..

I use stock .587. I can decompile SystemUI.apk but getting error in Home.apk

Hmm, I have been having a play with this but cant get my head round it.
I am on oureness build 13 and am trying to get the time to show in the status bar. I have searched through the systemUI.apk but I dont know where to begin to edit systemUI.apk to get the time back.
I have tried to compare it to other systemUI.apk files that do show the time, but there is too much to go through.
If can anyone give me clue on how to edit the smali files to show the time I would be grateful
Greg

a1b2c99 said:
I use stock .587. I can decompile SystemUI.apk but getting error in Home.apk
Click to expand...
Click to collapse
No body knows solution to this. Or no want to show up in the forum. I never get answer.

a1b2c99 said:
No body knows solution to this. Or no want to show up in the forum. I never get answer.
Click to expand...
Click to collapse
have you loaded the appropriate framework-res.apk?
Sent from my MT15i using xda premium

Related

[Q] unable to decompile systemui.apk from ICS rom

Hi Guys..
I can see lots of threads about decompiling systemui.apk for GB devices and thats fine no problem..
however I am having difficulty in decompiling systemui.apk from ICS (MODDED STOCK/DEODEXED not AOSP)..
using apktool 1.4.3 and 1.4.2. still doesnt solve it
I install the framework-res.apk fine no problem... but as soon as i try and decompile systemui.apk i get the following...
Code:
C:\apktools>apktool d systemui.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Nutmeg\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
id, value=0x7f0e00ab
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quicksetting_divider_line.9
.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_plmn_bg.9.png". Renaming it
to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/status_bar_call_ongoing_backgr
ound.9.png". Renaming it to *.png.
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x7f0e00ab
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.decoder.ResFileDecoder.decode(ResFileDecoder.java:86)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
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)
similarly when i recompile i get
Code:
C:\apktools>apktool b systemui
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
I have also attempted to install twlauncher-res.apk along with framework-res.apk.. but still comes out with the same results..
What the hell am i doing wrong..
You aren't doing anything wrong. It's just that apktool can't properly decompile or compile ICS based apks yet.
Sent from my GT-I9100 using xda premium
aaah ok... so how are Devs modding the systemui.apk?
Hi, I have the same problem, I can not decompile the systemUi.apk nor any other except the framework apk-res.apk.
I do not understand how they did the other devs
i did find this on my travels round interweb...
here
And it does state that apktools should work..
Yes, with the framework-res.apk work perfectly but not with the other apk .
at least to me
same problem here
tried 1.4.2 and 1.4.3
1.4.2 isnt working for decompiling(For me)
i tried compiling with 1.4.2 this also doesnt work
i can only decompile with 1.4.3..
and cant compile it with 1.4.3
i tried it all
even the commands like java -jar didnt help me
hope someone can find a solution quick
---------- Post added at 12:28 PM ---------- Previous post was at 12:15 PM ----------
or.. does someone know if it is possible to decompile/compile one single xml ?
For modifying systemui I've just been changing .PNG files. No XML editing yet.
locomain said:
or.. does someone know if it is possible to decompile/compile one single xml ?
Click to expand...
Click to collapse
I would like to know this also.
Sent from my GT-I9100 using xda premium
has someone figured it out yet?
Yea this bugs me too. Can't make systemUI edits. The Log shows Java related stuff.
for what i've heard you can decompile it but when compiling it again, thats where the fun ends
Well this is the solution but doesnt work for me.
http://forum.xda-developers.com/showthread.php?t=1365810
Sent from my SPH-D710 using XDA App
ssconceptz said:
Well this is the solution but doesnt work for me.
http://forum.xda-developers.com/showthread.php?t=1365810
Sent from my SPH-D710 using XDA App
Click to expand...
Click to collapse
this works on aosp systemui not on the sammy one
locomain said:
this works on aosp systemui not on the sammy one
Click to expand...
Click to collapse
Did you try using the touchwiz framework instead? In earlier versions, Sysremui.apk had references to twframework-res.apk and needed that as dependeny for decompile.
tsachi said:
Did you try using the touchwiz framework instead? In earlier versions, Sysremui.apk had references to twframework-res.apk and needed that as dependeny for decompile.
Click to expand...
Click to collapse
did try this but doesnt work
it will decompile but cant compile
For to decompile systemUi.apk you must remove classes.dex from apk and decompile with apktool 1.4.2 and compile with 1.4.3.
But i don't know how decompile the files .jar

Hou do I recompile Semcgenericuxpres.apk

Hi..
I've been searching for this for a long time now, and i cant find a solution..
How do I recompile this apk??? Semcgenericuxpres.apk..
Its been so long searching that I can actually type the entire name now...
Decompiling is ok, but while recompiling, it says, aapt.exe has stopped working..
This happens for all ICS frameworks..
Please give me a solution to this.. I really wana mod the pngs!
plz guys, any..any ideas?
JJdoctor, sirkay, arcatarc? anybody? enlighten me plz..
Tan9890 said:
plz guys, any..any ideas?
JJdoctor, sirkay, arcatarc? anybody? enlighten me plz..
Click to expand...
Click to collapse
use xDAAutotool, Install framework first (framework-res.apk of the same version)... some apks wont recompile if framework is not installed... and for some u have to install another framework which should be Semcgenericuxpres.apk...
and next time provide a logcat of error if u r using
You don 't need to recompile it:simply modify. png and replace with winrar(i think it only contain graphic resources)
...hehehe:you want make a theme right?
Inviato dal mio ST18i
jjdoctor said:
use xDAAutotool, Install framework first (framework-res.apk of the same version)... some apks wont recompile if framework is not installed... and for some u have to install another framework which should be Semcgenericuxpres.apk...
and next time provide a logcat of error if u r using
Click to expand...
Click to collapse
...jj, how much millisecond before me you have answered??
Inviato dal mio ST18i
Haha, arcatarc you guesed it right.. I want to mod the pngs...
However, the zipped file dosent work directly.. must be a compression issue... as the images inside are much more compressed..
however, i've attached the error screenshot.
and here's the log..
apkt2 folder contains apktool 1.4.2
apkt3 folder contains apktool 1.4.3...
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Tanuj\apktool\framework\1.apk
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\Tanuj\apktool\framework\2.apk
C:\AndroDev\fwdere>java -jar apkt2\apktool.bat d -f SemcGenericUxpRes.apk SemcGe
nericUxpRes
Error: Invalid or corrupt jarfile apkt2\apktool.bat
C:\AndroDev\fwdere>java -jar apkt2\apktool.jar d -f SemcGenericUxpRes.apk SemcGe
nericUxpRes
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tanuj\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar d -f SemcGenericUxpRes SemcGeneri
cUxpRes.apk
Input file (SemcGenericUxpRes) was not found or was not readable.
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar b -f SemcGenericUxpRes SemcGeneri
cUxpRes.apk
I: Smaling...
I: Building resources...
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
PKTOOL8012574018097594409.tmp, -x, -I, C:\Users\Tanuj\apktool\framework\1.apk, -
S, C:\AndroDev\fwdere\SemcGenericUxpRes\res, -M, C:\AndroDev\fwdere\SemcGenericU
xpRes\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a: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:\U
sers\Tanuj\AppData\Local\Temp\APKTOOL8012574018097594409.tmp, -x, -I, C:\Users\T
anuj\apktool\framework\1.apk, -S, C:\AndroDev\fwdere\SemcGenericUxpRes\res, -M,
C:\AndroDev\fwdere\SemcGenericUxpRes\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
JJ, when u recompile this apk, which version of apktool do u use? 1.4.3 and 1.4.2 both cause the aapt.exe to crash...
Ok, now understand what is your problem:when you add file in the apk with winrar use no compression, or better recreate the apk as zip archive without compression, i use this metod, then is better if you zipalign it.
Inviato dal mio ST18i
oh!! i've made this zip now.. I'll put it in my phone and report back..
Earlier what happened was, the original png was 1.44kB.. after modification it became around 25kB... so when i put in the apk, it didnt work... I noticed that now however, that apktool dosent actually compress images..as i used to think earlier..
ok.. the pngs are working.. however there are problems..
settings crashes... and the pngs lose their .9 data... they appear stretched and the black lines determining the 9 patch data also appears there..
Any way to retain the 9 patch info?
if you wanna edit .9.png you need to extract it, decompile it using 9patch first. then you can edit it and recompile back.
information about .9patch http://code.google.com/p/android-apktool/wiki/9PatchImages
SemcGenericUxpRes.apk recompile
Can someone please help me out on this issue? Please go to the below link for my question.
http://forum.xda-developers.com/showthread.php?p=30690702#post30690702
After asking the question to Q&A forum i saw this thread, so thought of linking.
-Muthu
Help plz!
Here is the problem....
Does any one know the trick for recompiling SemcGenericUxpRes.apk [4.1.B.0.587]?
I used apktool to decompile this apk and edited styles.xml and dimen.xml to sync some of the styles to framework-res.apk.
but when tried recompiling it failed saying "aapt" stoped working. i thought it could be due to corrupted *9*.png files.
but it doesnt seems to be as i included those *9*.png files part of another apk and just re-compiled, it worked.
then i deleted public.xml file from values folder and attempted an recompile, it worked.
but the signed apk from apktool didnt work, when it was loaded back. i do not know what do to after this.
if someone has an answer please help me out.
-Muthu
I've worked out a workaround for this..Its kinda funny..
If u wana edit any xml file, just edit it and put in in another apk. Any apk file that succesfully decompiles and recompiles..
There's a problem with semcgenericuxpres.apk, and it does not recompile with this aapt.exe..
so, u just add your modded xml from semcgenericuxpres to any other recompilable apk..
Recompile that other apk
and now open that apk with winrar
extract your compiled xml from that apk
Add it to the original semcgenericuxpres.
It works..
@Tan9890, Thanks for replying...as the view count growing up without replies . Do you any option for editing styles.xml?

[Q] Unable to decompile framework-res.apk

I am unable to decompile my CM7's framework-res.apk, I tried both APK Manager and apktool but same error is shown, following is the log:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\apktool>apktool d framework-res.apk
Destination directory (C:\apktool\framework-res) already exists. Use -f switch i
f you want to overwrite it.
C:\apktool>apktool d framework-res.apk -f
I: Loading resource table...
I: Loaded.
Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:53)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
00)
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)
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1200(Unknown Source)
at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
at java.util.zip.ZipFile$1.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.DataInputStream.readFully(Unknown Source)
at com.mindprod.ledatastream.LEDataInputStream.readInt(LEDataInputStream
.java:216)
at brut.util.DataInputDelegate.readInt(DataInputDelegate.java:61)
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:46)
at brut.androlib.res.decoder.AXmlResourceParser.doNext(AXmlResourceParse
r.java:799)
at brut.androlib.res.decoder.AXmlResourceParser.next(AXmlResourceParser.
java:98)
at brut.androlib.res.decoder.AXmlResourceParser.nextToken(AXmlResourcePa
rser.java:107)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.nextToken(XmlPul
lParserDelegate.java:105)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:45)
... 7 more
C:\apktool>
Click to expand...
Click to collapse
Guy, use 7zip manager, extract the package, apply the changes, copy all the contents of framework changed in the original framework-res.apk (through 7zip) It's an idea.
Changes in bools.xml requires decompiling I guess.
Bump
Sent from my LG-P500 using xda premium

Problem recompiling ICS DefaultThemes

I already used all types of apktools and never solved this problem...
Yes, I already installed framework-res.apk and SemcGenericUxpRes.apk
I followed this thread and all runned fine:
http://forum.xda-developers.com/showthread.php?t=2204009
But the problem was when i tried to recompile and appear this:
Recompiling "DefaultThemes.apk" With New Signature,
using "apktool_2.0.0b9.jar"
With Tickle My Android v9.0.
(tinyurl.com\ticklemyandroid)
----------------
I: Using Apktool 2.0.0-Beta9 on DefaultThemes.apk
I: Smaling...
..\_working\DefaultThemes.apk\smali\com\new\defaultruntimethemes\BlackThemeService.smali[2
1,4] Error for input '.parameter': Invalid directive
..\_working\DefaultThemes.apk\smali\com\new\defaultruntimethemes\BlackThemeService.smali[2
1,15] mismatched input '"intent"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/new/
defaultruntimethemes/BlackThemeService.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:338)
at brut.androlib.Androlib.buildSources(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
----------------
Recompile Not Successful!
Click to expand...
Click to collapse
I'm using Windows XP SP3
Anyone can help with my problem???
Here is my decompiled folder:

Problems decompiling/compiling settings.apk in KitKat mediatek mt6592

Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
johnnybra said:
Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
Click to expand...
Click to collapse
Well see that's the issue. As they seldom use official software. You will have to make sure to only use the framework from you device. Make sure to install them all. Also make sure the rom is deodex or you won't be able to decompile anything.
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
johnnybra said:
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
Click to expand...
Click to collapse
Explain exactly how you did it?
marsapa said:
Explain exactly how you did it?
Click to expand...
Click to collapse
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
johnnybra said:
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
Click to expand...
Click to collapse
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
I'm sorry, I'm with Tapatalk. This afternoon I'll post some screenshots of what I'm saying, OK?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
ok i have solve, thaks
marsapa said:
ok i have solve, thaks
Click to expand...
Click to collapse
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
marsapa said:
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
Click to expand...
Click to collapse
Are you trying to decompiling for meizu mx4??? I'll tried it too, but I couldn't find the way to install framework as dependence. Same error as yours.
That's because they use files that differ from stock Android that apk tool is not set to use and the apktool dev already stated he will not add support for it.

Categories

Resources