]> granicus.if.org Git - file/commitdiff
better PIT file recognition (Joerg Jenderek)
authorChristos Zoulas <christos@zoulas.com>
Mon, 16 Jun 2014 16:56:57 +0000 (16:56 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 16 Jun 2014 16:56:57 +0000 (16:56 +0000)
magic/Magdir/android

index 12072d3a661fbe8717920defefa37d6924ae4e25..919dddd947f7231b6fd153ecc5fabb70f9ac0bc5 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------
-# $File: android,v 1.3 2013/11/08 01:24:22 christos Exp $
+# $File: android,v 1.4 2014/06/03 19:01:34 christos Exp $
 # Various android related magic entries
 #------------------------------------------------------------
 
 #>>>>>&1       regex/1l .*     \b, PBKDF2 rounds: %s
 #>>>>>>&1      regex/1l .*     \b, IV: %s
 #>>>>>>>&1     regex/1l .*     \b, Key: %s
+
+# *.pit files by Joerg Jenderek
+# http://forum.xda-developers.com/showthread.php?p=9122369
+# http://forum.xda-developers.com/showthread.php?t=816449
+# Partition Information Table for Samsung's smartphone with Android
+# used by flash software Odin
+0              ulelong                 0x12349876      
+# 1st pit entry marker
+>0x01C ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000     
+# minimal 13 and maximal 18 PIT entries found
+>>4            ulelong                 <128    Partition Information Table for Samsung smartphone
+>>>4           ulelong                 x       \b, %d entries
+# 1. pit entry
+>>>4           ulelong                 >0      \b; #1
+>>>0x01C       use                             PIT-entry
+>>>4           ulelong                 >1      \b; #2
+>>>0x0A0       use                             PIT-entry
+>>>4           ulelong                 >2      \b; #3
+>>>0x124       use                             PIT-entry
+>>>4           ulelong                 >3      \b; #4
+>>>0x1A8       use                             PIT-entry
+>>>4           ulelong                 >4      \b; #5
+>>>0x22C       use                             PIT-entry
+>>>4           ulelong                 >5      \b; #6
+>>>0x2B0       use                             PIT-entry
+>>>4           ulelong                 >6      \b; #7
+>>>0x334       use                             PIT-entry
+>>>4           ulelong                 >7      \b; #8
+>>>0x3B8       use                             PIT-entry
+>>>4           ulelong                 >8      \b; #9
+>>>0x43C       use                             PIT-entry
+>>>4           ulelong                 >9      \b; #10
+>>>0x4C0       use                             PIT-entry
+>>>4           ulelong                 >10     \b; #11
+>>>0x544       use                             PIT-entry
+>>>4           ulelong                 >11     \b; #12
+>>>0x5C8       use                             PIT-entry
+>>>4           ulelong                 >12     \b; #13
+>>>>0x64C      use                             PIT-entry
+# 14. pit entry
+>>>4           ulelong                 >13     \b; #14
+>>>>0x6D0      use                             PIT-entry
+>>>4           ulelong                 >14     \b; #15
+>>>0x754       use                             PIT-entry
+>>>4           ulelong                 >15     \b; #16
+>>>0x7D8       use                             PIT-entry
+>>>4           ulelong                 >16     \b; #17
+>>>0x85C       use                             PIT-entry
+# 18. pit entry
+>>>4           ulelong                 >17     \b; #18
+>>>0x8E0       use                             PIT-entry
+
+0      name                    PIT-entry
+# garbage value implies end of pit entries
+>0x00          ulequad&0xFFFFFFFCFFFFFFFC      =0x0000000000000000     
+# skip empty partition name
+>>0x24         ubyte                           !0                      
+# partition name
+>>>0x24                string                          >\0                     %-.32s
+# flags
+>>>0x0C                ulelong&0x00000002              2                       \b+RW
+# partition ID:
+# 0~IPL,MOVINAND,GANG;1~PIT,GPT;2~HIDDEN;3~SBL,HIDDEN;4~SBL2,HIDDEN;5~BOOT;6~KENREl,RECOVER,misc;7~RECOVER
+# ;11~MODEM;20~efs;21~PARAM;22~FACTORY,SYSTEM;23~DBDATAFS,USERDATA;24~CACHE;80~BOOTLOADER;81~TZSW
+>>>0x08        ulelong         x                       (0x%x)
+# filename
+>>>0x44                string                          >\0                     "%-.64s"
+#>>>0x18       ulelong                         >0                      
+# blocksize in 512 byte units ?
+#>>>>0x18      ulelong                         x                       \b, %db
+# partition size in blocks ?
+#>>>>0x22      ulelong                         x                       \b*%d