-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabled location features and scripts
- Loading branch information
Showing
6 changed files
with
173 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
#!/usr/bin/bash | ||
|
||
echo "[Selenium] Setting permissions..." | ||
|
||
FILE="/Library/Application Support/SeleniumExtra.bundle/Assets/icon.PNG" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] Icon..." | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/Assets/icon.PNG" | ||
fi | ||
|
||
FILE="/Library/Application Support/SeleniumExtra.bundle/de.lproj/Localizable.strings" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] German..." | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/de.lproj/Localizable.strings" | ||
fi | ||
|
||
FILE="/Library/Application Support/SeleniumExtra.bundle/en.lproj/Localizable.strings" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] English..." | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/en.lproj/Localizable.strings" | ||
fi | ||
|
||
FILE="/Library/Application Support/SeleniumExtra.bundle/fr.lproj/Localizable.strings" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] French..." | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/fr.lproj/Localizable.strings" | ||
fi | ||
|
||
FILE="/Library/Application Support/SeleniumExtra.bundle/he.lproj/Localizable.strings" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] Hebrew..." | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/he.lproj/Localizable.strings" | ||
fi | ||
|
||
FILE="/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
if test -f "$FILE"; then | ||
echo "[Selenium] SpringBoard..." | ||
chmod 0644 "/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
fi | ||
|
||
echo "[Selenium] Permissions set!" | ||
#!/bin/bash | ||
|
||
# echo "[Selenium] Setting permissions..." | ||
|
||
# FILE="/Library/Application Support/SeleniumExtra.bundle/Assets/icon.PNG" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] Icon..." | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/Assets/icon.PNG" | ||
# fi | ||
|
||
# FILE="/Library/Application Support/SeleniumExtra.bundle/de.lproj/Localizable.strings" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] German..." | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/de.lproj/Localizable.strings" | ||
# fi | ||
|
||
# FILE="/Library/Application Support/SeleniumExtra.bundle/en.lproj/Localizable.strings" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] English..." | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/en.lproj/Localizable.strings" | ||
# fi | ||
|
||
# FILE="/Library/Application Support/SeleniumExtra.bundle/fr.lproj/Localizable.strings" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] French..." | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/fr.lproj/Localizable.strings" | ||
# fi | ||
|
||
# FILE="/Library/Application Support/SeleniumExtra.bundle/he.lproj/Localizable.strings" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] Hebrew..." | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/he.lproj/Localizable.strings" | ||
# fi | ||
|
||
# FILE="/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
# if test -f "$FILE"; then | ||
# echo "[Selenium] SpringBoard..." | ||
# chmod 0644 "/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
# fi | ||
|
||
# echo "[Selenium] Permissions set!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
#!/usr/bin/bash | ||
#!/bin/bash | ||
|
||
# Removing manager.plist | ||
|
||
if [ "remove" == "$1" ]; then | ||
echo "[Selenium] Removing files..." | ||
FILE="/var/mobile/Library/Selenium/manager.plist" | ||
if test -f "$FILE"; then | ||
rm -r "/var/mobile/Library/Selenium/" | ||
fi | ||
|
||
echo "[Selenium] Restoring backup..." | ||
BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
if test -f "$BACKUP"; then | ||
rm /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
mv /System/Library/CoreServices/SpringBoard.app/Info.plist.backup /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
echo "[Selenium] Backup restored!" | ||
fi | ||
fi | ||
|
||
|
||
# Aborting install/upgrade if preinst extied with an error | ||
|
||
ABORT=0 | ||
|
||
case "$1" in | ||
abort-install ) | ||
ABORT=1 | ||
#finish return | ||
;; | ||
abort-upgrade ) | ||
ABORT=1 | ||
#finish return | ||
;; | ||
failed-upgrade ) | ||
ABORT=1 | ||
#finish return | ||
;; | ||
esac | ||
|
||
if [ $ABORT == 1 ]; then | ||
echo "[Selenium] Aborting..." | ||
BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
if test -f "$BACKUP"; then | ||
rm /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
mv /System/Library/CoreServices/SpringBoard.app/Info.plist.backup /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
echo "[Selenium] An error occured during install. System modifications were reverted to original state." | ||
fi | ||
fi | ||
# if [ "remove" == "$1" ]; then | ||
# echo "[Selenium] Removing files..." | ||
# FILE="/var/mobile/Library/Selenium/manager.plist" | ||
# if test -f "$FILE"; then | ||
# rm -r "/var/mobile/Library/Selenium/" | ||
# fi | ||
|
||
# echo "[Selenium] Restoring backup..." | ||
# BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
# if test -f "$BACKUP"; then | ||
# rm /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
# mv /System/Library/CoreServices/SpringBoard.app/Info.plist.backup /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
# echo "[Selenium] Backup restored!" | ||
# fi | ||
# fi | ||
|
||
|
||
# # Aborting install/upgrade if preinst extied with an error | ||
|
||
# ABORT=0 | ||
|
||
# case "$1" in | ||
# abort-install ) | ||
# ABORT=1 | ||
# #finish return | ||
# ;; | ||
# abort-upgrade ) | ||
# ABORT=1 | ||
# #finish return | ||
# ;; | ||
# failed-upgrade ) | ||
# ABORT=1 | ||
# #finish return | ||
# ;; | ||
# esac | ||
|
||
# if [ $ABORT == 1 ]; then | ||
# echo "[Selenium] Aborting..." | ||
# BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
# if test -f "$BACKUP"; then | ||
# rm /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
# mv /System/Library/CoreServices/SpringBoard.app/Info.plist.backup /System/Library/CoreServices/SpringBoard.app/Info.plist | ||
# echo "[Selenium] An error occured during install. System modifications were reverted to original state." | ||
# fi | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
#!/usr/bin/bash | ||
#!/bin/bash | ||
|
||
set -e | ||
x=1 | ||
while [ $x -eq 1 ] | ||
do | ||
#ARG="install" | ||
#if [ "$ARG" == "$1" ]; then | ||
echo "[Selenium] Checking files..." | ||
FILE="/Library/Application Support/SeleniumExtra.bundle/txt.txt" | ||
if test -f "$FILE"; then | ||
chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/txt.txt" | ||
fi | ||
INFO="/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
if test -f "$INFO"; then | ||
BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
if test -f "$BACKUP"; then | ||
echo "[Selenium] Backup exists!" | ||
echo "[Selenium] Files already modified!" | ||
else | ||
echo "[Selenium] Backing up files..." | ||
cp /System/Library/CoreServices/SpringBoard.app/Info.plist /System/Library/CoreServices/SpringBoard.app/Info.plist.backup && : || break | ||
echo "[Selenium] Modifying files..." | ||
plutil -convert xml1 $INFO > /dev/null 2>&1 && : || break | ||
echo "[Selenium] Modifying files..." | ||
LINES="$(wc -l $INFO | sed -n 's/ $INFO//gp' | sed -n 's/ //gp')" | ||
echo "[Selenium] Modifying files..." | ||
NEWLINES="$(echo "$((LINES - 2))")" | ||
echo "[Selenium] Modifying files..." | ||
echo "$(cat $INFO | head -n$NEWLINES)" > newInfo.plist && : || break | ||
echo "[Selenium] Modifying files..." | ||
echo " <key>UIBackgroundModes</key>" >> newInfo.plist && : || break | ||
echo " <array>" >> newInfo.plist && : || break | ||
echo " <string>location</string>" >> newInfo.plist && : || break | ||
echo " </array>" >> newInfo.plist && : || break | ||
echo " <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>" >> newInfo.plist && : || break | ||
echo " <string>Set location access to 'Always' to enable location-based features for Selenium.</string>" >> newInfo.plist && : || break | ||
echo " <key>NSLocationWhenInUseUsageDescription</key>" >> newInfo.plist && : || break | ||
echo " <string>Set location access to 'Always' to enable location-based features for Selenium.</string>" >> newInfo.plist && : || break | ||
echo "</dict>" >> newInfo.plist && : || break | ||
echo "</plist>" >> newInfo.plist && : || break | ||
rm -r $INFO | ||
mv newInfo.plist $INFO && : || break | ||
plutil -convert binary1 $INFO > /dev/null 2>&1 && : || break | ||
echo "[Selenium] Files modified!" | ||
fi | ||
fi | ||
set -t | ||
exit 0 | ||
set +t | ||
#fi | ||
x=$[$x-1] | ||
done | ||
exit 1 | ||
# set -e | ||
# x=1 | ||
# while [ $x -eq 1 ] | ||
# do | ||
# #ARG="install" | ||
# #if [ "$ARG" == "$1" ]; then | ||
# echo "[Selenium] Checking files..." | ||
# FILE="/Library/Application Support/SeleniumExtra.bundle/txt.txt" | ||
# if test -f "$FILE"; then | ||
# chmod 0644 "/Library/Application Support/SeleniumExtra.bundle/txt.txt" | ||
# fi | ||
# INFO="/System/Library/CoreServices/SpringBoard.app/Info.plist" | ||
# if test -f "$INFO"; then | ||
# BACKUP="/System/Library/CoreServices/SpringBoard.app/Info.plist.backup" | ||
# if test -f "$BACKUP"; then | ||
# echo "[Selenium] Backup exists!" | ||
# echo "[Selenium] Files already modified!" | ||
# else | ||
# echo "[Selenium] Backing up files..." | ||
# cp /System/Library/CoreServices/SpringBoard.app/Info.plist /System/Library/CoreServices/SpringBoard.app/Info.plist.backup && : || break | ||
# echo "[Selenium] Modifying files..." | ||
# plutil -convert xml1 $INFO > /dev/null 2>&1 && : || break | ||
# echo "[Selenium] Modifying files..." | ||
# LINES="$(wc -l $INFO | sed -n 's/ $INFO//gp' | sed -n 's/ //gp')" | ||
# echo "[Selenium] Modifying files..." | ||
# NEWLINES="$(echo "$((LINES - 2))")" | ||
# echo "[Selenium] Modifying files..." | ||
# echo "$(cat $INFO | head -n$NEWLINES)" > newInfo.plist && : || break | ||
# echo "[Selenium] Modifying files..." | ||
# echo " <key>UIBackgroundModes</key>" >> newInfo.plist && : || break | ||
# echo " <array>" >> newInfo.plist && : || break | ||
# echo " <string>location</string>" >> newInfo.plist && : || break | ||
# echo " </array>" >> newInfo.plist && : || break | ||
# echo " <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>" >> newInfo.plist && : || break | ||
# echo " <string>Set location access to 'Always' to enable location-based features for Selenium.</string>" >> newInfo.plist && : || break | ||
# echo " <key>NSLocationWhenInUseUsageDescription</key>" >> newInfo.plist && : || break | ||
# echo " <string>Set location access to 'Always' to enable location-based features for Selenium.</string>" >> newInfo.plist && : || break | ||
# echo "</dict>" >> newInfo.plist && : || break | ||
# echo "</plist>" >> newInfo.plist && : || break | ||
# rm -r $INFO | ||
# mv newInfo.plist $INFO && : || break | ||
# plutil -convert binary1 $INFO > /dev/null 2>&1 && : || break | ||
# echo "[Selenium] Files modified!" | ||
# fi | ||
# fi | ||
# set -t | ||
# exit 0 | ||
# set +t | ||
# #fi | ||
# x=$[$x-1] | ||
# done | ||
# exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters