Apktool: NullPointerException on v2.4.1

Information

  1. Apktool Version (apktool -version) - v2.4.1
  2. Operating System (Mac, Linux, Windows) - Linux Ubu18.04
  3. APK From? (Playstore, ROM, Other) - https://play.google.com/store/apps/details?id=com.nhnpixelcube.fishislandII&hl=en (Chinese protected apk with AppGuard)

Stacktrace/Logcat

 >  apktool d /tmp/crash.apk 
I: Using Apktool 2.4.1 on crash.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/edu/.local/share/apktool/framework/1.apk
Exception in thread "main" java.lang.NullPointerException
	at java.base/java.io.Writer.write(Writer.java:249)
	at org.xmlpull.renamed.MXSerializer.attribute(MXSerializer.java:631)
	at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
	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.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:154)
	at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:162)
	at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:204)
	at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:134)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:122)
	at brut.apktool.Main.cmdDecode(Main.java:170)
	at brut.apktool.Main.main(Main.java:76)

Include stacktrace here

APK

https://play.google.com/store/apps/details?id=com.nhnpixelcube.fishislandII&hl=en

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

a%                                                                              ➜  1576 apktool d com.spacosa.android.famy.global.apk -f
I: Using Apktool 2.4.2-f545c2-SNAPSHOT on com.spacosa.android.famy.global.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: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  1576 apktool b com.spacosa.android.famy.global
I: Using Apktool 2.4.2-f545c2-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'title_famy_profile_update' has no default translation.
W: warning: string 'title_famy_version_name' has no default translation.
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
➜  1576 

&

➜  2300 apktool d com.nhnpixelcube.fishislandII_30104_apps.evozi.com.apk -f 
I: Using Apktool 2.4.2-f545c2-SNAPSHOT on com.nhnpixelcube.fishislandII_30104_apps.evozi.com.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: Baksmaling classes3.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
➜  2300 

Will be in next release.

Same problem, downgrading to 2.4.0 mitigated the issue.

Thanks! Downgrading to 2.4.0 solved the same issue for me too!! @iBotPeaches

Any chance this is going to be fixed in v2.5.0, @iBotPeaches?

Not sure. Getting Android 11 support is highest priority and that is not working yet

Same problem, downgrading to 2.4.0 mitigated the issue.