-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathAndroidBackUpTemplate.bt
45 lines (35 loc) · 1.31 KB
/
AndroidBackUpTemplate.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//--------------------------------------
//--- 010 Editor v5.0beta2 Binary Template
//
// File: AndroidBackUpTemplate.bt
// Author: Tim "diff" Strazzere <[email protected]> <[email protected]>
// Revision: 1.0
// Purpose: Quick template for parsing Android Back Ups
//
//--------------------------------------
// utility type to show the SHA1 hash in the value column
typedef ubyte SHA1[20] <read=SHA1Read, format=hex>;
string SHA1Read(SHA1 sig) {
string ret;
string tmp;
int i;
for(i = 0; i<20; i++) {
SPrintf(tmp, "%.2X", sig[i]);
ret += tmp;
}
return ret;
}
typedef struct {
string magic <comment="Magic bytes that the file command should use">;
if(Strcmp(magic, "ANDROID BACKUP\n") != 0) {
return("Doesn't appear to be an Android Back Up file - bailing!\n");
}
string backup_file_format <format=hex, comment="File format version, currently only 0x1 is known">;
string compressed_flag <format=hex, comment="Flag for the backup being compressed or not">;
string encryption_algorithm <format=hex, comment="Currently either \"none\" or \"AES-256\"">;
if(Strcmp(encryption_algorithm, "none") != 0) {
string user_password_salt;
string master_key_checksum_salt;
}
} Android_Global_File_header;
Android_Global_File_header globalFileHeader;