diff --git a/app.apk b/app.apk deleted file mode 100644 index 54167e5..0000000 Binary files a/app.apk and /dev/null differ diff --git a/app/335.apk b/app/335.apk new file mode 100644 index 0000000..b8f34f3 Binary files /dev/null and b/app/335.apk differ diff --git a/app/336p.apk b/app/336p.apk new file mode 100644 index 0000000..934f452 Binary files /dev/null and b/app/336p.apk differ diff --git a/common/functions.sh b/common/functions.sh index c37bf8e..6bba88e 100755 --- a/common/functions.sh +++ b/common/functions.sh @@ -164,7 +164,8 @@ fi # Remove files outside of module directory ui_print "- Removing old files" -su -c '/system/bin/pm uninstall com.guoshi.httpcanary.premium' 2>/dev/null +su -c '/system/bin/pm uninstall com.guoshi.httpcanary.premium' >/dev/null +su -c '/system/bin/pm uninstall com.guoshi.httpcanary' >/dev/null if [ -f $INFO ]; then while read LINE; do @@ -184,11 +185,20 @@ if [ -f $INFO ]; then fi ### Install + ui_print "- Installing app" -mv $MODPATH/app.apk "/data/local/tmp" +if [ $API -lt 30 ]; then + APP_VER=336p +else + mv $MODPATH/data/data/com.guoshi.httpcanary.premium/ $MODPATH/data/data/com.guoshi.httpcanary/ + APP_VER=335 +fi +mv $MODPATH/app/$APP_VER.apk "/data/local/tmp/app.apk" + set_perm "/data/local/tmp/app.apk" 0 0 0660 su -c '/system/bin/pm install -r /data/local/tmp/app.apk' rm /data/local/tmp/app.apk + cp -r $MODPATH/data / ui_print " Installing for $ARCH SDK $API device..."