apktool -version) - 2.2.2Log For : SystemUI.apk
Log Type : Decompiling
Log Recorded At : 25-03-17 -- 8:23:57,38
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
Exception in thread "main" java.lang.IllegalStateException: duplicated prefix 'android'
at org.xmlpull.mxp1_serializer.MXSerializer.setPrefix(MXSerializer.java:438)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.setPrefix(StaticXmlSerializerWrapper.java:132)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:261)
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:120)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:105)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:262)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:132)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:108)
at brut.apktool.Main.cmdDecode(Main.java:166)
at brut.apktool.Main.main(Main.java:81)
apktool try to decompilehttps://www.mediafire.com/folder/7aljm05235z0x4r,4f1nabl6an5pfhn/shared
apktool d, apktool b without changing anything? not relatedWe aren't able to decompile the apk. Issue is inside res/drawable folder, if you remove all files somc_sony_clock_2_anim_vector_drawable_xxx.xml, you're able to decompile.
Thanks
Confirmed.
Looking into this. This problem has nothing to do with animated drawables. It has two similar namespaces which are clashing.
N: android=http://schemas.android.com/apk/res/android
N: androidprv=http://schemas.android.com/apk/prv/res/android
EDIT: Which are inside the animated vector drawables lol
N: android=http://schemas.android.com/apk/res/android
N: aapt=http://schemas.android.com/aapt
N: android=http://schemas.android.com/apk/res/android
E: vector (line=11)
A: android:height(0x01010155)=@0x7f100313
A: android:width(0x01010159)=@0x7f100312
A: android:viewportWidth(0x01010402)=(type 0x4)0x42a40000
A: android:viewportHeight(0x01010403)=(type 0x4)0x42f40000
E: path (line=16)
A: android:name(0x01010003)="sony_clock_2_hour_digit" (Raw: "sony_clock_2_hour_digit")
A: android:pathData(0x01010405)="M8.91,7.76H71.63V8.49s-18,25.69-30.29,65.15c-4,12.71-9.37,35.73-9.37,42" (Raw: "M8.91,7.76H71.63V8.49s-18,25.69-30.29,65.15c-4,12.71-9.37,35.73-9.37,42")
A: android:strokeColor(0x01010406)=@0x7f0c00db
A: android:strokeWidth(0x01010407)=(type 0x4)0x408570a4
A: android:trimPathStart(0x01010408)=(type 0x4)0x0
A: android:trimPathEnd(0x01010409)=(type 0x4)0x3f800000
A: android:trimPathOffset(0x0101040a)=(type 0x4)0x0
A: android:strokeMiterLimit(0x0101040d)=(type 0x4)0x41200000
E: group (line=26)
A: android:name(0x01010003)="sony_clock_2_hour_dot" (Raw: "sony_clock_2_hour_dot")
E: path (line=28)
A: android:fillColor(0x01010404)=@0x7f0c00db
A: android:pathData(0x01010405)="M 0 -5 C 2.76142374915 -5 5 -2.76142374915 5 0 C 5 2.76142374915 2.76142374915 5 0 5 C -2.76142374915 5 -5 2.76142374915 -5 0 C -5 -2.76142374915 -2.76142374915 -5 0 -5 Z" (Raw: "M 0 -5 C 2.76142374915 -5 5 -2.76142374915 5 0 C 5 2.76142374915 2.76142374915 5 0 5 C -2.76142374915 5 -5 2.76142374915 -5 0 C -5 -2.76142374915 -2.76142374915 -5 0 -5 Z")
Hmmm. What to do about this. Maybe decoding Vectors back to source isn't needed.
Okay, found problem. This bug was actually introduced way back when we moved from Maven to Gradle. This is known I think as the Maven dependency hell, so thank you for discovering it unintentionally.
We have a file at apktool-lib/src/main/java/org/xmlpull/mxp1_serializer/MXSerializer.java that we use to get around some limitations that regular XML files have. This file isn't actually being used at all, because the package xpp3:xpp3:1.1.4c is loading its own copy of that file. This means any modification to that file would never be used by apktool as the dependency version of the file would win. This could be classified as a classpath, dependency issue.
Found out my library for building a fatJar is deprecated and abandoned. There are new plugins for building uber/fat jars with a lot of features that may be good to switch to, in order to patch this.
Most helpful comment
Confirmed.