desword / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
1 stars 0 forks source link

Cannot decompile SecContacts.apk (Contacts app in Lollipop for S5) #722

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Decompiling the SecContacts.apk attached.

What is the expected output? What do you see instead?
It should decompile all well, but what I get is below.

I: Using Apktool 2.0.0-RC3 on SecContacts.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Kapil\apktool\framework\1.apk
Cleaning up unclosed ZipFile for archive C:\Users\Kapil\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=taskAffinity, value=0x7f0f0038
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f042e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f01fd
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0439
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050001
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10008d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0271
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080014
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0393
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050001
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0462
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080000
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100033
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f001b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10002a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f001a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10002a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00f7
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100051
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10008d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f03f8
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f0200dd
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f03f9
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f0200dc
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080016
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f03fa
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f0200de
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080016
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f004b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100027
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f04d5
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050008
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050000
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100012
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0019
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100028
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100051
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f01b5
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0257
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10007e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f003a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10008c
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f1000a1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100033
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100029
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f03ee
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080014
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100069
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=authorities, value=0x7f0f01fa
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050003
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100062
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100051
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f037a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100051
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100056
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00df
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100010
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100010
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10005f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10004d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100068
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100051
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0257
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0257
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10004d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050001
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10004a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0462
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080018
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050005
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=enabled, value=0x7f080018
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0462
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=resource, value=0x7f050004
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f02cd
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10007e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100009
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100057
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00e1
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f042b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10000b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10001e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f007e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=taskAffinity, value=0x7f0f0086
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0081
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f039d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f100070
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f039a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10001e
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f039d
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=icon, value=0x7f02013f
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f00dd
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10002a
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f038b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=theme, value=0x7f10006b
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f0f0405
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x7f0f00e1
    at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
    at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
    at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
    at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
    at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:41)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    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$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
    at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)

What version of the product are you using? On what operating system?
I am using apktool_2.0.0rc3, on Windows 8.1.

Please provide any additional information below.
Frameworks (including twframework) install, decompile and recompile all well. 
Even Settings app (SecSettings.apk) is doing well, both decompile and 
recompile. But SecContacts won't decompile.
Please find the Framework and SecContacts files at this link: http://d-h.st/fa3 
(since attachement size is more than given 10MB).
I really hope it would require only minor tweaking to the code.

Original issue reported on code.google.com by 9.kesh...@gmail.com on 6 Dec 2014 at 7:29

GoogleCodeExporter commented 9 years ago
Confirmed.

The resources it is complaining about are in the source apk according to aapt.

ibotpeaches@raganok:~/Downloads/Apktool/Bug722$ aapt d resources 
SecContacts.apk | grep '0x7f0f00e1'
      spec resource 0x7f0f00e1 com.android.contacts:string/contactsList: flags=0x00000004

So something is wrong in the decompilation process.

Original comment by connor.tumbleson on 7 Dec 2014 at 1:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I: Using Apktool 2.0.0-RC3 on DocumentService.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\*****\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=label, value=0x7f020000
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x7f020000
        at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
        at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
        at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
        at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
        at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:41)
        at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
        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$1.event(XmlPullStreamDecoder.java:83)
        at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
        at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
        at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
        at brut.apktool.Main.cmdDecode(Main.java:165)
        at brut.apktool.Main.main(Main.java:81)

Let me know if you need files from my case.

Original comment by saars...@gmail.com on 8 Dec 2014 at 2:43

GoogleCodeExporter commented 9 years ago
I got this error to decompile SecContacts_Phone_OSup from lollipop NL8.

the other system app like SystemUI and SecSettings are well both decompile and 
recompile..

any solution?

Original comment by syibri32...@gmail.com on 31 Dec 2014 at 9:04

GoogleCodeExporter commented 9 years ago
had you try to decompile the SecContacts_Phone_OSup as a depency apk  one?
try  to  push the SecContacts_Phone_OSup by  "if" command....
( apktool if SecContacts_Phone_OSup.apk)
and after  that try  to decompile the SecContacts_Phone_OSup again...

Original comment by amnodan...@gmail.com on 3 Jan 2015 at 8:26

GoogleCodeExporter commented 9 years ago
Couldn't duplicate OP problem with this commit: 
https://github.com/iBotPeaches/Apktool/commit/e9d21f84af8522ef797a4016b0266f394b
9a5650

I guess that fixed it.

Original comment by connor.tumbleson on 4 Jan 2015 at 2:43