#!/bin/bash
if [ $(id -u) != 0 ]; then
    echo "\n请使用root权限执行 !"
    exit 1
fi
echo "请选择服务器"
echo "1. 全球服 (com.tencent.ig)"
echo "2. 日韩服 (com.pubg.krmobile)"
echo "3. 台湾服 (com.rekoo.pubgm)"
echo -n "请输入序号: "
read choice

case $choice in
    1)
        Game='com.tencent.ig'
        echo "全球服"
        ;;
    2)
        Game='com.pubg.krmobile'
        echo "日韩服"
        ;;
    3)
        Game='com.rekoo.pubgm'
        echo "台湾服"
        ;;
    *)
        echo "无效选择，默认使用全球服"
        Game='com.tencent.ig'
        ;;
esac

clear
echo -e "\033[1;33;40m暂未适配越南\033[0m"
echo -e "\033[33;31m**************************************\033[0m"
cp Inject /data/data/$Game/
cp libWZHED.so /data/data/$Game/
chmod 777 /data/data/$Game/Inject
chmod 777 /data/data/$Game/libWZHED.so
am start -n $Game/com.epicgames.ue4.SplashActivity &>/dev/null
sleep 3
/data/data/$Game/Inject -n $Game -so /data/data/$Game/libWZHED.so