if [ ! -f "$DEX" ]; then echo "Cannot find $DEX, please check the tutorial in Shizuku app" exit 1 fi
if [ $(getprop ro.build.version.sdk) -ge 34 ]; then
if [ -w $DEX ]; then echo "On Android 14+, app_process cannot load writable dex." echo "Attempting to remove the write permission..." chmod 400 $DEX fi if [ -w $DEX ]; then echo "Cannot remove the write permission of $DEX." echo "You can copy to file to terminal app's private directory (/data/data/<package>, so that remove write permission is possible" exit 1 fi fi
# Replace "PKG" with the application id of your terminal app