Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown chunk type after skipping bad string block #3633

Open
grimm-65 opened this issue Jun 30, 2024 · 5 comments
Open

Unknown chunk type after skipping bad string block #3633

grimm-65 opened this issue Jun 30, 2024 · 5 comments

Comments

@grimm-65
Copy link

grimm-65 commented Jun 30, 2024

Information

  1. Apktool Version (apktool -version) -2.9.3
  2. Operating System (Mac, Linux, Windows) -Linux
  3. APK From? (Playstore, ROM, Other) - Other
  4. Java Version (java --version) -21.0.3

Stacktrace/Logcat

I: Using Apktool 2.9.3 on sample.apk
I: Loading resource table...
S: Unknown chunk type: a6e9
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
W: Bad string block: string entry is at 244, past end at 244
I: Loading resource table from file: /home/kira/.local/share/apktool/framework/1.apk
W: Unknown chunk type at: (0x00000938) skipping...
W: Unknown chunk type at: (0x00000940) skipping...
W: Unknown chunk type at: (0x000014a4) skipping...
W: AXML hit unexpected end of file at byte: 0x14A4
I: Regular manifest package...
[Fatal Error] :3:62: XML document structures must start and end within the same entity.
I: Baksmaling classes.dex...
I: Baksmaling classes10.dex...
I: Baksmaling classes11.dex...
I: Baksmaling classes13.dex...
I: Baksmaling classes14.dex...
I: Baksmaling classes15.dex...
I: Baksmaling classes16.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Baksmaling classes6.dex...
I: Baksmaling classes7.dex...
I: Baksmaling classes8.dex...
I: Baksmaling classes9.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

Steps to Reproduce

apktool d sample.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.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?Y
  2. If you are trying to install a modified apk, did you resign it?Y
  3. Are you using the latest apktool version?Y
@iBotPeaches
Copy link
Owner

Generally with an apk throwing all these obfuscation steps we'd need a sample to investigate further.

@grimm-65
Copy link
Author

@iBotPeaches
Copy link
Owner

It looked to disassemble fine for me, but it is missing some logic. I'm guessing we didn't read a chunk properly and got shifted and skipped entire arsc file.

This is definitely a highly obfuscated application.

sample.apk: warn: invalid type name 'NP_MANAGER14' for type with ID 14.
sample.apk: warn: invalid type name 'NP_MANAGER16' for type with ID 16.
ResourceType W 07-08 06:43:30 928361 928361] Bad string block: string #139 entry is at 4784210, past end at 1892

ResourceType W 07-08 06:43:30 928361 928361] Bad string block: string #149 entry is at 6357038, past end at 1892

I'll mark as a bug.

@iBotPeaches iBotPeaches changed the title Unable to decompile apk Unknown chunk type after skipping bad string block Jul 8, 2024
@bottle0928
Copy link

I catch the same problem.
When can you fix it?

@Lohita9
Copy link
Contributor

Lohita9 commented Aug 16, 2024

Here is the decompiled resources.arsc file using MT Manager.
arsc.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants