1)最开始的两个字节是0x0003,表示这个块包含了一个完整的xml文件。接着两个字节是0x0008,表示该块头的长度有8个字节,除去这4个字节,整个头还剩下4个字节。接下来的4个字节0x00000684,表示整个块的大小,也就是该xml文件的大小。
0x00003dfc = 15868 (byte)之前我们为了 debug flag 插入了 4 字节
现在是
15868 + 4 = 15872 (byte)换算为 16 进是
0x3e00 (补齐一字是 0x3e000000)翻转得到需要更新的
0x0000003eirb(main):078:0> 0x00003dfc
=> 15868
irb(main):079:0> 0x00003dfc + 4
=> 15872
irb(main):080:0> 0x00003dff
=> 15871
irb(main):081:0> 0x00003e00
=> 15872
猜出来了(
AssertionError: Declared filesize does not match real size: 1040187392 vs 15872A: android:roundIcon(0x0101052c)=@0x7f0d0000
A: android:debuggable=(type 0x12)0x1 (Raw: "true")
roundIcon 还是
0x0101052c (我之前已经知道
debuggable 的 offset 了(偏差不超过一字), 现在我把它的 name 改为 37(string pool 里第 38 项)<application android:theme="@7F110017" android:label="@7F1000AC" android:icon="@7F0D0000" android:name="com.drakeet.purewriter.App" android:allowBackup="true" android:largeHeap="true" android:supportsRtl="true" android:fullBackupContent="@7F130000" android:roundIcon="@7F0D0000"/>*="true"
>
🌑