pxb1988 / dex2jar

Tools to work with android .dex and java .class files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running "./apktool d -s -f --use-aapt2 on an Apk" inside docker image failing

vramasam opened this issue · comments

Hello @ThexXTURBOXx @pxb1988

Can you please check the below exception and please tell what can be the reason for the exception. It will be really helpful, if we get to know the root cause for the below issue.

sh-4.2$ ./apktool d -s -f --use-aapt2 ../../SingleDex.apk -o ../../decompiledDirPath/
I: Using Apktool 2.6.0 on SingleDex.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=0x29209082
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000016
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x29209082
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000016
W: Could not decode attr value, using undecoded value instead: ns=android, name=compileSdkVersion, value=0x0000001d
W: Could not decode attr value, using undecoded value instead: ns=android, name=compileSdkVersionCodename, value=0x00000014
W: Could not decode attr value, using undecoded value instead: ns=android, name=minSdkVersion, value=0x00000010
W: Could not decode attr value, using undecoded value instead: ns=android, name=targetSdkVersion, value=0x0000001c
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000022
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000001f
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000001d
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000021
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000020
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000001e
W: Could not decode attr value, using undecoded value instead: ns=android, name=glEsVersion, value=0x00020000
W: Could not decode attr value, using undecoded value instead: ns=android, name=required, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x7f0d0147
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c0028
W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f07007a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=allowBackup, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=appComponentFactory, value=0x00000025
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c0028
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=name, value=0x0000001b
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000001c
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c005c
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002f
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c005d
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000030
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c005e
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000031
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c005f
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=label, value=0x7f0c0060
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=label, value=0x7f0c006d
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=android, name=label, value=0x7f0c004c
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002e
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c00a1
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=label, value=0x7f0c002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002b
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c008a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003d
W: Could not decode attr value, using undecoded value instead: ns=android, name=screenOrientation, value=0x00000001
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c009b
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003f
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c009a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003e
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c0065
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=label, value=0x7f0c0048
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002d
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000026
W: Could not decode attr value, using undecoded value instead: ns=android, name=exported, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=authorities, value=0x00000041
W: Could not decode attr value, using undecoded value instead: ns=android, name=grantUriPermissions, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000023
W: Could not decode attr value, using undecoded value instead: ns=android, name=resource, value=0x7f0f0000
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x7f0d01f6
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c005a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000038
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000042
W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x7f0c0062
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c009f
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003c
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0c009e
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000002c
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003a
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x0000003b
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000039
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000040
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000017
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000049
W: Could not decode attr value, using undecoded value instead: ns=android, name=required, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030010
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000043
W: Could not decode attr value, using undecoded value instead: ns=android, name=exported, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000044
W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x7f090008
W: Could not decode attr value, using undecoded value instead: ns=android, name=name, value=0x00000024
W: Could not decode attr value, using undecoded value instead: ns=android, name=value, value=0x00000015
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1294)
at java.util.regex.Matcher.reset(Matcher.java:320)
at java.util.regex.Matcher.(Matcher.java:240)
at java.util.regex.Pattern.matcher(Pattern.java:1104)
at brut.androlib.res.decoder.AndroidManifestResourceParser.isNumericStringMetadataAttributeValue(AndroidManifestResourceParser.java:56)
at brut.androlib.res.decoder.AndroidManifestResourceParser.getAttributeValue(AndroidManifestResourceParser.java:41)
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:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:139)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:151)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:159)
at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:193)
at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:140)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:109)
at brut.apktool.Main.cmdDecode(Main.java:175)
at brut.apktool.Main.main(Main.java:78)

This does not seem to be related to dex2jar. Have you tried getting in contact with the author of apktool instead? Also, apktool 2.7.0 already exists, so maybe try updating to the newest version

Thank you for the response. In the apktool checked similar kind of ticket is available iBotPeaches/Apktool#2878 . We will try with latest 2.7.0 apkTool . Thank you @ThexXTURBOXx for quick response