Skip to content

Commit

Permalink
Misc updates; try to address remaining bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Androidacy Service Account <admin@androidacy.com>
  • Loading branch information
androidacy-user committed Mar 29, 2021
1 parent 5b94867 commit 64488c6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
29 changes: 15 additions & 14 deletions common/functions.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
##########################################################################################
#
# MMT Extended Utility Functions
#
##########################################################################################
# shellcheck shell=dash
# shellcheck disable=SC2155
# shellcheck disable=SC2034
Expand Down Expand Up @@ -49,14 +44,20 @@ detect_ext_data() {
export EXT_DATA="/data/media/0/WebviewManager"
else
EXT_DATA='/storage/emulated/0/WebviewManager'
ui_print "⚠ Possible internal storage access issues! Please make sure data is mounted and decrypted."
ui_print "⚠ Trying to proceed anyway..."
fi
}

detect_ext_data
mkdir "EXT_DATA"
if test $? -ne 0; then
ui_print "⚠ Cannot access internal storage!"
it_failed
if test ! -d "$EXT_DATA"; then
mkdir "$EXT_DATA"
fi
if ! mktouch "EXT_DATA"/.rw && rm -fr "EXT_DATA"/.rw; then
if ! rm -fr "$EXT_DATA" && mktouch "EXT_DATA"/.rw && rm -fr "EXT_DATA"/.rw; then
ui_print "⚠ Cannot access internal storage!"
it_failed
fi
fi
mkdir "$MODPATH"/logs/
mkdir "$EXT_DATA"/apks/
Expand Down Expand Up @@ -112,10 +113,10 @@ umount_apex() {
cleanup() {
rm -fr $MODPATH/common 2>/dev/null
ui_print " "
ui_print " **************************************"
ui_print " * MMT Extended by Zackptg5 @ XDA *"
ui_print " * Modified by Androidacy *"
ui_print " **************************************"
ui_print "**************************************"
ui_print "* AMMT by Androidacy *"
ui_print "* Based on the original MMT-ex *"
ui_print "**************************************"
ui_print " "
}

Expand Down Expand Up @@ -364,4 +365,4 @@ fi
set_permissions

# Complete install
cleanup
cleanup
5 changes: 5 additions & 0 deletions common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ online_install() {
}
offline_install() {
set_path
if test ! -f "$EXT_DATA"/apks/webview.apk && test ! -f "$EXT_DATA"/apks/browser.apk; then
ui_print "⚠ Required files for offline install not found!"
it_failed
fi
if test ! -f "$EXT_DATA"/apks/webview.apk; then
ui_print "⚠ No webview.apk found!"
else
Expand Down Expand Up @@ -394,6 +398,7 @@ do_cleanup() {
ui_print "ⓘ Cleaning up..."
{
echo "Here's some useful links:"
echo " "
echo "Website: https://www.androidacy.com"
echo "Donate: https://www.androidacy.com/donate/"
echo "Support and contact: https://www.anroidacy.com/contact/"
Expand Down
2 changes: 1 addition & 1 deletion post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ else
fi
if ! $OVERLAY; then
echo "Clearing caches..."
rm -rf /data/resource-cache/* /data/dalvik-cache/* /cache/dalvik-cache/* /data/*/com*webview* /data/*/*/com*webview* /data/system/package_cache/*
rm -rf /data/resource-cache/* /data/dalvik-cache/* /cache/dalvik-cache/* /data/*/com*android.webview* /data/*/*/com*android.webview* /data/system/package_cache/*
sed -i "/com*webview/d" /data/system/packages.list
sed -i "/com*webview/d" /data/system/packages.xml
sed -i "/com.linuxandria.WebviewOverlay/d" "$LIST"
Expand Down

0 comments on commit 64488c6

Please sign in to comment.