1673482275.FILE5_44-19-g4341ed61.detect-android-package-resource-table-arsc-fc-stegerman.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  1. Subject: Detect Android package resource table (ARSC) (FC Stegerman)
  2. Origin: FILE5_44-19-g4341ed61 <https://github.com/file/file/commit/FILE5_44-19-g4341ed61>
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Thu Jan 12 00:11:15 2023 +0000
  5. --- a/magic/Magdir/android
  6. +++ b/magic/Magdir/android
  7. @@ -233,3 +233,22 @@
  8. !:ext profm
  9. >>4 string 001\x00 \b, version 001 N
  10. >>4 string 002\x00 \b, version 002
  11. +
  12. +# Android package resource table (ARSC): resources.arsc
  13. +# Reference: https://android.googlesource.com/platform/tools/base/\
  14. +# +/refs/heads/mirror-goog-studio-main/apkparser/binary-resources/\
  15. +# src/main/java/com/google/devrel/gmscore/tools/apk/arsc
  16. +# 00: resource table type = 0x0002 (2) + header size = 12 (2)
  17. +# 04: chunk size (4, skipped)
  18. +# 08: #packages (4)
  19. +0 ulelong 0x000c0002 Android package resource table (ARSC)
  20. +!:ext arsc
  21. +>8 ulelong !1 \b, %d packages
  22. +# 12: string pool type = 0x0001 (2) + header size = 28 (2)
  23. +# 16: chunk size (4, skipped)
  24. +# 20: #strings (4), #styles (4), flags (4)
  25. +>12 ulelong 0x001c0001
  26. +>>20 ulelong !0 \b, %d string(s)
  27. +>>24 ulelong !0 \b, %d style(s)
  28. +>>28 ulelong &1 \b, sorted
  29. +>>28 ulelong &256 \b, utf8