Skip to content

Commit

Permalink
Bump version 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Burhanverse committed May 7, 2024
1 parent c986f28 commit 3f79f04
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Overview:
- The ultimate ad blocker, with no user interface
- Added key-selector to choose from different hosts
- Automatically downloads the lastest unified-hosts from [@StevenBlack](https://github.com/StevenBlack/hosts) hosts sources
- Automatically downloads the latest files from [@StevenBlack](https://github.com/StevenBlack/hosts) hosts sources
- Support Magisk & KernelSU

## Added hosts:
Expand Down
17 changes: 9 additions & 8 deletions addon/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ chooseport_legacy() {
elif [ $sel -eq 41 ]; then
return 1
elif $error; then
abort " No version selected, please restart installation"
abort " No version selected, please restart installation"
else
error=true
fi
Expand All @@ -22,26 +22,27 @@ chooseport_legacy() {

chooseport() {
[ "$1" ] && local delay=$1 || local delay=3
local error=false
local error=false
while true; do
local count=0
while true; do
timeout $delay /system/bin/getevent -lqc 1 2>&1 > $TMPDIR/events &
sleep 0.5; count=$((count + 1))
if (`grep -q 'KEY_VOLUMEUP *DOWN' $TMPDIR/events`); then
timeout $delay /system/bin/getevent -lqc 1 2>&1 >$TMPDIR/events &
sleep 0.5
count=$((count + 1))
if ($(grep -q 'KEY_VOLUMEUP *DOWN' $TMPDIR/events)); then
return 0
elif (`grep -q 'KEY_VOLUMEDOWN *DOWN' $TMPDIR/events`); then
elif ($(grep -q 'KEY_VOLUMEDOWN *DOWN' $TMPDIR/events)); then
return 1
fi
[ $count -gt 30 ] && break
[ $count -gt 30 ] && break
done
if $error; then
export chooseport=chooseport_legacy VKSEL=chooseport_legacy
chooseport_legacy $delay
return $?
else
error=true
echo " "
echo " "
echo " Volume key not detected, try again"
echo " "
fi
Expand Down
2 changes: 1 addition & 1 deletion customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_hosts() {
ui_print " Vol- = Exit"
ui_print " "
if chooseport; then
. $MODPATH/host-installer/uhfgps.sh
. $MODPATH/host-installer/uhfgps.sh
else
ui_print "- Exiting"
fi
Expand Down
4 changes: 2 additions & 2 deletions host-installer/uh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTS_URL="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
GIT_URL="https://github.com/StevenBlack/hosts"
ui_print "- Downloading latest hosts file from $GIT_URL"
curl -o $MODPATH/hosts $HOSTS_URL
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
ui_print "Error: Failed to download hosts file."
exit 1
fi
fi
4 changes: 2 additions & 2 deletions host-installer/uhfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTS_URL="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates
GIT_URL="https://github.com/StevenBlack/hosts"
ui_print "- Downloading latest hosts file from $GIT_URL"
curl -o $MODPATH/hosts $HOSTS_URL
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
ui_print "Error: Failed to download hosts file."
exit 1
fi
fi
8 changes: 4 additions & 4 deletions host-installer/uhfgps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTS_URL="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates
GIT_URL="https://github.com/StevenBlack/hosts"
ui_print "- Downloading latest hosts file from $GIT_URL"
curl -o $MODPATH/hosts $HOSTS_URL
if [ $? -ne 0 ]; then
ui_print "Error: Failed to download hosts file."
exit 1
fi
if [ $? -ne 0 ]; then
ui_print "Error: Failed to download hosts file."
exit 1
fi
4 changes: 2 additions & 2 deletions host-installer/uhfgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTS_URL="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates
GIT_URL="https://github.com/StevenBlack/hosts"
ui_print "- Downloading latest hosts file from $GIT_URL"
curl -o $MODPATH/hosts $HOSTS_URL
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
ui_print "Error: Failed to download hosts file."
exit 1
fi
fi
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=systemless_adblocker
name=Systemless Adblocker
version=1.3
versionCode=103
version=1.4
versionCode=104
author=burhanverse
description=An efficient ad blocker based out of @gloeyisk's systemless-host module with no user interface & the lastest hosts from github@StevenBlack
updateJson=https://raw.githubusercontent.com/Burhanverse/systemless-adblocker/main/update.json
10 changes: 5 additions & 5 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1.3,
"versionCode": 103,
"zipUrl": https://github.com/Burhanverse/systemless-adblocker/releases/download/1.3/Systemless_Adblocker_V1.3.zip,
"changelog": https://github.com/Burhanverse/systemless-adblocker/blob/main/changelog.md
}
"version": "1.4",
"versionCode": 104,
"zipUrl": "https://github.com/Burhanverse/systemless-adblocker/releases/download/1.4/Systemless_Adblocker_V1.4.zip",
"changelog": "https://github.com/Burhanverse/systemless-adblocker/blob/main/changelog.md"
}

0 comments on commit 3f79f04

Please sign in to comment.