Skip to content

Commit 1c4621d

Browse files
committed
add release tools
1 parent 0dd5696 commit 1c4621d

4 files changed

Lines changed: 73 additions & 0 deletions

File tree

release_tool/decored.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cd /d %~dp0
2+
3+
fake ..\enc\device.db ..\rooting\device.db
4+
fake ..\enc\get_essential_address ..\rooting\get_essential_address
5+
fake ..\enc\run_root_shell ..\rooting\run_root_shell
6+
fake ..\enc\unlock_security_module ..\rooting\unlock_security_module
7+

release_tool/encord.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cd /d %~dp0
2+
3+
fake.exe ..\rooting\device.db ..\enc\device.db
4+
fake.exe ..\rooting\get_essential_address ..\enc\get_essential_address
5+
fake.exe ..\rooting\run_root_shell ..\enc\run_root_shell
6+
fake.exe ..\rooting\unlock_security_module ..\enc\unlock_security_module
7+
8+
pause

release_tool/fake.c

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#include <stdio.h>
2+
#include <fcntl.h>
3+
4+
#define KEY 0x34
5+
6+
#define BUFFER_SIZE 1024
7+
8+
int main(int argc,char* argv[])
9+
{
10+
int read_cnt;
11+
char buffer[BUFFER_SIZE];
12+
FILE* fp;
13+
FILE* fp2;
14+
15+
int i;
16+
int total=0;
17+
char tmp;
18+
19+
if(argc < 2 )
20+
{
21+
return -1;
22+
}
23+
fp = fopen(argv[1],"rb");
24+
if(fp == (FILE*)0)
25+
{
26+
return 1;
27+
}
28+
printf("file:%s\n",argv[1]);
29+
30+
31+
fp2 = fopen(argv[2],"wb");
32+
if(fp2 == (FILE*)0)
33+
{
34+
return 1;
35+
}
36+
for(;;)
37+
{
38+
read_cnt = fread(buffer,BUFFER_SIZE,1,fp);
39+
40+
total += read_cnt*BUFFER_SIZE;
41+
if( read_cnt == 0 )
42+
{
43+
printf("processed size:%d\n",total);
44+
break;
45+
}
46+
for(i=0;i<(read_cnt*BUFFER_SIZE);i++)
47+
{
48+
tmp = buffer[i] ^ KEY;
49+
50+
fwrite(&tmp,1,1,fp2);
51+
}
52+
53+
54+
}
55+
56+
fclose(fp);
57+
fclose(fp2);
58+
}

release_tool/fake.exe

57.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)