Skip to content

Commit

Permalink
FRP を自動で修正
Browse files Browse the repository at this point in the history
Signed-off-by: Syuugo <[email protected]>
  • Loading branch information
s1204IT authored Jul 18, 2024
1 parent a6fbc91 commit ca6f3c5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions mali_shrinker_mmap32.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,28 @@ int main() {
int flush_idx = 0;
for (int i = 0; i < 10; i++) {
if(!trigger(mali_fd, mali_fd2, &flush_idx)) {
printf("\nSELinux is ");
system("getenforce");
printf("Tampering with FRP...");
system("rm -f /data/local/tmp/frp");
system("dd if=/dev/block/by-name/frp of=/data/local/tmp/frp");
FILE *frp = fopen("/data/local/tmp/frp", "r+b");
if (frp == NULL) {
perror("Couldn't read cloned FRP.");
return 1;
}
if (fseek(frp, 524288 - 1, SEEK_SET) != 0) {
perror("Error seeking to the last byte.");
fclose(frp);
return 1;
}
if (fputc(0x01, file) == EOF) {
perror("Failed to fix byte. (7FFF8:0x01)");
fclose(frp);
return 1;
}
fclose(frp);
system("dd if=/data/local/tmp/frp of=/dev/block/by-name/frp");
break;
}
}
Expand Down

0 comments on commit ca6f3c5

Please sign in to comment.