diff --git a/MBCPApp/patches/fix_vtap_cert.sh b/MBCPApp/patches/fix_vtap_cert.sh new file mode 100644 index 0000000..3a84876 --- /dev/null +++ b/MBCPApp/patches/fix_vtap_cert.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# PATCHNAME: Fix outdated VTAP certificate +# MAXVER: +# MINVER: +# shellcheck disable=SC1091 +. "$DIRPATH"/common.sh + +info "Helpful for fixing outdated certificate from older app verison, like v6.4.73 or older" +info "Allow logging in again in older app." +info "Not needed for newer app version (like v6.4.94)" + +# What is [firmware] and [profile]? +# It contains the firmware and certificate for VTAP to communicate with the app connection +# Both [firmware] and [profile] is encrypted with base64 format. +# We do not provide it in the project source, but you can get it from the app itself, in [assets] folder. + +nofwfound() { + err "no VTAP firmware in [fixcert] folder found!" + info "copy [firmware] and [profile] file to [fixcert] folder to continue." + info "[firmware] and [profile] can be found in [assets], please find from newer app." + info "recommended app : v6.4.94" + + +} + +mkdir -p "$DIRPATH"/fixcert/ + +[ ! -f "$DIRPATH"/fixcert/firmware ] && nofwfound + +[ ! -f "$DIRPATH"/fixcert/profile ] && nofwfound + +# fw +cp -f "$DIRPATH"/fixcert/firmware "$DIRPATH"/mbapk/mbapk_unpacked/root/assets/ + +# profile +cp -f "$DIRPATH"/fixcert/profile "$DIRPATH"/mbapk/mbapk_unpacked/root/assets/ + +info "Remove [firmware] and [profile] file from [/data/data/com.mbmobile/files] or clear app data" +info "If the app still keep crashing or throwing expired certificate screen."