Skip to content

[BUG] Chunk [end] is not a valid entry #2890

@Skylled

Description

@Skylled

Information

  1. Apktool Version (apktool -version) - 2.6.1
  2. Operating System (Mac, Linux, Windows) - Mac (also reproduced on Windows)
  3. APK From? (Playstore, ROM, Other) - Play Store

Stacktrace/Logcat

I: Using Apktool 2.6.1 on com.google.android.googlequicksearchbox_13.36.8.29.arm64.apk
I: Loading resource table...
Exception in thread "main" java.lang.IllegalArgumentException: Chunk [end] is not a valid entry
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
	at com.google.common.base.Splitter$MapSplitter.split(Splitter.java:528)
	at brut.androlib.res.decoder.StringBlock$Tag.toString(StringBlock.java:167)
	at java.base/java.lang.String.valueOf(String.java:4213)
	at java.base/java.lang.StringBuilder.append(StringBuilder.java:173)
	at brut.androlib.res.decoder.StringBlock.processStyledString(StringBlock.java:260)
	at brut.androlib.res.decoder.StringBlock.getHTML(StringBlock.java:288)
	at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:366)
	at brut.androlib.res.decoder.ARSCDecoder.readEntryData(ARSCDecoder.java:285)
	at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:261)
	at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:184)
	at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:135)
	at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:84)
	at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:50)
	at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:783)
	at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:64)
	at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:56)
	at brut.androlib.Androlib.getResTable(Androlib.java:70)
	at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:247)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:109)
	at brut.apktool.Main.cmdDecode(Main.java:175)
	at brut.apktool.Main.main(Main.java:79)

Steps to Reproduce

  1. apktool d google-app.apk

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.
We've only reproduced the issue on the latest builds of the Google Search app, and only on the 13.x.x.29 builds used by Pixel phones which presumably have different resources.

Last known-good version: https://www.apkmirror.com/apk/google-inc/google-search/google-search-13-35-9-release/google-app-13-35-9-29-arm64-2-android-apk-download/

Most recent known-bad version: https://www.apkmirror.com/apk/google-inc/google-search/google-search-13-37-9-release/google-app-13-37-9-29-arm64-2-android-apk-download/

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? - Yes
  2. If you are trying to install a modified apk, did you resign it? - N/A
  3. Are you using the latest apktool version? - Yes

Debugging details

My colleague was able to trace the string resource at fault to this one. However, we're not sure why there's now a problem as the same string also appears in the known-good version.

<string name="assistant_dictation_ineligible_android_old_version">To use Assistant voice typing, update your Android System. <a href=intent:#Intent;action=android.settings.SYSTEM_UPDATE_SETTINGS;end> Update </a> <br/><br/><a href=https://support.google.com/gboard/answer/11197787#update_app> Learn more </a></string>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions