Apktool: getNonDefaultNamespaceUri - NullPointerException

Created on 4 Aug 2018  Â·  5Comments  Â·  Source: iBotPeaches/Apktool

Information

  1. Apktool Version (apktool -version) - 2.3.4-6231ed-SNAPSHOT
  2. Operating System (Mac, Linux, Windows) - LinuxMint 19
  3. APK From? (Playstore, ROM, Other) - PlayStore

Stacktrace/Logcat

xxx@xxx:~/xxx/xxx/xxx$ apktool d base.apk 
I: Using Apktool 2.3.4-6231ed-SNAPSHOT on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
S: WARNING: Could not write to (/home/xxx/.local/share/apktool/framework), using /tmp instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Loading resource table from file: /tmp/1.apk
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.NullPointerException
    at brut.androlib.res.decoder.AXmlResourceParser.getNonDefaultNamespaceUri(AXmlResourceParser.java:312)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeNamespace(AXmlResourceParser.java:299)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeNamespace(XmlPullParserDelegate.java:176)
    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.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:135)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:120)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
    at brut.apktool.Main.cmdDecode(Main.java:164)
    at brut.apktool.Main.main(Main.java:73)

xxx@xxx:~/xxx/xxx/xxx$ apktool d -p /home/xxx/Apktool/apk_jar/framework-res.apk base.apk -f
  I: Using Apktool 2.3.4-6231ed-SNAPSHOT on base.apk
  I: Loading resource table...
  I: Decoding AndroidManifest.xml with resources...
  W: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x0000003c
  W: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x0000003c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000024
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000017
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000069
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000002
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000039
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000038
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000044
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000040
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000041
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000004b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000048
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000047
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000a9
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000004a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000004c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000049
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000046
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000068
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000002
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000068
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000031
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000045
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000042
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00020000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000043
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f12001b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f110198
  W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f0e0000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000060
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00ba5338
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000037
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x40066666
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000d5
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000054
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000098
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000099
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000b8
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000026
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000b7
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00ba5338
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000028
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x000000d3
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000027
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x0000002d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x01030010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ce
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000a0
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200e4
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200df
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000070
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1102f0
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1102ec
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f11032b
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000072
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f11033a
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a7
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000009c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000088
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000089
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a1
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200d7
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000002
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000082
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000081
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000033
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000035
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000034
  W: Could not decode attr value, using undecoded value instead: ns=android, name=scheme, value=0x0000002b
  W: Could not decode attr value, using undecoded value instead: ns=android, name=host, value=0x0000002c
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a5
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000080
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000073
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000009e
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000092
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000058
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x0000002a
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005b
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000025
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000059
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000053
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200e5
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f11008e
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ca
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c1
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b0
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000aa
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a8
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000063
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000074
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a8
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000075
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000c2
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000b1
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000009a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000093
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000097
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000096
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000b9
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000095
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ba
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000009b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200e4
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000084
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000012
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000083
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a6
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000078
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000079
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000076
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200d7
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000077
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000061
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000062
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000091
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f110340
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f110341
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000090
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000050
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000066
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000004e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f140000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000071
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000002
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000009e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000007d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000009d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x01030055
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000033
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000035
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000034
  W: Could not decode attr value, using undecoded value instead: ns=android, name=scheme, value=0x000000d1
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f12001f
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a0
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000032
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000036
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f12001b
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f12001b
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000006c
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000085
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000086
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000087
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000056
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000029
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000057
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000055
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000009f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000003e8
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000004d
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c3
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c6
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000094
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a2
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f1200de
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000008e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c5
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c4
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f120101
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a4
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c8
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000a3
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f120101
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000c7
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005a
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000cf
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000064
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000004f
  W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000023
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x01030010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ac
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000ab
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000ad
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x01030010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000bc
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000bb
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000003
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000bf
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xfffffe0c
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ba
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b4
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b2
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000055
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b5
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b3
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000003b
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x01030010
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000ae
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000bd
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000aa
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000a8
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000063
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000be
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xfffffe0c
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000b9
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000c0
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000067
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000064
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f120176
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005e
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x7f120176
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000005f
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000001
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000010
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000cc
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000cb
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x0000005d
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000b6
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x000000af
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000cd
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0xffffffff
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x000000c9
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000000
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000065
  W: Could not decode attr value, using undecoded value instead: ns=, name=, value=0x00000064
  I: Regular manifest package...
  [Fatal Error] :4:42: Attribute "android:" was already specified for element "uses-sdk".
  I: Decoding file-resources...
  Exception in thread "main" java.lang.NullPointerException
    at brut.androlib.res.decoder.AXmlResourceParser.getNonDefaultNamespaceUri(AXmlResourceParser.java:312)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeNamespace(AXmlResourceParser.java:299)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeNamespace(XmlPullParserDelegate.java:176)
    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.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:135)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:120)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
    at brut.apktool.Main.cmdDecode(Main.java:164)
    at brut.apktool.Main.main(Main.java:73)

Steps to Reproduce

  1. apktool if framework-res.apk
  2. apktool d base.apk

Frameworks & APK

https://goo.gl/nAxHu8

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? yes i have
  2. If you are trying to install a modified apk, did you resign it? not resign yet because apktool not decompile the app
  3. Are you using the latest apktool version? i'm using 2.3.3 & 2.3.4-6231ed-SNAPSHOT, both version still cannot decompile
Bug

All 5 comments

successfully using version 2.3.0, but using the latest version still fails (same log)

@TkgJamuKeliling, just a suggestion...

Can you provide the 2 Logs via txt for a comparison of the 2 Apktool versions to see what the earlier version had done right compared to the latest version?

~Ibuprophen

I replicate the issue.

➜  1859 apktool if framework-res.apk -t 1859
I: Framework installed to: /home/ibotpeaches/.local/share/apktool/framework/1-1859.apk
➜  1859 apktool d base.apk -t 1859
I: Using Apktool 2.4.1 on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1-1859.apk
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.NullPointerException
    at brut.androlib.res.decoder.AXmlResourceParser.getNonDefaultNamespaceUri(AXmlResourceParser.java:312)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeNamespace(AXmlResourceParser.java:299)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeNamespace(XmlPullParserDelegate.java:176)
    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:84)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:142)
    at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:141)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:121)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:129)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
    at brut.apktool.Main.cmdDecode(Main.java:170)
    at brut.apktool.Main.main(Main.java:76)
➜  1859 

Appears a root level issue with our namespace decoding. Those are never fun things to fix. Marking as bug.

a problem occurs when the prefix is null
can't use equalsIgnoreCase method
so i fix AXmlResourceParser.java like this and it works

    private String getNonDefaultNamespaceUri() {
        int offset = m_namespaces.getCurrentCount() + 1;
        String prefix = m_strings.getString(m_namespaces.get(offset, true));

        if(prefix != null){
            if (! prefix.equalsIgnoreCase("android")) {
                return  m_strings.getString(m_namespaces.get(offset, false));
            }
        }

        return android_ns;
    }
➜  1859 apktool d base.apk -f
I: Using Apktool 2.4.2-f545c2-SNAPSHOT on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  1859 

This was fixed in https://github.com/iBotPeaches/Apktool/pull/2440, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpsachse picture jpsachse  Â·  3Comments

Null78 picture Null78  Â·  3Comments

trandua picture trandua  Â·  3Comments

rafinetiz picture rafinetiz  Â·  3Comments

harshkuttu picture harshkuttu  Â·  3Comments