Modular Android Security Showcase | MVVM + Clean Architecture + Dagger 2 + 25+ Production-grade security validation checks Implements real-world Android security strategies using structured architecture and modular design
SecureCheck is a modular, open-source Android application built to evaluate device and app integrity through over 25 runtime and system-level security checks, including Root, Debugger, Play Integrity, SafetyNet, SSL Pinning, and Frida/Xposed detection.
- Features
- Screenshots
- Setup & Run
- Architecture
- Security Checks
- Testing & Debug
- Project Structure
- Internationalization (i18n)
- Contribution
- License
- Türkçe Açıklama
| Check | Description |
|---|---|
| Root Detection | Detect rooted devices |
| Debugger Detection | Checks debugger attachment |
| APK Signature | Validates app signature via AES-encrypted hash comparison |
| Tamper Detection | Detects APK repacking or build tampering |
| Obfuscation Check | Ensures code is protected via ProGuard/R8 |
| Play Integrity API | Uses official serverless API to verify genuine state |
| SafetyNet Check | Verifies CTS Profile & Basic Integrity |
| Exported Components | Detects exported components in AndroidManifest |
| PendingIntent Leak | Detects unsafe FLAG_MUTABLE usage |
| SSL Pinning | Validates HTTPS via embedded certificate |
| Reflection Detection | Analyzes reflection-prone class usage |
| Dex Loading | Detects dynamically loaded .dex files at runtime |
| Frida/Xposed Detection | Detects instrumentation frameworks |
| WebView Security | Checks JS enable, file access, insecure JS interfaces |
| Emulator/VPN/MockLoc | Detects emulator, VPN usage, and mock location spoofing |
All results are structured under a unified SecurityState model, which can be exported for audit or diagnostics.
| MotionLayout Transition | Security Summary |
|---|---|
![]() Shows animated transition using MotionLayout to visualize security results. |
![]() Displays a full scan result rendered on the summary screen. |
git clone https://github.com/muhammedalikocabey/securecheck.git
cd securecheck
./gradlew clean assembleDebugSecurity checks are triggered automatically at app launch via `MainActivity.kt
Architecture Pattern: MVVM + Clean Architecture + DI via Dagger 2 [UI] → [ViewModel] → [UseCase] → [Detector/Checker] → [Result]
app/
├── core/ # Low-level modules (Frida, Root, SSL)
├── data/ # Validators, log exporter, secure storage
├── domain/ # UseCases, Interfaces, Models
├── presentation/ # Compose UI, ViewModel, MotionLayout
├── di/ # AppComponent, Modules
- One-way data propagation from UI to domain logic ensures traceable state management
- Decoupled layers: UI ↔ Domain ↔ Data ↔ Core
- Dependency injection through Dagger 2 modules and qualifiers
Security checks are centralized in CompositeCheckSecurityUseCase. Each module is responsible for a single aspect (e.g., root, debugger, VPN):
SecurityState(
isRooted = false,
isDebuggerAttached = false,
isSignatureValid = true,
... // +20 more
)- Passed — Security check successful
- Failed — Potential risk detected
- Info — Suggestion provided in UI
Each check result is categorized as follows:
- Passed → Green icon
- Failed → Red warning + suggestion
- Suggestions from
strings.xml
FakeStateFactory: preview safe/risky scenarios (debug builds only)SecurityLogExporter: JSON snapshot export of full SecurityStateSecureStorageManager: tests EncryptedSharedPreferences + EncryptedFile- Compose Previews available via
SecurityStatusScreenPreviewSafe()in debug builds.
Add
.crtcert underres/raw/securecheck_cert.crtto test SSL pinning.
Each module produces a result that is consolidated into the SecurityState model, allowing the complete security status to be exported in structured JSON format.
The exported result format looks like this:
{
"isRooted": false,
"isDebuggerAttached": false,
"isFromPlayStore": true,
"ctsProfileMatch": true,
"basicIntegrity": true,
"isGenuine": true,
"riskLevel": "Safe",
"overallSafe": true,
"timestamp": 1715523375000
}This enables sharing of scan results for compliance, audit, or bug analysis purposes.
A sample file is saved under:
/data/data/<your.package.name>/files/security_log.jsoncore/
├── reverseanalysis/ # Frida, Xposed, Emulator
├── crypto/ # SecureCipher (AndroidKeyStore AES)
├── network/ # SSL Pinning, VPN detection
├── icc/ # Exported components, intent hijacking
└── webview/ # WebView security analyzer
data/
├── detector/ # Impl classes (signature, root, etc.)
├── local/secure/ # Secure storage helpers
└── log/ # Report exporter as JSON
domain/
├── usecase/ # All check use cases
├── model/ # SecurityState, WebViewSecurityResult
└── extension/ # riskLevel, passedCheckCount helpers
presentation/
├── screen/security/ # ViewModel + Compose screen
├── common/base/ # BaseViewModel
├── common/state/ # UiState sealed class
└── theme/ # Material3 + RiskColor providerMulti-language support via:
values/strings.xml(EN)values-tr-rTR/strings.xml(TR)
Example:
<string name="danger_frida">Frida instrumentation traces detected on the device.</string>
<string name="suggestion_frida">Frida may be active on device.</string>Contributions are welcome via Pull Requests. Consider enhancing security modules, UI, or export features.
- New security modules (Magisk, dynamic analysis, SE-Linux)
- Snapshot encryption and remote sync (GitHub Actions, Firebase)
- UX optimization & performance enhancements
- UI test coverage for Compose screens
Target version:
v2.0.0- Expected Q3 2025
Planned enhancements and extended detection modules for future releases:
| Feature | Description |
|---|---|
| SELinux Enforcement Check | Use getenforce command to verify SELinux mode (Enforcing / Permissive) |
| Open Port Detection | Scan for unexpected open ports via lsof or netstat |
| App Sandbox Bypass Check | Detect run-as, world-readable file leaks, or shared UID exploitation |
| Native Layer Anti-Debugging | Implement ptrace, syscall, and signal-based anti-debug detection |
| Rootless / Magisk Bypass Detection | Identify MagiskHide, Zygisk traces or root cloaking mechanisms |
| BurpSuite / MITM Proxy Detection | Check for custom CA injection, known proxy ports or Burp certificate |
These features will be introduced under core/advanced/ and integrated into CompositeCheckSecurityUseCase in version v2.0.0.
MIT License
Copyright (c) 2025 Muhammed Ali Kocabey
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...
Maintainer: Muhammed Ali Kocabey
muhammedalikocabey.com
Shaping the Future of Android – Spotify Podcast
Medium Articles
SecureCheck, Android cihazlarda root erişimi, debugger bağlantısı, sistem bütünlüğü ihlalleri ve tersine mühendislik girişimleri gibi güvenlik tehditlerini analiz etmek üzere tasarlanmış, açık kaynaklı ve modüler bir analiz uygulamasıdır.
Kurumsal güvenlik standartlarına uygun olarak tasarlanmıştır ve 25'ten fazla gerçek dünya güvenlik kontrolünü destekler.
- Root, Debugger, Emulator, Frida, Xposed tespiti
- Play Integrity ve SafetyNet doğrulamaları
- APK imzası ve obfuscation (ProGuard/R8) kontrolleri
- SSL Pinning (.crt ile doğrulama)
- WebView JS güvenliği ve FLAG_MUTABLE tespiti
- Compose + MotionLayout destekli modern UI
- Dagger 2 ile tam bağımlılık yönetimi
- MVVM + Clean Architecture yapısı
| MotionLayout Geçişi | Güvenlik Özeti |
|---|---|
![]() Güvenlik panelinin animasyonlu geçişi |
![]() Tüm kontrolleri gösteren statik ekran görüntüsü |
Uygulama açıldığında MainActivity.kt içinde SecurityViewModel tetiklenir. ViewModel, CompositeCheckSecurityUseCase üzerinden tüm güvenlik kontrollerini sırayla yürütür ve sonuçları SecurityState modeline aktarır. UI katmanında bu bilgiler görselleştirilerek kullanıcıya sunulur.
git clone https://github.com/muhammedalikocabey/securecheck.git
cd securecheck
./gradlew clean assembleDebugProje katmanları:
core/: Düşük seviyeli dedektörler (Frida, VPN, Dex vs.)data/: Güvenlik veri sağlayıcıları ve log/export işlemleridomain/: UseCase, modeller ve core interface'lerpresentation/: Compose ekranları, MotionLayout ve ViewModeldi/: Dagger modül tanımlamaları
FakeStateFactory: Güvenli ve riskli örnek senaryoları simüle eder (sadece debug build)SecurityLogExporter: Tüm güvenlik durumu JSON formatında dışa aktarılırSecureStorageManager: EncryptedFile ve EncryptedSharedPreferences test edilir.crtsertifikası ile SSL Pinning doğrulaması yapılabilir (res/raw/securecheck_cert.crt)
- Her modülün sonucu
SecurityStateyapısında merkezi şekilde toplanır ve JSON formatında dışa aktarılabilir. AppIntegritySnapshotile JSON formatında dışa aktarılır- UI'da MotionLayout geçişiyle animasyonlu gösterim sağlanır
{
"isRooted": false,
"isDebuggerAttached": false,
"isFromPlayStore": true,
"ctsProfileMatch": true,
"basicIntegrity": true,
"isGenuine": true,
"riskLevel": "Safe",
"overallSafe": true,
"timestamp": 1715523375000
}Projeye katkıda bulunmak için forkladıktan sonra PR (pull request) açabilirsiniz.
Memnuniyetle karşılanan katkılar:
- Yeni güvenlik kontrolleri (ör. Magisk, SELinux, dynamic analysis)
- MotionLayout veya UI iyileştirmeleri
- JSON raporlamada yeni alanlar
- Test kapsamı ve Compose UI testleri
Hedef Sürüm: v2.0.0 - Q3 2025
Gelecekteki versiyonlarda eklenmesi planlanan gelişmiş güvenlik kontrolleri:
| Özellik | Açıklama |
|---|---|
| SELinux Durumu Kontrolü | getenforce komutu ile Enforcing/Pemissive modu tespiti |
| Açık Port Tespiti | lsof, netstat gibi araçlarla beklenmeyen açık port analizi |
| Sandbox Bypass Tespiti | run-as komutu veya world-readable dosyalar ile izolasyon ihlali kontrolü |
| Native Katman Anti-Debugging | ptrace, syscall gibi native düzeyde anti-debug teknikleri |
| Magisk/Rootless Gizleme Tespiti | MagiskHide, Zygisk gibi root gizleme mekanizmalarının izlerini tespit |
| BurpSuite/MITM Proxy Tespiti | CA injeksiyonu, proxy portları veya Burp sertifikası kontrolü |
Bu kontroller core/advanced/ altında tanımlanacak ve CompositeCheckSecurityUseCase içerisine entegre edilecektir (v2.0.0 itibarıyla).
MIT Lisansı altında açık kaynaklı olarak yayınlanmaktadır.
Geliştirici: Muhammed Ali Kocabey
muhammedalikocabey.com
Shaping the Future of Android – Spotify Podcast
Medium

