app_nocamera support for version 3.1.2

This commit is contained in:
AGG2017 2024-03-15 17:10:38 -04:00
parent fc26ddf20e
commit bb5f5483bc

View file

@ -116,6 +116,30 @@ if [ "$app_ver" == "3.1.0" ]; then
fi
fi
if [ "$app_ver" == "3.1.2" ]; then
# stop the app for looking for inserted webcam
sed -i 's/video4linux/videoXlinux/g' "$def_target"
if [ "$app_model" == "K2Pro" ]; then
# stop the app to log the message 'cannot open video'
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2338672 conv=notrunc
echo -e "${GREEN}SUCCESS: The 'app' has been patched to stop supporting cameras (K2Pro) ${NC}"
exit 0
fi
if [ "$app_model" == "K2Plus" ]; then
# stop the app to log the message 'cannot open video'
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2338720 conv=notrunc
echo -e "${GREEN}SUCCESS: The 'app' has been patched to stop supporting cameras (K2Plus) ${NC}"
exit 0
fi
if [ "$app_model" == "K2Max" ]; then
# stop the app to log the message 'cannot open video'
printf "\x00\xf0\x20\xe3" | dd of="$def_target" bs=1 seek=2338720 conv=notrunc
echo -e "${GREEN}SUCCESS: The 'app' has been patched to stop supporting cameras (K2Max) ${NC}"
exit 0
fi
fi
echo -e "${RED}ERROR: Unsupported model and version! It requires K2Pro/K2Plus/K2Max with version 3.0.5+ ${NC}"
exit 11