Trying to decompile the HtcClockWidget so that I can do some XML edits and this is what I get. Anyone know what the issue is?
Code:
D:\android-sdk-windows\tools\apktoolold>apktool d HtcClockWidget.apk ./outclockb
lue
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jeffrey\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Jeffrey\apktool\framework\2.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x0208013b
I: Decoding values*/* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x020c00ba
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(ResReferen
ceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResSc
alarValue.java:50)
at brut.androlib.res.data.value.ResScalarValue.serializeXmlBody(ResScala
rValue.java:81)
at brut.androlib.res.data.value.ResScalarValue.serializeToResValuesXml(R
esScalarValue.java:67)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour
ces.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Before you get the idea please consider to thank Препод, poppuri and sk0t (from 4pda.ru) for their time and hard work, all credits go to them.
Here we go, the idea is simple , decompile "lidroid-res.apk", open "apktool.yml", you will find this :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
If you keep the "- 1" it will uses only one framework, you have to add "2", like this :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
- 2
Done, make your changes and re-compile, use my Apk_Manager if you have any trouble with ICS files.
Thanks again to Препод & poppuri & sk0t, don't forget to credit them.
as 2.apk - do I need to install twframework-res.apk or lidroid-res.apk?
firefds said:
as 2.apk - do I need to install twframework-res.apk or lidroid-res.apk?
Click to expand...
Click to collapse
i think you will need twframework-res.apk.
So, now we can translate to own languages the lidroid toggles, right?
Krendelrus said:
So, now we can translate to own languages the lidroid toggles, right?
Click to expand...
Click to collapse
Yes, it should work.
Very useful, thanks.
Lovely bit of info, cheers Wanam - works perfect
I can't thank you enough for this sir!
yoderk said:
I can't thank you enough for this sir!
Click to expand...
Click to collapse
You are welcome.
sorry for beeing noob, but after editing apktool.yml and compiling (11) i get an error "An error occured, please check the log..."
Schneckmeier said:
sorry for beeing noob, but after editing apktool.yml and compiling (11) i get an error "An error occured, please check the log..."
Click to expand...
Click to collapse
Get me the log.
I used your Apk_Manager_ICS:
Code:
|11.04.2012 -- 18:31:21,04|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
I: Framework installed to: C:\Users\Schneckmeier\apktool\framework\2.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Schneckmeier\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:399)
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)
Schneckmeier said:
I used your Apk_Manager_ICS:
Code:
|11.04.2012 -- 18:31:21,04|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
I: Framework installed to: C:\Users\Schneckmeier\apktool\framework\2.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Schneckmeier\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:399)
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)
Click to expand...
Click to collapse
Maybe because you used the second solution, i removed it from the first page.
Use this one instead :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
- 2
re-installed newer java runtime environment 1.7.0_03 and used your second method now it works! Thanks wanam for help!!
Schneckmeier said:
re-installed newer java runtime environment 1.7.0_03 and used your second method now it works! Thanks wanam for help!!
Click to expand...
Click to collapse
It should work with jre 1.5 too.
is there anyway to change the "hamster" text in the values folder as everytime i recompile, i get a systemui error? im assuming i need to edit the text in strings.xml but still not working. any ideas? thx
dead0 said:
is there anyway to change the "hamster" text in the values folder as everytime i recompile, i get a systemui error? im assuming i need to edit the text in strings.xml but still not working. any ideas? thx
Click to expand...
Click to collapse
Any logs?
wanam said:
Any logs?
Click to expand...
Click to collapse
there were no errors in the log after compiling but i didn't edit the apktool.yml. everytime i edit *.yml i get compile error as posted above
tried again by just editing the apktool.yml as per your suggestion but get a compile error:
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find C:\Users\Administrator\Desktop\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/signedlidroid-res.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.err.CantFindFrameworkResException
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:366)
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:400)
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)
Hi Wanam, how do you mod it so it doesn't say 'wanam lite' on the shut down dialog?
dead0 said:
there were no errors in the log after compiling but i didn't edit the apktool.yml. everytime i edit *.yml i get compile error as posted above
tried again by just editing the apktool.yml as per your suggestion but get a compile error:
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find C:\Users\Administrator\Desktop\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/signedlidroid-res.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.err.CantFindFrameworkResException
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:366)
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:400)
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)
Click to expand...
Click to collapse
Push framework-res.apk (apktool if framework-res.apk).
kowcop said:
Hi Wanam, how do you mod it so it doesn't say 'wanam lite' on the shut down dialog?
Click to expand...
Click to collapse
Edit /res/values/strings.xml.
Guys please help me with apktool! ım freakin out!
before everything, I setted up JDK & JRE, Android SDK Manager too..
ı tried lots of Apktool but having same mistake!
C:\apktool folder i created and put the files in it with my framework-res.apk
Then commanded
apktool if framework-res.apk
I: Framework installed to C:\whatever\your\path\is\framework\1.apk
All is ok. but when I try to DECOMPILE Settings.apk or SystemUI.apk or Browser.apk etc anyway here is the log;
Microsoft Windows XP [Sürüm 5.1.2600]
(C) Telif Hakkı 1985-2001 Microsoft Corp.
C:\Documents and Settings\Hyp>cd c:\apktool
C:\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Documents and Settings\Hyp\apktool\framework\1.apk
C:\apktool>apktool d Browser.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Documents and Settings\Hyp\apktool\frame
work\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.
C:\apktool>
I'm on 2.3.4 not ICS! How to fix this damn package of id 2 ?
here you have a video tutorial
Hello my friends.
I installed frameworkres and tw framework resources files. I decompiled SystemUI.apk and changed drawables.xml and status bar smali.
But I can't compile SystemUI.apk Error.
Log is here :
Code:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk Bulunamad
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk Bulunamad
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\HP\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.java:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(CommonTreeNodeStream.java:106)
at org.antlr.runtime.tree.TreeP****r.getSourceName(TreeP****r.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliTreeWalker.java:372)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
at org.jf.smali.smaliTreeWalker.smali_file(smaliTreeWalker.java:451)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:85)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)
at brut.androlib.Androlib.buildSources(Androlib.java:200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
I don't know what that error means but your apk manager is having problems with the smali
Try just doing the drawables with apk manager and see if that works...if it does work try the smali with this
Thank you but I have a problem. I don't know how can I use this tool.
Guide is here : http://forum.xda-developers.com/showthread.php?t=1136625
but links are broken.
You could try that what jarmezrocks has posted on that thread or post on it for some help.
I may still have the video/s from that tut and i can check tonight when I'm back at my pc but if you google 'smali baksmali tutorial' you should be able to find all the Info you need...and more...it's all out there
Sent from my GT-I9100 using xda premium
Arnadel said:
Hello my friends.
I installed frameworkres and tw framework resources files. I decompiled SystemUI.apk and changed drawables.xml and status bar smali.
But I can't compile SystemUI.apk Error.
Log is here :
Code:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk Bulunamad
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk Bulunamad
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\HP\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.java:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(CommonTreeNodeStream.java:106)
at org.antlr.runtime.tree.TreeP****r.getSourceName(TreeP****r.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliTreeWalker.java:372)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
at org.jf.smali.smaliTreeWalker.smali_file(smaliTreeWalker.java:451)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:85)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)
at brut.androlib.Androlib.buildSources(Androlib.java:200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Click to expand...
Click to collapse
hello Sir.. there must be something to do with the codings in the statusbar .smali file.. try to inspect the codes again. it could be wrong codes that u have inserted. I ever came across these errors before when I tried to change some codes .smali file.. I managed to recompile when I reverted the original codes back..
Hello friends! did not get to decompile framework com.lge.sui.widget.apk
someone turned decompile?
Log
Code:
Processing...
I: Using Apktool 2.0.3-b0eb58-SNAPSHOT on com.lge.sui.widget.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\evgenijya\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.
value.ResBoolValue cannot be cast to brut.androlib.res.data.value.ResAttr
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(Re
sStyleValue.java:65)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour
ces.java:502)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:252
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:136)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
!!!Aborted!!!
All done!