ax3600_tool/mitool.sh

32 lines
617 B
Bash
Raw Normal View History

2021-08-15 09:50:33 +08:00
#!/bin/sh
2022-10-07 22:51:47 +08:00
PWD=$(pwd)
2022-01-04 16:24:49 +08:00
arch=`uname -m`
archver=`cat /proc/cpuinfo | grep architecture | sed -n '1p' | awk -F ':' '{printf $2}'`
if [ "$arch" == "mips" ];then
tool=mitool_mipsle
2021-08-15 09:50:33 +08:00
else
2022-01-04 16:24:49 +08:00
if [ $archver == 8 ];then
tool=mitool_arm64
else
tool=mitool_arm
fi
2021-08-15 09:50:33 +08:00
fi
if [ "$1" == "unlock" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool unlock
2021-08-15 09:50:33 +08:00
elif [ "$1" == "hack" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool hack
2021-08-15 09:50:33 +08:00
elif [ "$1" == "lock" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool lock
2021-08-15 09:50:33 +08:00
elif [ "$1" == "password" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool password
2021-08-15 09:50:33 +08:00
elif [ "$1" == "model" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool model
2021-08-15 17:35:55 +08:00
elif [ "$1" == "sn" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool sn
2021-08-15 17:35:55 +08:00
elif [ "$1" == "setsn" ];then
2022-10-07 22:51:47 +08:00
$PWD/$tool setsn $2
2021-08-15 09:50:33 +08:00
else
echo "what?"
fi