-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_and_test.sh
More file actions
executable file
·69 lines (61 loc) · 2.07 KB
/
setup_and_test.sh
File metadata and controls
executable file
·69 lines (61 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# Setup and test script for Windscribe IP Changer
echo "============================================================"
echo "Windscribe IP Changer - Setup and Testing"
echo "============================================================"
# Check if ADB is installed
if command -v adb &> /dev/null; then
echo "✓ ADB is already installed"
ADB_PATH=$(which adb)
else
echo "✗ ADB is not installed"
echo ""
echo "Installing ADB..."
# Try to install via pacman (Arch Linux)
if command -v pacman &> /dev/null; then
echo "Installing android-tools via pacman..."
sudo pacman -S --noconfirm android-tools
if [ $? -eq 0 ]; then
echo "✓ ADB installed successfully"
ADB_PATH=$(which adb)
else
echo "✗ Installation failed. Please install manually:"
echo " sudo pacman -S android-tools"
exit 1
fi
else
echo "Please install ADB manually:"
echo " Arch Linux: sudo pacman -S android-tools"
echo " Ubuntu/Debian: sudo apt install android-tools-adb"
echo " Or download from: https://developer.android.com/studio/releases/platform-tools"
exit 1
fi
fi
echo ""
echo "ADB Path: $ADB_PATH"
echo ""
# Check for connected devices
echo "=== Checking for Connected Devices ==="
DEVICES=$(adb devices | grep -v "List" | grep "device" | wc -l)
if [ "$DEVICES" -eq 0 ]; then
echo "✗ No devices connected!"
echo ""
echo "Please:"
echo " 1. Connect your Android device via USB"
echo " 2. Enable USB Debugging in Developer Options"
echo " 3. Accept the debugging prompt on your device"
echo ""
echo "Then run: adb devices"
echo ""
read -p "Press Enter when device is connected, or Ctrl+C to exit..."
DEVICES=$(adb devices | grep -v "List" | grep "device" | wc -l)
if [ "$DEVICES" -eq 0 ]; then
echo "✗ Still no devices found. Exiting."
exit 1
fi
fi
echo "✓ Found $DEVICES device(s)"
adb devices
echo ""
echo "=== Running Python Tests ==="
python3 test_with_device.py