[Q] Failed to decompile framework-res.apk, please help - Galaxy S II Q&A, Help & Troubleshooting

I used apk manager to decompile the framework-res.apk of my GS2. Here is the log report from apk manager
===============
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
not found C:\android-sdk\platform-tools\place-apk-here-for-modding\../place-apk-here-for-modding/signedtwframework-res.apk
not found C:\android-sdk\platform-tools\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedtwframework-res.apk
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\wltklah\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=text, value=0x01040446
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01040446
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
======================================
I did put my framework-res.apk in the "place apk here for modding"
Can anyone debug for me? Big thanks!!

Related

[Q] How to decompile SystemUI.apk?

Hi there,
With the arrival of my new SGS II I was very interested in making some of those nifty themes myself. Ofcourse I have to know a lot more about Android before I can do anything nice, but we all have to start somewhere
I was looking around on the web and found references to APK Manager and the nice stuff one can do with it. I say one, because I haven't been able to do anything with it yet.
Sure, it pulls the requested apk's, but when I try to decompile say, SystemUI.apk, it gives me an error and nothing else.
The error I get is:
Code:
"An Error Occured, Please Check The Log (option 21)"
Press any key to continue . . .
Then, when I check the log it says:
Code:
--------------------------------------------------------------------------
|di 17-05-2011 -- 18:40:41,89|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
Could Not Find D:\Samsung\SII\APK Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find D:\Samsung\SII\APK Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\dateq\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a6
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Anyone know what to make of this?
Same error for me.
I do not know the cause!!!
You have to install framework resources pulled from a device. But I don't know how to do that using Apk Manager.
If you rename it to a .zip you can extract files from it. for example replacing the battery icons, Just remove the old battery icons and drop the new ones in, in like winrar or something
Sent from my GT-I9100 using XDA Premium App
In my case i use apktool and i have install the framework!!!
Thanks for the replies all, especially apktool, that was a real help.
However, I am now running into a new problem...
Whenever I pull SystemUI.apk, decode it with apk tool and then build it again without doing anything, I notice a reduction in size.
Some people on the net say it needs to be signed, some say that shouldnt be done at all with system apk's.
Anyone have a thought about that?
it needs to be signed!!!use signapk.jar
java -jar signapk.jar testkey.x509.pem testkey.pk8 SystemUI.apk SystemUISigned.apk
I'm running into the same problem myself (sorry for the bump - I just started getting into the modding).
I just get
"An Error Occured, Please Check The Log (option 21)"
Press any key to continue . . .
And in my log
Code:
--------------------------------------------------------------------------
|Tue 19/07/2011 -- 21:24:39.70|
--------------------------------------------------------------------------
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Could Not Find C:\Program Files (x86)\Android\android-sdk\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\Program Files (x86)\Android\android-sdk\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\parker\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a3
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Click to expand...
Click to collapse
Try option 10 and drag over framework-res.apk and SystemUI.apk into the window of apktool. Worked for me to decompile SystemUI.apk.
Hi
Dont know if you found this thread yet, its over 200 pages
lots of info
http://forum.xda-developers.com/showthread.php?t=695701

[Q] Errors when decompiling ICS framework

do i have something wrong ?
i had try to decompile from xdaAutoAPKTool_V2.0.3d
and found this error when decompiling
Code:
[*] "E:\family folder\rama\xperia series\AutoAPKTool2.0.3d\_INPUT_APK\framework-res.apk"
decompiling "E:\family folder\rama\xperia series\AutoAPKTool2.0.3d\_INPUT_APK\framework-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 Source)
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)
any idea ?
i just normal decompiling
Have you tried Tickle My Android?
mrahmanda said:
do i have something wrong ?
i had try to decompile from xdaAutoAPKTool_V2.0.3d
and found this error when decompiling
Code:
[*] "E:\family folder\rama\xperia series\AutoAPKTool2.0.3d\_INPUT_APK\framework-res.apk"
decompiling "E:\family folder\rama\xperia series\AutoAPKTool2.0.3d\_INPUT_APK\framework-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 Source)
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)
any idea ?
i just normal decompiling
Click to expand...
Click to collapse
Try using updated apktool and aapt from the apktool thread here http://forum.xda-developers.com/showthread.php?t=1755243

[Q] Cannot install android framework

I download APKTool and extract C:\APKTools.
When I run command "apktool.bat if framework-res.apk" (without quote).
Then I got this error.
Code:
C:\apktools>apktool.bat if framework-res.apk
W: Config flags size > 32. Exceeding bytes: 0000D002.
W: Invalid config flags detected: dimen-v13-ERR0
W: Config flags size > 32. Exceeding bytes: -3FFD0000.
W: Invalid config flags detected: dimen-v13-ERR1
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01050001 dimen/thumbnail_height, config=-v13
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.decoder.ARSCDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.installFramework(Unknown Source)
at brut.androlib.Androlib.installFramework(Unknown Source)
at brut.apktool.Main.cmdInstallFramework(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
C:\apktools>
but when I extract another apk, it is fine. (but it load other framework)
Code:
C:\apktools>apktool.bat d "CZFX v3.5.5 apkmania.com.apk"
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\vm-win7\apktool\framework\1.apk
I: Copying assets and libs...
Is there any problem?
Thanks
I think you should state the location of your framework e.g apktool.bat if E:\framework-res.apk.
Sent from my GT-I9300 using xda app-developers app
Arsaw said:
I think you should state the location of your framework e.g apktool.bat if E:\framework-res.apk.
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Yes, framework-res.apk is in the same directory.
I follow this instruction.
http://forum.xda-developers.com/showthread.php?t=1427959

HELP

I Can Not Decompile/Compile System APK
I Get This On Apk tool
Code:
C:\Users\Server\Desktop\APKtool>apktool d systemUI.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f0a000e dimen/status_bar_icon_drawing_size, config=-v13
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)
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Whats Wrong ???
I;m Using Windows 8 Pro
Look The Screenshot My PC
I Need Your Help
I'd be more bothered about running a 32bit OS on a 64bit machine, but hey ho. Give the second link in my sig a browse, it may or may not help.
Post questions, help in Q/A, Help section. Not in Theme section.

Apk Muti tool error :/

I am trying to edit an .apk I've edited xml files before, just small lines of code nothing impressive but when trying to decompile this .apk I am getting this error. Any help would be great and I will make sure to leave a thanks!!
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode, sharing)
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

Categories

Resources