;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; F64 Basic Script Trainer 1.0
;; 
;;   Spaces are not allowed when searching for hex or string
;;   Replace spaces with wildcard *
;;
;;   Maximum Length for task_title is 64 characters
;;
;;   Maximum Length for a hex_patch is 64 bytes
;;
;;   Maximum Length for string_patch is 64 characters (case sensitive)
;;
;;   Each Task can only process one specific partition
;;   Make separate Tasks for each unique partition
;;
;;   Upto 32 consecutive Tasks can be processed in a single script file
;;   
;;
;;                       D I S C L A I M E R
;;
;;    We are not responsible for the legality of the tasks contained 
;;    within these script files. Additionally, we accept no liability 
;;    for any damages that may result from their use. Please proceed 
;;    with caution and modify these script files at your own risk. 
;;    If you are not fully familiar with their functionality, we 
;;    strongly advise against using them.  
;;
;; January 21, 2025 @ X-Shadow
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




; TASK 1
; This first Task Example will demonstrate how to erase a specific partition

start 						; Task start boundary

task_title="Script Task 1: FRP Erase"           ; Optional Task Title that will be displayed on the software log

target_partition="frp"                          ; Reads partition "frp" from EMMC/UFS and saves a backup binary file

erase_full					; Sends an erase command for the area used by the target partition

blank_check					; Reads the target partition and checks whether it is blank

finish 						; Task finish boundary




; TASK 2
; This second Task Example will demonstrate how to replace the entire contents of a specific partition with a single hex byte value

start 						; Task start boundary

task_title="Script Task 2: FRP Zero Fill"       ; Optional Task Title that will be displayed on the software log

target_partition="frp"                          ; Reads partition "frp" from EMMC/UFS and saves a backup binary file

hex_fill="00"					; Replaces entire binary contents of partition with "00" 

write_partition                                 ; Writes empty/erased partition "frp" to EMMC/UFS

finish 						; Task finish boundary




; TASK 3
; This third Task Example will demonstrate how to apply simple patches to partitions

start 						; Task start boundary

task_title="Script Task 3: Patch persis"        ; Optional Task Title that will be displayed on the software log

target_partition="persist"                      ; Reads partition "persist" from EMMC/UFS and saves a backup binary file

hex_patch="0011223344556677","8899AABBCCDDEEFF" ; Searches for hexadecimal sequence "0011223344556677" and replaces it with hexadecimal sequence "8899AABBCCDDEEFF"

hex_patch="BEEFCAFE**4567","BABEFACE**1234"     ; Searches for hexadecimal sequence with wildcard ** "BEEFCAFE**4567" and replaces it with hexadecimal sequence with wildcard ** "BABEFACE**4567"
                                                ; Take note that wildcard value will not be patched

string_patch="Hello","World"			; Searches for case sensitive string "Hello" and replaces it with case sensitive string "World"

string_patch="unlock**me","relock**me"          ; Searches for case sensitive string with wildcard "unlock**me" and replaces it with case sensitive string with wildcard "relock**me"
						; Take note that wildcard value will not be patched

write_partition                                 ; Writes patched partition "persist" to EMMC/UFS

finish 						; Task finish boundary
