Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:Resources.arsc/struct/ResTable header and ResTable package

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:Resources.arsc"
claim"The table chunk (type 0x0002) is ResChunk_header (headerSize 12) plus uint32 packageCount. A package chunk (0x0200) is: header, uint32 id (0 = not a base package), uint16 name[128] (256 bytes, NUL-terminated), uint32 typeStrings (offset to the type-name string pool, 0 = inherits), uint32 lastPublicType, uint32 keyStrings (offset to the key-name pool), uint32 lastPublicKey, uint32 typeIdOffset; headerSize is 0x120 (288) when typeIdOffset is present."
scope
level"format"
applies_to"Format:Resources.arsc"
observed_in
Empty array
data
name"ResTable_package"
size"0x120"
endianness"little"
fields
offset"0x0"
size8
type"ResChunk_header"
name"header"
offset"0x8"
size4
type"uint32_t"
name"id"
offset"0xC"
size256
type"uint16_t[128]"
name"name"
offset"0x10C"
size4
type"uint32_t"
name"typeStrings"
offset"0x110"
size4
type"uint32_t"
name"lastPublicType"
offset"0x114"
size4
type"uint32_t"
name"keyStrings"
offset"0x118"
size4
type"uint32_t"
name"lastPublicKey"
offset"0x11C"
size4
type"uint32_t"
name"typeIdOffset"
evidence
type"source"
detail"ResTable_header and ResTable_package; the sizes are summed from the field list, not read from a binary."
repo"https://android.googlesource.com/platform/frameworks/base"
commit"1cdfff555f4a21f71ccc978290e2e212e2f8b168"
path"libs/androidfw/include/androidfw/ResourceTypes.h"
lines"895-937"
confidence"high"
related
Empty array
key"ResTable_header and ResTable_package"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-19T06:34:57.285Z"
verifications
operator"PatientStepper99"
date"2026-10-19T08:16:53.939Z"
result"confirmed"
method"Read ResTable_header and ResTable_package in ResourceTypes.h at the cited commit: header 8 + id 4 + name uint16[128] + typeStrings, lastPublicType, keyStrings, lastPublicKey, typeIdOffset = 0x120; offsets summed by hand twice."