Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

[BUG] Ignores res folder of framework.jar

Open chiteroman opened this issue 1 year ago • 3 comments
trafficstars

Information

  1. Apktool Version (apktool -version) - 2.10.0-dirty
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - ROM
  4. Java Version (java --version) -
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)

Apktool ignores "res" dir even I use -c. -r, "-resm keep"

I need to manually add res files to unknownFiles in apktool.yml

Res dir contains three files: android.mime.types, debian.mime.types and vendor.mime.types

chiteroman avatar Jun 08 '24 13:06 chiteroman

Our jar parsing is probably very weak if non-source elements are packed within. Do you have a sample I can work from?

iBotPeaches avatar Jun 10 '24 10:06 iBotPeaches

Our jar parsing is probably very weak if non-source elements are packed within. Do you have a sample I can work from?

Any Android 14+ framework.jar file should be good. I've had this issue as well.

salvogiangri avatar Jun 27 '24 17:06 salvogiangri

@IgorEisberg considering your recent contributions in the project would you mind having a look at this? Any Android 14+ framework.jar ships a "res" folder which gets ignored by apktool when decompiling/recompiling. As explained in the issue, it contains a few files with a .types extension required by this class: https://github.com/aosp-mirror/platform_frameworks_base/blob/main/mime/java/android/content/type/DefaultMimeMapFactory.java

salvogiangri avatar Jan 20 '25 14:01 salvogiangri