Take control of your device without any of the privacy issues.
Bloodhound is a free and open-source device tracker for Android designed for authorized device recovery and monitoring. Track your own devices for legitimate anti-theft purposes with complete privacy control.
This application is intended ONLY for:
- Tracking your own devices for anti-theft purposes
- Authorized security testing and research
- Educational purposes with proper consent
Unauthorized use of tracking software may be illegal in your jurisdiction.
- 📍 GPS Location Tracking - Real-time location updates
- 📷 Remote Camera Capture - Take photos from front/back cameras
- 🎤 Audio Recording - Remote microphone access
- 🔔 Remote Alarm - Trigger alarm even on silent mode
- 📱 SMS Trigger - Activate via text message
- ☁️ Nextcloud Integration - Store data on your private cloud
- 🚨 Emergency SMS - Send tracking data via SMS
- 🔒 Privacy First - No third-party servers, you control everything
- Android Studio (latest version recommended)
- JDK 17 or newer (JDK 22 recommended)
- Android SDK API 34 (automatically downloaded via Gradle)
- Gradle 8.8+ (included via wrapper)
- Minimum Android Version: Android 7.0 (API 24)
- Target Android Version: Android 14 (API 34)
- Required permissions: Location, Camera, Microphone, SMS, Storage
-
Clone the repository
git clone <repo_url> cd Bloodhound
-
Set up environment (macOS/Linux)
export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools
-
Build the app
./gradlew assembleDebug
-
Install on device/emulator
./gradlew installDebug
# Clean build
./gradlew clean
# Build debug APK
./gradlew assembleDebug
# Build release APK
./gradlew assembleRelease
# Run tests
./gradlew test
# Install to connected device
./gradlew installDebug
# Run lint checks
./gradlew lint-
List available emulators
emulator -list-avds
-
Start an emulator
# Replace <avd_name> with your emulator name from the list above emulator -avd <avd_name> # Example: emulator -avd Pixel_7
-
Wait for the emulator to fully boot, then install the app
# Build and install in one command ./gradlew installDebug # Or install a pre-built APK manually adb install -r app/build/outputs/apk/debug/app-debug.apk
-
Launch the app
adb shell am start -n me.dbarnett.bloodhound/.BloodhoundActivity
Tip: You can run the emulator in the background by appending & to the command:
emulator -avd Pixel_7 &Location updates are configured with a 5-minute interval and 20-meter minimum movement. On an emulator sitting still, no locations will be captured automatically. Use mock locations to test:
# Send mock location to emulator while tracking is active
adb emu geo fix -122.4194 37.7749
# Or with different coordinates to trigger a location change
adb emu geo fix -122.4200 37.7755Test steps:
- Start tracking (tap FAB button)
- Run the
geo fixcommand above - Wait a moment, then check Capture Browser
- Location files should appear in
/files/Location/
To use Nextcloud integration for remote control and data storage:
-
Create Bloodhound directory in your Nextcloud root:
Nextcloud/ └── Bloodhound/ ├── Config/ │ ├── check # Binary flag (0 or 1) │ └── config.json # Feature configuration ├── Pictures/ # Uploaded photos ├── Location/ # Location JSON files └── Recordings/ # Audio recordings -
Configure tracking in
config.json:{ "location": "true", "camera": "false", "alarm": "false", "mic": "false" } -
Enable/disable tracking via the
checkfile:1= tracking enabled0= tracking disabled
Bloodhound uses a service-based architecture:
- BloodhoundService - Core tracking service (location, camera, mic, alarm)
- CheckService - Polls Nextcloud every 60 seconds for remote commands
- SmsReceiver - Listens for SMS trigger messages
- BootReceiver - Auto-starts services on device boot
Data is uploaded to your Nextcloud server or sent via SMS based on configuration.
-
Grant Permissions - On first launch, approve all requested permissions:
- Location (Fine & Coarse)
- Camera
- Microphone
- SMS (Send, Receive, Read)
- System Alert Window
- Battery Optimization Exclusion
-
Configure Nextcloud (Optional)
- Tap the menu (three dots) → "Nextcloud Login"
- Enter your Nextcloud server URL, username, and password
- The app will create required directories automatically
-
Set Emergency Contact
- Tap the menu → "Settings"
- Enter a phone number for emergency SMS tracking notifications
There are three ways to activate camera tracking:
- Long-press the paw logo on the main screen (hold for 2 seconds)
- Select "Start Full Tracking" from the menu
- Camera will begin capturing photos immediately (back camera → front camera → 60s delay → repeat)
- Configure trigger phrase in Settings
- Send SMS with trigger phrase to the device
- Camera tracking starts automatically
- Set up Nextcloud integration
- Update
Bloodhound/Config/checkfile to1 - Configure features in
config.json - CheckService polls server every 60 seconds and starts tracking when enabled
# Monitor camera activity in real-time
adb logcat | grep -E "CameraX|BloodhoundService|ImageCapture"
# You should see logs like:
# D/CameraXCaptureManager: Starting capture sequence
# D/CameraXCaptureManager: Capturing photo with BACK camera
# D/CameraXCaptureManager: Photo saved successfully: /data/data/.../Pictures/IMG_20250126_143052.jpg# List captured photos
adb shell "run-as me.dbarnett.bloodhound ls -la /data/data/me.dbarnett.bloodhound/files/Pictures/"
# Expected output:
# -rw------- 1 u0_a123 u0_a123 245678 2025-01-26 14:30 IMG_20250126_143052.jpg
# -rw------- 1 u0_a123 u0_a123 198234 2025-01-26 14:30 IMG_20250126_143053.jpg# Verify BloodhoundService is running
adb shell dumpsys activity services me.dbarnett.bloodhound
# Look for:
# ServiceRecord{...BloodhoundService...}
# app=ProcessRecord{...} (should NOT be null)Problem: No photos in Pictures directory after triggering tracking
Solutions:
-
Check service is actually running:
adb shell dumpsys activity services me.dbarnett.bloodhound | grep "app="
If
app=null, the service didn't start. Check if:- Emergency phone number is configured in Settings
- All camera permissions are granted
- Battery optimization is disabled for Bloodhound
-
Check for camera initialization errors:
adb logcat | grep -E "CameraX|Camera.*error"
-
Verify storage directory exists:
adb shell "run-as me.dbarnett.bloodhound mkdir -p /data/data/me.dbarnett.bloodhound/files/Pictures" -
Restart the app completely:
- Force stop app
- Clear app data if necessary
- Re-grant all permissions
- Try triggering again
Problem: Service starts but stops after a few seconds
Cause: Android's background service restrictions on newer versions
Solutions:
- Disable battery optimization for Bloodhound
- Consider using "Start Foreground Tracking" instead (shows persistent notification)
- Check for crashes in logcat:
adb logcat | grep AndroidRuntime
Problem: Photos are captured locally but not appearing on Nextcloud
Solutions:
- Verify Nextcloud credentials in Settings
- Check network connectivity
- Ensure
Bloodhound/Pictures/directory exists on Nextcloud server - Check upload logs:
adb logcat | grep -E "Nextcloud|Upload"
All data is stored locally in app-specific storage before being uploaded to Nextcloud. Files are stored in:
Base path: /data/data/me.dbarnett.bloodhound/files/
| Type | Directory | File Format | Example |
|---|---|---|---|
| Camera Photos | Pictures/ |
IMG_yyyyMMdd_HHmmss.jpg |
IMG_20250126_143052.jpg |
| Location Data | Location/ |
yyyyMMdd_HHmmss.json |
20250126_143052.json |
| Audio Recordings | Recordings/ |
yyyyMMdd_HHmmss.mp3 |
20250126_143052.mp3 |
| Config Files | / (root) |
check |
Downloaded from Nextcloud |
| Database | /databases/ |
bloodhound.db |
SQLite tracking history |
| Settings | SharedPreferences | Default | Nextcloud credentials, SMS triggers |
# Pull all photos from device
adb pull /data/data/me.dbarnett.bloodhound/files/Pictures/ ./photos/
# Pull location data
adb pull /data/data/me.dbarnett.bloodhound/files/Location/ ./location/
# Pull audio recordings
adb pull /data/data/me.dbarnett.bloodhound/files/Recordings/ ./audio/
# View tracking history database
adb pull /data/data/me.dbarnett.bloodhound/databases/bloodhound.db ./Captured data is automatically uploaded to corresponding directories on your Nextcloud server:
- Photos →
Nextcloud/Bloodhound/Pictures/ - Location →
Nextcloud/Bloodhound/Location/ - Recordings →
Nextcloud/Bloodhound/Recordings/
- App-Specific Storage: All files use
context.getFilesDir()(app-specific storage) - No External Storage: The app doesn't require external storage permissions for normal operation
- Automatic Cleanup: Files remain on device until manually deleted or app is uninstalled
- Privacy: All data stored in app-private directory, inaccessible to other apps
- Backup: Data is NOT backed up by Android's Auto Backup feature (by design)
- Language: Java
- Build System: Gradle 8.8
- Android SDK: API 34 (Android 14)
- Architecture: AndroidX with Material Design
- Storage: SQLite for tracking history
- Cloud: Nextcloud Android Library
- Credentials Storage: Nextcloud credentials are stored in plain text in SharedPreferences (temporary limitation - encryption planned).
- Background Restrictions: Modern Android versions restrict background services. Foreground service implementation recommended.
- SMS Restrictions: Background SMS access is restricted on newer Android versions.
This project has been modernized from the original 2017 codebase:
- ✅ Updated from Android SDK 25 → SDK 34
- ✅ Migrated from Support Library → AndroidX
- ✅ Updated Gradle 3.3 → 8.8
- ✅ Fixed Android 12+ compatibility issues
- ✅ Updated all dependencies to latest versions
- ✅ Migrated from legacy Camera API to CameraX (November 2025)
- Eliminated deprecated android.hardware.Camera API
- Removed 1x1 pixel SurfaceView overlay hack
- Improved battery efficiency and capture speed
- Better compatibility with modern Android versions
Contributions are welcome! Please ensure:
- All features respect user privacy
- Code follows existing architecture patterns
- Tests are included for new features
- Documentation is updated
See license.txt for details.
The developers of this software are not responsible for any misuse. Users must comply with all applicable laws regarding device tracking and privacy in their jurisdiction. Always obtain proper authorization before tracking any device.
