Loading flash-scripts/linux/store-rom-info.sh +15 −4 Original line number Diff line number Diff line Loading @@ -49,10 +49,21 @@ DEVICE_STATE=${ARCHIVE_FOLDER_PATH}""${device_model}"-device-state" # The command below may provide empty result if the key does not exists # In that case the process will use for compare. "$ADB_PATH" shell getprop ro.build.version.security_patch> $SECURITY_PATCH # For FP4 on stock ROM the key [ro.build.device] is [FP4] let's use this to check if we are on stock ROM # On Murena OS the return is empty if "$ADB_PATH" shell getprop ro.build.device 2>&1 | grep "$device_model" then if "$ADB_PATH" shell getprop ro.boot.vbmeta.device_state 2>&1 | grep "unlocked" then echo "Device is unlocked" exit 0 else echo "Device is locked" exit 2 fi fi exit 2 No newline at end of file #We are NOT on a stock ROM let's assume the job (unlock) is done and continue the process. exit 0 No newline at end of file Loading
flash-scripts/linux/store-rom-info.sh +15 −4 Original line number Diff line number Diff line Loading @@ -49,10 +49,21 @@ DEVICE_STATE=${ARCHIVE_FOLDER_PATH}""${device_model}"-device-state" # The command below may provide empty result if the key does not exists # In that case the process will use for compare. "$ADB_PATH" shell getprop ro.build.version.security_patch> $SECURITY_PATCH # For FP4 on stock ROM the key [ro.build.device] is [FP4] let's use this to check if we are on stock ROM # On Murena OS the return is empty if "$ADB_PATH" shell getprop ro.build.device 2>&1 | grep "$device_model" then if "$ADB_PATH" shell getprop ro.boot.vbmeta.device_state 2>&1 | grep "unlocked" then echo "Device is unlocked" exit 0 else echo "Device is locked" exit 2 fi fi exit 2 No newline at end of file #We are NOT on a stock ROM let's assume the job (unlock) is done and continue the process. exit 0 No newline at end of file