Skip to content

Commit

Permalink
Beta 3 of 8.1.xx series
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 24, 2021
1 parent 8f48861 commit dd2ded3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 37 deletions.
35 changes: 18 additions & 17 deletions common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ old_version() {
fi
}
download_webview() {
cd "$TMPDIR"
cd "$TMPDIR" || return
old_version
if test "$WEBVIEW" -eq 0; then
do_bromite_webview
Expand All @@ -142,15 +142,15 @@ download_webview() {
if test "$VF" -eq 1; then
ui_print "ⓘ Redownloading ${NAME} webview, attempt number ${TRY_COUNT}, please be patient..."
dl "$URL"/"$DIR"/webview-"$ARCH".apk
mv -f webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
cp -rf webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
sed -i "/OLD_WEBVIEW/d" "$VERSIONFILE"
echo "OLD_WEBVIEW=$(echo "$W_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
fi
if test -f "$EXT_DATA"/apks/"$NAME"Webview.apk; then
if test "$OLD_WEBVIEW" -lt "$(echo "$W_VER" | sed 's/[^0-9]*//g' | tr -d '.')"; then
ui_print "ⓘ Downloading update for ${NAME} webview, please be patient..."
dl "$URL"/"$DIR"/webview-"$ARCH".apk
mv -f webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
cp -rf webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
sed -i "/OLD_WEBVIEW/d" "$VERSIONFILE"
echo "OLD_WEBVIEW=$(echo "$W_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
else
Expand All @@ -160,13 +160,13 @@ download_webview() {
ui_print "ⓘ No existing apk found for ${NAME} webview!"
ui_print "ⓘ Downloading ${NAME} webview, please be patient..."
dl "$URL"/"$DIR"/webview-"$ARCH".apk
mv -f webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
cp -rf webview-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Webview.apk
echo "OLD_WEBVIEW=$(echo "$W_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
fi
verify_webview
}
download_browser() {
cd "$TMPDIR"
cd "$TMPDIR" || return
old_version
if test "$BROWSER" -eq 0; then
do_bromite_browser
Expand All @@ -178,15 +178,15 @@ download_browser() {
if test "$VF" -eq 1; then
ui_print "ⓘ Redownloading ${NAME} browser, please be patient..."
dl "$URL"/"$DIR"/browser"$EXT"-"$ARCH".apk
mv -f browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
cp -rf browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
sed -i "/OLD_BROWSER/d" "$VERSIONFILE"
echo "OLD_BROWSER=$(echo "$B_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
fi
if test -f "$EXT_DATA"/apks/"$NAME"Browser.apk; then
if test "$OLD_BROWSER" -lt "$(echo "$B_VER" | sed 's/[^0-9]*//g' | tr -d '.')"; then
ui_print "ⓘ Downloading update for ${NAME} browser, please be patient..."
dl "$URL"/"$DIR"/browser"$EXT"-"$ARCH".apk
mv -f browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
cp -rf browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
sed -i "/OLD_BROWSER/d" "$VERSIONFILE"
echo "OLD_BROWSER=$(echo "$B_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
else
Expand All @@ -196,15 +196,15 @@ download_browser() {
ui_print "ⓘ No existing apk found for ${NAME} browser!"
ui_print "ⓘ Downloading ${NAME} browser, please be patient..."
dl "$URL"/"$DIR"/browser"$EXT"-"$ARCH".apk
mv -f browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
cp -rf browser"$EXT"-"$ARCH".apk "$EXT_DATA"/apks/"$NAME"Browser.apk
sed -i "/OLD_BROWSER/d" "$VERSIONFILE"
echo "OLD_BROWSER=$(echo "$B_VER" | sed 's/[^0-9]*//g')" >>"$VERSIONFILE"
fi
extract_browser
}
verify_webview() {
ui_print "ⓘ Verifying ${NAME} webview files..."
if test "$DIR" != 'ugc'; then
if test "$DIR" != 'ugc'; then
cd "$EXT_DATA"/apks || return
wget -q "$URL"/"$DIR"/sha256sums.txt -O sha256sums.txt.tmp
grep "$ARCH"_SystemWebView.apk sha256sums.txt.tmp >"$EXT_DATA"/apks/"$NAME"Webview.apk.sha256.txt
Expand Down Expand Up @@ -303,13 +303,13 @@ extract_webview() {
done
fi
cp_ch "$EXT_DATA"/apks/"$NAME"Webview.apk "$MODPATH"$WPATH/webview.apk || cp_ch "$EXT_DATA"/apks/webview.apk "$MODPATH"$WPATH/webview.apk
touch "$MODPATH"$WPATH/.replace
mktouch "$MODPATH"$WPATH/.replace
cp "$MODPATH"$WPATH/webview.apk "$TMPDIR"/webview.zip
mkdir "$TMPDIR"/webview -p
unzip -d "$TMPDIR"/webview "$TMPDIR"/webview.zip >/dev/null
cp -rf "$TMPDIR"/webview/lib "$MODPATH"$WPATH/
mv "$MODPATH"$WPATH/lib/arm64-v8a "$MODPATH"$WPATH/lib/arm64
mv "$MODPATH"$WPATH/lib/armeabi-v7a "$MODPATH"$WPATH/lib/arm
cp -rf "$MODPATH"$WPATH/lib/arm64-v8a "$MODPATH"$WPATH/lib/arm64
cp -rf "$MODPATH"$WPATH/lib/armeabi-v7a "$MODPATH"$WPATH/lib/arm
rm -rf "$TMPDIR"/webview "$TMPDIR"/webview.zip
create_overlay
}
Expand All @@ -328,13 +328,13 @@ extract_browser() {
mkdir -p "$TMPDIR"/browser
unzip -d "$TMPDIR"/browser "$TMPDIR"/browser.zip >/dev/null
cp -rf "$TMPDIR"/browser/lib "$MODPATH"$BPATH
mv "$MODPATH"$BPATH/lib/arm64-v8a "$MODPATH"$BPATH/lib/arm64
mv "$MODPATH""$BPATH"/lib/armeabi-v7a "$MODPATH"$BPATH/lib/arm
cp -rf "$MODPATH"$BPATH/lib/arm64-v8a "$MODPATH"$BPATH/lib/arm64
cp -rf "$MODPATH""$BPATH"/lib/armeabi-v7a "$MODPATH"$BPATH/lib/arm
rm -rf "$TMPDIR"/browser "$TMPDIR"/browser.zip
}
online_install() {
ui_print "☑ Awesome, you have internet"
URL="https://dl.androidacy.com/downloads/webview-files/"
URL="https://dl.androidacy.com/downloads/webview-files"
set_path
if test "$INSTALL" -eq 0; then
ui_print "ⓘ Webview install selected"
Expand Down Expand Up @@ -408,6 +408,7 @@ do_cleanup() {
cp -rf "$MODPATH"/product/* "$MODPATH"/system/product
cp -rf "$MODPATH"/system_ext/* "$MODPATH"/system/system_ext
rm -fr "$MODPATH"/product "$MODPATH"/system_ext
rm -fr "$MODPATH"/config.txt
clean_dalvik
}
if test ${TRY_COUNT} -ge "3"; then
Expand All @@ -416,7 +417,7 @@ else
do_install
fi
ui_print ' '
ui_print "ⓘ Some OEM/Google things were remvoed during install, to avoid conflicts"
ui_print "ⓘ Some OEM/Google things were recp -rfoed during install, to avoid conflicts"
sleep 0.2
ui_print "ⓘ You can reinstall them, but do not request support if you do"
sleep 0.2
Expand All @@ -433,4 +434,4 @@ ui_print "☑ Website, how to get support and blog is at https://www.androidacy.
sleep 0.2
ui_print "☑ Install apparently succeeded, please reboot ASAP"
sleep 0.2
ui_print " "
ui_print " "
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=bromitewebview
name=Webview Manager
version=8.1.0_publicbeta2
versionCode=4040
version=8.1.0_publicbeta3
versionCode=4041
author=Androidacy
description=Change System WebView and default browser systemless-ly, on any ROM. You can block ads and fingerprinting, increase privacy, and more. Website: www.androidacy.com.
6 changes: 0 additions & 6 deletions post-fs-data.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/data/adb/magisk/busybox ash
# shellcheck shell=dash
# shellcheck disable=SC2034
if "$(getenforce)" == "Enforcing" || "$(getenforce)" == "enforcing"; then
setenforce 0 && SELINUX_R=true
fi
ASH_STANDALONE=1
SH=$(readlink -f "$0")
MODDIR=$(dirname "$SH")
Expand Down Expand Up @@ -49,6 +46,3 @@ if ! $OVERLAY; then
sed -i "/OVERLAY/d" "${MODDIR}"/status.txt
echo "OVERLAY=true" >>"${MODDIR}"/status.txt
fi
if $SELINUX_R; then
setenforce 1
fi
6 changes: 0 additions & 6 deletions service.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/data/adb/magisk/busybox ash
# shellcheck shell=dash
# shellcheck disable=SC2034
if "$(getenforce)" == "Enforcing" || "$(getenforce)" == "enforcing"; then
setenforce 0 && SELINUX_R=true
fi
ASH_STANDALONE=1
SH=$(readlink -f "$0")
MODDIR=$(dirname "$SH")
Expand Down Expand Up @@ -88,6 +85,3 @@ touch "$FINDLOG"
} >"$FINDLOG"
tail -n +1 "$EXT_DATA"/logs/install.log "$MODDIR"/logs/aapt.log "$MODDIR"/logs/find.log "$MODDIR"/logs/props.log "$MODDIR"/logs/postfsdata-verbose.log "$MODDIR"/logs/service-verbose.log >"$MODDIR"/logs/full.log
cp -rf "$MODDIR"/logs/full.log "$EXT_DATA"/logs
if $SELINUX_R; then
setenforce 1
fi
8 changes: 2 additions & 6 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
#!/system/bin/sh
# If you are reading this you owe me $10 => https://paypal.me/linuxandria
# Set various vars
OL="com.linuxandria.WebviewOverlay"
OL="org.androidacy.WebviewOverlay"
LIST="/data/system/overlays.xml"
# Forces Android to rebuild package cache and re-register old webview
rm -rf /data/resource-cache/*
rm -rf /data/dalvik-cache/*
rm -rf /cache/dalvik-cache/*
rm -rf /data/*/com.android.webview*
rm -rf /data/system/package_cache/*
# Nuke old overlay, should prevent some bootloops
sed -i "/item packageName=\"${OL}\"/d" $LIST
echo "# Webview Switcher Cleanup Script
while test \"$(getprop sys.boot_completed)\" != \"1\" && test ! -d /storage/emulated/0/Android ;
do sleep 30;
do sleep 2;
done
rm -rf /storage/emulated/0/WebviewManager
rm -rf /data/adb/service.d/ws-cleanup.sh
Expand Down

0 comments on commit dd2ded3

Please sign in to comment.