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)
i'm struggling to recompile systemui from rcmix 4.0
1st of all, no edits have been made, so there is no issue in that direction.
the problem is i think in recompliling smali, which makes app fc.
i used apk manager 4.9 and apk multitool v 1.0.2. they both give an error about a file not found when compliling:
2012-02-29 02:15:58 (3,98 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
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)
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.
but seem to build apk fine (roughly the same size and structure)
then i tried using apktool 1.4.3, installed framework, decompliled and recompiled with no error at all, drag and dropped classes.dex from recompiled apk to original (because of signatures) and push to phone and it crashes.
C:\Users\Tomi\Desktop\apktool>apktool if C:\Users\Tomi\Desktop\apktool\framework-res.apk
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
C:\Users\Tomi\Desktop\apktool>apktool d SystemUI.apk sysui
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\Tomi\Desktop\apktool>apktool b sysui test3.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
C:\Users\Tomi\Desktop\apktool>
am i doing something wrong? where? any help much appreciated
i figured my problem lies somewhere in signatures of the app. it gets broken even if i drag/drop classes.dex from one original file to another, tried using 7zip and winrar. any suggestions?
since this is a monologue, lets finish it if someone ever bumps into it
i didnt resign it at first and i read several posts against signing system apks
http://forum.xda-developers.com/showthread.php?t=822388
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 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!