Skip to content

Commit 20a249b

Browse files
feat: setup.sh β€” automated toolkit installation and hardening
1 parent c7137d4 commit 20a249b

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

β€Žsetup.shβ€Ž

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
# setup.sh -- One-command Android hardening and tweaking
3+
# Sets up the toolkit, configures ADB, and applies baseline privacy settings
4+
set -e
5+
6+
echo "πŸ”§ Android Tweaks Toolkit Setup"
7+
echo "================================"
8+
9+
# Check ADB
10+
if ! command -v adb &> /dev/null; then
11+
echo "❌ ADB not found. Install Android SDK Platform Tools first."
12+
echo " macOS: brew install android-platform-tools"
13+
echo " Linux: sudo apt install adb"
14+
exit 1
15+
fi
16+
17+
# Check device
18+
if ! adb devices | grep -q "device$"; then
19+
echo "❌ No Android device connected. Enable USB Debugging and try again."
20+
exit 1
21+
fi
22+
23+
DEVICE=$(adb get-serialno)
24+
MODEL=$(adb shell getprop ro.product.model)
25+
echo "βœ“ Connected: $MODEL ($DEVICE)"
26+
27+
# Install Python dependencies
28+
echo "βœ“ Installing Python dependencies..."
29+
pip install rich -q || pip3 install rich -q
30+
31+
# Make scripts executable
32+
chmod +x scripts/*.py scripts/*.sh *.py *.sh 2>/dev/null || true
33+
34+
# Run baseline privacy check
35+
echo ""
36+
echo "πŸ“Š Checking current privacy status..."
37+
python3 android-privacy-hardener/check.py 2>/dev/null || echo " (Privacy checker unavailable)"
38+
39+
echo ""
40+
read -rp "Apply Level 2 privacy hardening? (y/N): " APPLY
41+
if [[ "$APPLY" == "y" ]]; then
42+
python3 android-privacy-hardener/harden.py --level 2
43+
fi
44+
45+
echo ""
46+
echo "βœ… Setup complete!"
47+
echo ""
48+
echo "Available tools:"
49+
ls -1 scripts/*.py 2>/dev/null | xargs -I {} basename {} | sed 's/^/ - /'
50+
echo ""
51+
echo "Get started:"
52+
echo " python3 android-toolkit-scripts/device_info.py"
53+
echo " python3 android-toolkit-scripts/permission_audit.py"
54+
echo " python3 android-toolkit-scripts/network_monitor.py"

0 commit comments

Comments
Β (0)