Skip to content

Commit

Permalink
reboot
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 52577e3 commit c8387e0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mali_shrinker_mmap32.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,21 +877,24 @@ int main() {
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;
err(1, "Couldn't read cloned FRP.");
}
if (fseek(frp, 524288 - 1, SEEK_SET) != 0) {
perror("Error seeking to the last byte.");
fclose(frp);
return 1;
err(1, "Error seeking to the last byte.");
}
if (fputc(0x01, frp) == EOF) {
perror("Failed to fix byte. (7FFF8:0x01)");
fclose(frp);
return 1;
err(1, "Failed to fix byte. (7FFF8:0x01)");
}
fclose(frp);
system("dd if=/data/local/tmp/frp of=/dev/block/by-name/frp");
system("rm -f /data/local/tmp/frp");
printf("Rebooting to bootloader...\n");
sleep(2);
system("reboot bootloader");
printf("Run the following command:");
printf("fastboot flashing unlock\n");
break;
}
}
Expand Down

0 comments on commit c8387e0

Please sign in to comment.