Skip to content

Commit 83e0b80

Browse files
author
Androidacy Service Account
committed
Update to v8.0-beta2
About time! This release addresses a bucket load of bugs and improvements - Restored default behavior of just installing webview by default based on user feedback - Changed config logic. Be sure to grab the updated config.txt and thoroughly read the instructions! - Support android 11 - Bump verions of tooling used - Better error detection - Removed a lot of redundant code - Code refactoring like you wouldn't believe! Shoutout to all the feedback and bug reports we've received! Keep 'em coming! Signed-off-by: Androidacy Service Account <[email protected]>
1 parent 4e1d3b1 commit 83e0b80

17 files changed

+206
-162
lines changed

Diff for: CHANGELOG.md

100755100644
File mode changed.

Diff for: LICENSE

100755100644
File mode changed.

Diff for: README.md

100755100644
File mode changed.

Diff for: SECURITY.md

100755100644
File mode changed.

Diff for: common/functions.sh

100755100644
+45-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# shellcheck shell=dash
2-
# Its broken okay?!?!
32
# shellcheck disable=SC2155
43
# shellcheck disable=SC2034
54
# shellcheck disable=SC1090
@@ -18,6 +17,42 @@ abort() {
1817
exit 1
1918
}
2019

20+
it_failed() {
21+
ui_print " "
22+
ui_print "⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠"
23+
ui_print " "
24+
ui_print " Uh-oh, the installer encountered an issue!"
25+
ui_print " It's probably one of these reasons:"
26+
ui_print " 1) Installer is corrupt"
27+
ui_print " 2) You didn't follow instructions"
28+
ui_print " 3) You have an unstable internet connection"
29+
ui_print " 4) Your ROM is broken"
30+
ui_print " 5) There's a *tiny* chance we screwed up"
31+
ui_print " Please fix any issues and retry."
32+
ui_print " If you feel this is a bug or need assistance, head to our telegram"
33+
mv ${EXT_DATA}/WebviewManager/logs ${EXT_DATA}
34+
rm -rf ${EXT_DATA}/WebviewManager/*
35+
mv ${EXT_DATA}/logs ${EXT_DATA}/WebviewManager/
36+
ui_print " "
37+
ui_print "⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠"
38+
ui_print " "
39+
abort
40+
}
41+
detect_ext_data() {
42+
touch /sdcard/.rw && rm /sdcard/.rw && EXT_DATA="/sdcard"
43+
if test -z ${EXT_DATA}; then
44+
touch /storage/emulated/0/.rw && rm /storage/emulated/0/.rw && EXT_DATA="/storage/emulated/0"
45+
fi
46+
if test -z ${EXT_DATA}; then
47+
touch /data/media/0/.rw && rm /data/media/0/.rw && EXT_DATA="/data/media/0"
48+
fi
49+
if test -z ${EXT_DATA}; then
50+
ui_print "- Internal storage doesn't seem to be writable!"
51+
it_failed
52+
fi
53+
}
54+
detect_ext_data
55+
2156
mount_apex() {
2257
$BOOTMODE || [ ! -d /system/apex ] && return
2358
local APEX DEST
@@ -31,13 +66,11 @@ mount_apex() {
3166
unzip -qo $APEX apex_payload.img -d /apex
3267
loop_setup apex_payload.img
3368
if [ -n "$LOOPDEV" ]; then
34-
ui_print "- Mounting $DEST"
3569
mount -t ext4 -o ro,noatime $LOOPDEV $DEST
3670
fi
3771
rm -f apex_payload.img
3872
elif [ -d $APEX ]; then
3973
# APEX folders, bind mount directory
40-
ui_print "- Mounting $DEST"
4174
mount -o bind $APEX $DEST
4275
fi
4376
done
@@ -74,10 +107,10 @@ umount_apex() {
74107
cleanup() {
75108
rm -rf $MODPATH/common 2>/dev/null
76109
ui_print " "
77-
ui_print " **************************************"
78-
ui_print " * MMT Extended by Zackptg5 @ XDA *"
79-
ui_print " * Modified by Androidacy *"
80-
ui_print " **************************************"
110+
ui_print " ***********************************"
111+
ui_print " * MMT Extended by Zackptg5 *"
112+
ui_print " * Modified by Androidacy *"
113+
ui_print " ***********************************"
81114
ui_print " "
82115
}
83116

@@ -153,8 +186,6 @@ install_script() {
153186
-p) shift; local INPATH=$NVBASE/post-fs-data.d;;
154187
*) local INPATH=$NVBASE/service.d;;
155188
esac
156-
# shellcheck disable=SC2143
157-
[ "$(grep "#!/system/bin/sh" $1)" ] || sed -i "1i #!/system/bin/sh" $1
158189
local i; for i in "MODPATH" "LIBDIR" "MODID" "INFO" "MODDIR"; do
159190
case $i in
160191
"MODPATH") sed -i "1a $i=$NVBASE/modules/$MODID" $1;;
@@ -178,8 +209,8 @@ prop_process() {
178209
}
179210

180211
# Check for min/max api version
181-
[ -z $MINAPI ] || { [ $API -lt $MINAPI ] && abort "! Your system API of $API is less than the minimum api of $MINAPI! Aborting!"; }
182-
[ -z $MAXAPI ] || { [ $API -gt $MAXAPI ] && abort "! Your system API of $API is greater than the maximum api of $MAXAPI! Aborting!"; }
212+
[ -z $MINAPI ] || { [ $API -lt $MINAPI ] && ui_print "! Your system API of $API is less than the minimum api of $MINAPI! Aborting!" && it_failed;}
213+
[ -z $MAXAPI ] || { [ $API -gt $MAXAPI ] && ui_print "! Your system API of $API is greater than the maximum api of $MAXAPI! Aborting!" && it_failed; }
183214

184215
# Set variables
185216
[ $API -lt 26 ] && DYNLIB=false
@@ -198,11 +229,9 @@ fi
198229

199230
# Debug
200231
if $DEBUG; then
201-
ui_print "- Debug mode"
202-
ui_print " Module install log will include debug info"
203-
ui_print " It's in /data/media/0/WebviewManager/logs"
204-
mkdir -p /data/media/0/WebviewManager/logs/
205-
exec 2>/data/media/0/WebviewManager/logs/install.log
232+
ui_print "- Logging to [Internal Storage]/WebviewManager/logs"
233+
mkdir -p "$EXT_DATA"/WebviewManager/logs/
234+
exec 2>"$EXT_DATA"/WebviewManager/logs/install.log
206235
set -x
207236
fi
208237

0 commit comments

Comments
 (0)