#!/bin/bash

p="com.tencent.igce"
a="com.epicgames.ue4.SplashActivity"
d="/data/data/$p"

pgrep -f "^$p$" || {
    am start -n "$p/$a" >/dev/null 2>&1 && sleep 1.5
    pgrep -f "^$p$" || exit 1
}

rm -rf "$d/libLaoDa.so" "$d/Hookinjection"
cp -f libs/arm64-v8a/libLaoDa.so "$d/libLaoDa.so" && \
cp -f Hookinjection "$d/Hookinjection" && \
chmod 777 "$d/libLaoDa.so" "$d/Hookinjection" || exit 1

sleep 2.5
"$d/Hookinjection" -n "$p" -so "$d/libLaoDa.so"

rm -rf "$d/libLaoDa.so" "$d/Hookinjection"
