← Back to WhisperSystems/Signal-Android

How to Deploy & Use WhisperSystems/Signal-Android

Signal Android - Deploy and Usage Guide

Prerequisites

Development Environment

  • Android Studio (latest stable version recommended)
  • Android SDK with API level 21+ (minimum supported)
  • Java Development Kit (JDK) 11 or later
  • Kotlin (included with Android Studio)
  • Git for version control

System Requirements

  • Minimum 8GB RAM (16GB recommended for emulator testing)
  • Minimum 4GB free disk space
  • Android device or emulator running Android 5.0 (API 21) or higher

Optional Dependencies

  • Android NDK (if building native components)
  • Firebase SDK (for push notifications)
  • Google Play Services (for certain features)

Installation

1. Clone the Repository

git clone https://github.com/signalapp/Signal-Android.git
cd Signal-Android

2. Import into Android Studio

  1. Open Android Studio
  2. Select "Open an existing project"
  3. Navigate to the cloned directory and select it
  4. Wait for Gradle sync to complete

3. Build Dependencies

Android Studio will automatically download required dependencies via Gradle. If you need to manually sync:

./gradlew build

Configuration

1. API Keys and Services

Signal requires several API keys for full functionality:

Google Play Services

  • Create a project in Google Cloud Console
  • Enable required APIs (Maps, Firebase, etc.)
  • Download google-services.json and place in app/ directory

Firebase Configuration

  • Create a Firebase project
  • Add Android app with package name: org.thoughtcrime.securesms
  • Download google-services.json to app/ directory

Optional: Push Notifications

For push notification functionality, you'll need:

  • Firebase Cloud Messaging (FCM) configuration
  • Server-side push notification setup

2. Build Variants

Signal supports multiple build variants:

  • debug - Development builds
  • release - Production builds
  • beta - Beta release builds

Configure in app/build.gradle:

buildTypes {
    debug {
        // Debug-specific configuration
    }
    release {
        // Release-specific configuration
    }
}

Build & Run

1. Building for Development

# Build debug APK
./gradlew assembleDebug

# Build debug APK with tests
./gradlew assembleDebug connectedDebugAndroidTest

# Install to connected device
./gradlew installDebug

2. Running on Device/Emulator

  1. Connect an Android device via USB with USB debugging enabled
  2. Or create an emulator in Android Studio (API 21+)
  3. Select the device/emulator from the run configuration dropdown
  4. Click the "Run" button (green play icon)

3. Building for Production

# Build release APK
./gradlew assembleRelease

# Build release APK with tests
./gradlew assembleRelease connectedReleaseAndroidTest

4. Signing Configuration

For release builds, configure signing in app/build.gradle:

signingConfigs {
    release {
        storeFile file("path/to/keystore")
        storePassword "your_password"
        keyAlias "your_alias"
        keyPassword "your_password"
    }
}

Deployment

1. Google Play Store

  1. Create a Google Play Developer account
  2. Create a new application listing
  3. Upload the signed APK from app/build/outputs/apk/release/
  4. Complete store listing and pricing information
  5. Submit for review

2. Alternative Distribution

For non-Play Store distribution:

# Generate signed APK
./gradlew assembleRelease

# Output will be in:
# app/build/outputs/apk/release/app-release.apk

3. Beta Testing

Signal supports beta testing through Google Play:

  1. Subscribe to beta releases: https://play.google.com/apps/testing/org.thoughtcrime.securesms
  2. Upload beta APKs to the Play Console
  3. Manage beta testers through the Play Console

Troubleshooting

Common Build Issues

1. Gradle Sync Failed

Issue: Gradle sync fails with dependency errors Solution:

# Clear Gradle cache
./gradlew clean

# Sync again
./gradlew build

2. API Level Mismatch

Issue: Build fails due to API level incompatibility Solution:

  • Check compileSdkVersion in app/build.gradle
  • Ensure Android SDK is installed for that API level
  • Update minSdkVersion if needed (minimum is 21)

3. Out of Memory Errors

Issue: Build fails with Java heap space errors Solution:

  • Increase heap size in gradle.properties:
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

Runtime Issues

1. App Crashes on Startup

Issue: App crashes immediately after launch Solution:

  • Check logcat for error messages
  • Verify all required permissions are granted
  • Ensure proper API keys are configured

2. Push Notifications Not Working

Issue: Messages don't arrive in real-time Solution:

  • Verify Firebase configuration
  • Check internet connectivity
  • Ensure battery optimization is disabled for the app

3. Database Migration Issues

Issue: Database schema conflicts during updates Solution:

  • Clear app data and cache
  • Check migration scripts in app/src/main/java/org/thoughtcrime/securesms/database/
  • Ensure proper versioning in SignalDatabase

Development Workflow

1. Contributing Code

  1. Fork the repository
  2. Create a feature branch
  3. Make changes following the CONTRIBUTING.md
  4. Submit a pull request

2. Testing

# Run unit tests
./gradlew test

# Run instrumented tests
./gradlew connectedAndroidTest

3. Code Quality

Signal uses several code quality tools:

  • Detekt for Kotlin linting
  • Spotless for code formatting
  • Ktlint for style consistency

Run quality checks:

./gradlew detekt
./gradlew spotlessCheck

Security Considerations

1. Cryptography Notice

Signal includes cryptographic software. Check your country's laws regarding encryption software before use.

2. Key Management

  • Never commit API keys to version control
  • Use secure key storage for production builds
  • Rotate keys regularly for production deployments

3. Privacy Features

Signal includes advanced privacy features:

  • Sealed sender mode
  • Disappearing messages
  • Screen security
  • Incognito keyboard

Ensure these features are properly configured for your deployment scenario.